Hi Group, I am facing some problem with ADO.Net+Oracle Desc: I have a simple client server 2 tier application where my client(VB.NET App) connects to Oracle server using ADO.Net(OldDB). It is working fine, but problem comes in, when in case while the application is working and we have a network outage(LAN Connections broken) then after the outage is over the application is not able to connect to it's Oracle server. We have to restart the application and then during startup application builds it's new connection with Oracle server.
Things which we have checked: In case of network outage, WE can see the User session made at server end and that becomes Inactive and the particular session is killed by server as per it's configuration. Need a way, that when ever there is a outage, the application should connect to the Oracle automatically without being forced to restart. FYI..enclosing the code to make the DB Connection Public Function gGetDataSet(ByVal strSQL As String, ByRef strOraErr As String, ByRef strErr As String, Optional ByVal acTable As String = "", Optional ByRef LngRowAffected As Long = 0) As DataSet Dim ObjConn As OracleConnection 'Define Oracle Connection Object Dim ObjDA As OracleDataAdapter 'Define Oracle Data Adpter Object Dim ObjDS As New DataSet() LngRowAffected = 0 Try ObjConn = New OracleConnection(SQL_CONNECTION_STRING) ObjDA = New OracleDataAdapter(strSQL, ObjConn) If acTable = "" Then ObjDA.Fill(ObjDS, "table1") LngRowAffected = ObjDA.Fill(ObjDS) Else ObjDA.Fill(ObjDS, acTable) End If Return ObjDS Catch OraEx As OracleException strOraErr = OraEx.Message Catch ex As Exception strErr = ex.Message Finally ObjConn = Nothing ObjDS = Nothing ObjDA = Nothing End Try End Function Thanks, Amit Sinha =================================== This list is hosted by DevelopMentor® http://www.develop.com Some .NET courses you may be interested in: Essential .NET: building applications and components with CSharp August 30 - September 3, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com