Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2003
    Posts
    5

    Unanswered: ora-01458 random error

    Hi,

    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"

    Try

    cn = poCon

    'SET UP THE SqlCommand OBJECT
    cmd = New OracleCommand()
    cmd.Connection = cn

    cmd.CommandType = CommandType.Text
    cmd.CommandText = sSql

    sReturnValue = cmd.ExecuteScalar()

    Return sReturnValue

    Catch e As IOException
    MsgBox(e.Message)
    Finally
    cmd = Nothing
    End Try


    End Function

  2. #2
    Join Date
    Jul 2003
    Location
    Hong Kong
    Posts
    56
    What driver do you use to connect to Oracle?
    Cheers,
    Shev

  3. #3
    Join Date
    Jul 2003
    Posts
    5

    drivers

    I Use the driver that come with oracle 8.1.7 (8i) with oracleClient for .net framwork.

  4. #4
    Join Date
    Jul 2003
    Location
    Hong Kong
    Posts
    56
    Hi dogbert,

    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 (9.2.0.1.0) and Oracle Net (9.2.0.1.0). You can try to use ODP.Net.

    HTH
    Cheers,
    Shev

  5. #5
    Join Date
    Jul 2003
    Posts
    5

    thanks

    thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •