Results 1 to 2 of 2

Thread: getting ora 03113 end-of-file on communication channel while using Execute.Reader()

  1. #1
    guptashikha12 is offline VB.NET Forum Newbie
    .NET Framework
    .NET 4.0
    Join Date
    May 2011
    Posts
    1
    Reputation
    0

    getting ora 03113 end-of-file on communication channel while using Execute.Reader()

    Hi

    I need to call a piece of code again after a connection failure , below is my code

    Dim sqlstr As String
    Dim cnt As Integer = 0
    Dim cnt1 As Integer = 0
    Dim sleep_split As UInt64 = 0
    Dim loop_cnt As Integer = 0
    dbhb= New OracleConnection(odbcNG)
    Dim dr As OracleDataReader
    Dim cmd As New OracleCommand

    jump_here:
    Try
    If dbhb.State <> 1 Then
    dbhb.Open()
    End If
    Catch
    MsgBox("Unable to connect to database......Exiting ")
    Exit Sub
    End Try
    cmd.Connection = dbhb
    While (true)
    exit_flg = 0
    sqlstr = "select coulmn1 from table1"
    cmd.CommandText = sqlstr
    cmd.CommandType = CommandType.Text
    Try
    dr = cmd.ExecuteReader()
    If dr.Read Then
    cnt1 = dr.GetValue(0)
    Else
    MsgBox("Please populate data ......Exiting")
    Exit Sub
    End If
    dr.Close()
    sqlstr = "SELECT column1, column2 from table1"
    cmd.CommandText = sqlstr
    dr = cmd.ExecuteReader
    If dr.Read Then
    cnt2 = dr.GetValue(0)
    cnt3 = dr.GetValue(1)
    Else
    MsgBox("Please populate the service.....Exiting ")
    Exit Sub
    End If
    dr.Close()
    sqlstr = "update table set column1 = 'sdsad''"
    cmd.CommandText = sqlstr
    cnt = cmd.ExecuteNonQuery()
    Catch
    loop_cnt = loop_cnt + 1
    If loop_cnt < 10 Then
    Sleep(100)
    dr.Close()
    dr.Dispose()
    cmd.Connection.Close()
    cmd.Dispose()
    If dbhb.State = 1 Then
    dbhb.Close()
    End If
    GoTo jump_here
    End If
    MsgBox("Error.....EXITING TOOL")

    exit_flg = 1
    Exit Sub
    End Try

    End While

    when first time connection failure occurs, with the help of goto i m trying again to connect, but while trying again i am getting error ora: 03113 end-of-file on communication channel in the line shown in above code in bold.

    plz reply
    thanks

  2. #2
    Tecnoenredados is offline VB.NET Forum Newbie
    .NET Framework
    .NET 3.5
    Join Date
    Jun 2012
    Location
    Seville, Spain
    Posts
    3
    Reputation
    0
    Try to clean the connection, calling OracleConnection.ClearPool(dbhb)

    Regards

Bookmarks

Posting Permissions

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