473,513 Members | 2,448 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB.NET-APP Strange Error Inside.

15 New Member
Hello all..

here is the scenario:
I Have a fully working vb.net 2005 app and firebird..
everything is perfectly, except this little function:
Expand|Select|Wrap|Line Numbers
  1.         dim dr, dr1 as FbDataReader
  2.         dr = reader("select * from net_saldo where b.codigo=" & user)
  3.         If dr.Read() Then
  4.             dr1 = reader("Select out,pc from net_ac where user=" & user)
  5.             While dr1.Read
  6.                 l.Items.Add(Format(dr1.GetDateTime(0), "dd/MM/yyyy") & " - " & dr1.GetString(1))
  7.             End While
  8.         Else
  9.             l.Items.Add("Saldo: R$ 0,00")
  10.         End If
Here is the reader function code:

Expand|Select|Wrap|Line Numbers
  1. Public Function reader(ByVal sql As String) As FbDataReader
  2.         Dim cm As New FbCommand
  3.         cm.Connection = fb
  4.         cm.CommandText = sql
  5.         reader = cm.ExecuteReader
  6. End Function
The error i'm getting is:

"Conversion error from string SYSDBA"

on the line: While dr1.read

it executes the reader function for the second time with no errors, but when it try to read the datareader the error pops up.

I've never seen such error before...

the error persists even when i use a different conection/reader_function/datareader_object..

this makes no sense at all..

.... please help.
Apr 17 '08 #1
4 1254
Plater
7,872 Recognized Expert Expert
Is that string valid? I am unfamiliar with the database type you are querying but it sounds like it doesn't like the format of one of your SELECT statements there.

Unless you are mistaken on the line and it's really having trouble with:
l.Items.Add(Format(dr1.GetDateTime(0), "dd/MM/yyyy") & " - " & dr1.GetString(1))
Apr 17 '08 #2
nexusbr
15 New Member
Yes, the string is valid.

no, the line is correct.

SYSDBA is the name of the user connected to the database.

the sql statment is correct, unless i'm blind..

i'm kinda lost here... never happend such a thing before..


it does not even step into the while loop.. the error could be on second tick.. but no..
Apr 17 '08 #3
nexusbr
15 New Member
oh.. wait.. the same error happened on ibexpert also.. now i guess its a little easier to find out.. let me check it..
Apr 17 '08 #4
nexusbr
15 New Member
Ok...


Problem Solved..

Sorry For taking your time.. it was my mistake..

the column name 'user' was conflicting with the firebird system, making it thinks i was trying to access the database with a different user...

thx for the help.
Apr 17 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
7256
by: angelag | last post by:
I am currently taking a college course in Visual Basic.Net and I am a beginner. I bought Visual Studio.Net 2003 to do my homework at home. I built my first project and e-mailed it to myself at...
9
3102
by: gulu man | last post by:
Hi, What is the substitute for COM objects in .NET? How can I create something similar to com in .net? Is it still possible? Thank you
20
3294
by: Olav.NET | last post by:
I am a .NET/C++ developer who is supposed to do some work with Access. I do not know much about it except for the DB part. Questions: *1* I am looking for INTENSIVE books to get quickly up to...
14
1717
by: David Lozzi | last post by:
Hello, I am in need of some advice. I want to move to .Net 2.0 and Visual Studio 2005 for ASP.NET developement, however I'm hesitant. Here are a few questions I have regarding the upgrade: 1)...
22
3237
by: EP | last post by:
When running my asp.net hosting service (asp.net without IIS), on server 2003 with IIS not installed, I get the following when trying to process a request. "System.DllNotFoundException: Unable to...
7
1718
by: abcd | last post by:
I have asp.net application which was tested and developed on asp.net 1.1. WIll my application work on asp.net 2.0 also. Can I say asp.net 2.0 is supported automatically for the applications which...
24
1795
by: Rob R. Ainscough | last post by:
I was reading yet another book on .NET - VB 2005 Professional (wrox) and read the statement; "Microsoft has staked their future on .NET and publicly stated that henceforth almost all their...
22
1662
by: tom c | last post by:
Would it be correct to say the VB is still the language most used for Dot Net programming, and C# the second most used?
11
2469
by: Paul Brady | last post by:
Apparently, I have been living on the wrong planet. I have written 15 databases in Microsoft Access in the past 10 years, some of which are split, one uses ODBC interface with a SQL server, one...
12
2020
by: Juan T. Llibre | last post by:
re: !I found an MSDN document that explains why what I'm trying to do should work Lee, From : http://www.w3.org/TR/REC-xml/ "A special attribute named xml:lang may be inserted in...
0
7265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7171
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7545
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7539
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5095
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4751
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1605
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
461
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.