473,672 Members | 2,629 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_obje ct..

this makes no sense at all..

.... please help.
Apr 17 '08 #1
4 1260
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(For mat(dr1.GetDate Time(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
7265
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 school. When I tried to open it in the lab, I got a message saying I couldn't open it because it was created with a newer version. Evidently the lab is using Visual Studio.Net 2002. My professor doesn't just want the executable file, he wants...
9
3117
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
3326
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 speed. I like books with practical exercises, and also with test questions (like cert books) *2*
14
1733
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) Currently I have several customers with .Net web applications I've written. If I upgrade to VS2005 and go to update these applications, will VS2005 assume .Net 2.0 and use whatever new syntax or properties? Or keep it on my current version?
22
3278
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 load DLL (aspnet_isapi.dll)." Of course the dll is able to be found, it's still in the framework directory and for grins I even put it in my service's local directory. This is apparantly server 2003 not allowing asp.net to be run if IIS was not...
7
1723
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 are written for asp.net 1.1 thanks
24
1813
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 research and development will be done on this platform. It is expected that, eventually, almost all Microsoft products will be ported to the .NET platform." So I thought about this statement for a minute -- then I realized that I have ALL...
22
1682
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
2485
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 has a many-to-many relationship, and all of which have Basic code to handle events and run functions which I have coded, and all this time have never heard of .Net -- until today. So, I looked it up on Google, asking for Access and .Net and got...
12
2046
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 documents to specify the
0
8423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8852
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8649
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7482
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6261
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5725
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2098
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1843
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.