StingRayYellow0
New Member
Hello. I’m developing a .NET 3.5 integration with TakeStock, and can successfully read data with the Progress Openedge 10.1B Driver. My integration creates several hundred ODBC calls thruout the day, and takes special care to close and dispose of each connection after each use. I’ve noticed that if I open\close too many connections, I receive an error:
System.Data.Odbc.OdbcException: ERROR [08S01] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Socket closed.
I’ll see this error for EVERY connection I attempt to connect, until I kill & restart the application.
Is there a limit that I’ve reached? Please send me a suggestion on how to bypass this issue. My ODBC connection code is below.
Thank you for reading.
System.Data.Odbc.OdbcException: ERROR [08S01] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Socket closed.
I’ll see this error for EVERY connection I attempt to connect, until I kill & restart the application.
Is there a limit that I’ve reached? Please send me a suggestion on how to bypass this issue. My ODBC connection code is below.
Thank you for reading.
Code:
[FONT=Courier New][FONT=Courier New]
[FONT=Courier New] [COLOR=#2b91af]DataTable[/COLOR] EmpDT = [COLOR=blue]new[/COLOR] [COLOR=#2b91af]DataTable[/COLOR]();[/FONT]
[FONT=Courier New] [COLOR=#2b91af]OdbcDataAdapter[/COLOR] EmpAdapter = [COLOR=blue]new[/COLOR] [COLOR=#2b91af]OdbcDataAdapter[/COLOR]();[/FONT]
[FONT=Courier New] [COLOR=#2b91af]OdbcConnection[/COLOR] DBConSelect = [COLOR=blue]new[/COLOR] [COLOR=#2b91af]OdbcConnection[/COLOR]([/FONT][COLOR=maroon][FONT=Times New Roman]"uid=reports;pwd=pwd;Driver={Progress Openedge 10.1B Driver};host=supnt04;port=2525;db=domdata;persist security info=true"[/FONT][/COLOR][FONT=Courier New]);[/FONT]
[FONT=Courier New] [COLOR=#2b91af]OdbcCommand[/COLOR] SelectCommand = [COLOR=blue]new[/COLOR] [COLOR=#2b91af]OdbcCommand[/COLOR]();[/FONT]
[FONT=Courier New] SelectCommand.CommandText = [/FONT][COLOR=maroon][FONT=Times New Roman]"[/FONT][/COLOR][COLOR=#a31515][FONT=Courier New]SELECT * FROM smphonehdr[/FONT][/COLOR][COLOR=maroon][FONT=Times New Roman]"[/FONT][/COLOR][FONT=Courier New];[/FONT]
[FONT=Courier New] SelectCommand.CommandType = [COLOR=#2b91af]CommandType[/COLOR].Text;[/FONT]
[FONT=Courier New] SelectCommand.Connection = DBConSelect;[/FONT]
[FONT=Courier New] EmpAdapter.SelectCommand = SelectCommand;[/FONT]
[FONT=Courier New] EmpAdapter.SelectCommand.CommandTimeout = myServerTimeoutSeconds;[/FONT]
[FONT=Courier New] EmpAdapter.Fill(EmpDT);[/FONT]
[FONT=Courier New] SelectCommand.Dispose();[/FONT]
[FONT=Courier New] DBConSelect.Close();[/FONT]
[FONT=Courier New] DBConSelect.Dispose();[/FONT]
[FONT=Courier New] EmpAdapter.Dispose();[/FONT]
[FONT=Courier New] [COLOR=blue]return[/COLOR] EmpDT;[/FONT]
[/FONT][/FONT]