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
- dim dr, dr1 as FbDataReader
- dr = reader("select * from net_saldo where b.codigo=" & user)
- If dr.Read() Then
- dr1 = reader("Select out,pc from net_ac where user=" & user)
- While dr1.Read
- l.Items.Add(Format(dr1.GetDateTime(0), "dd/MM/yyyy") & " - " & dr1.GetString(1))
- End While
- Else
- l.Items.Add("Saldo: R$ 0,00")
- End If
Expand|Select|Wrap|Line Numbers
- Public Function reader(ByVal sql As String) As FbDataReader
- Dim cm As New FbCommand
- cm.Connection = fb
- cm.CommandText = sql
- reader = cm.ExecuteReader
- End Function
"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.