I'm programming a VB.NET application connected with an oracle database. randomly it gives me an ora-01458 error (invalid length inside variable character string)
on the OTN web site they say to "Increase the buffer size or use a different type" and this is caused by "An attempt was made to bind or define a variable character string with a buffer length less than the minimum requirement"
but the error is detected randomly... I use, for example, a spid detection function... sometimes i have the error and sometimes not... here is the function :
Public Function SpidConnection(ByVal poCon As OracleConnection) As Long
Dim sSql As String
Dim cn As OracleConnection
Dim cmd As OracleCommand
Dim sReturnValue As String
'BAtit la requete
sSql = "SELECT USERENV('sessionID') sessionID FROM DUAL"
cn = poCon
'SET UP THE SqlCommand OBJECT
cmd = New OracleCommand()
cmd.Connection = cn
I once get exactly the same error as you got. I use VB.Net to connect to 9i database. If I use the driver come along with the database, I get this error randomly. However, after I changed to use ODP.Net, the error disapper.
Obviously, your case is a bit different as you use 8i but not 9i. I think ODP.Net also work for 8i database but you will need Oracle Client (126.96.36.199.0) and Oracle Net (188.8.131.52.0). You can try to use ODP.Net.