I'm getting an error on my connection string. The error says The connectiong property is invalid. It also says it must be IsGeneric. Not sure what I'm missing and I'v searched IBM's site.. It was not much help. The reason I want to put a lifetime on connection is to prevent object locks. I can use the pooling=False but it slows the process down establishing the connection over and over. Here is the code.
Public Class clsIBM_D2
Public LiveOrTest As String
Public Function Friedman_ExecuteNonQuery(ByVal strSQL As String, ByRef ErrorReason As String, ByVal strDiv As String, ByVal strWh As String) As Boolean
Dim blnResponse As Boolean = False
Dim strConnection As String
If LiveOrTest = "LIVE" Then
strConnection = "DataSource=10.10.16.16;userid=LIVEXML;password=LIVE1;DefaultCollection=EXTRANET;Connection Lifetime=60;"
strConnection = "DataSource=10.10.16.16;userid=TSTXML;password=TEST1;DefaultCollection=EXTRANETST;Connection Lifetime=60;"
Dim myConnection As New iDB2Connection(strConnection)
Dim myCommand As New iDB2Command(strSQL, myConnection)
blnResponse = True
Catch ex As Exception
' Log Error
ErrorReason = ex.Message
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!