I'm trying to reuse an ADO connection in a loop. The connection string
is different each time I go through the loop. My code is basically the
following:
Dim conn as ADODB.Connection
Do loop
_ conn = new ADODB.Connection
_ I use a case statement to set connection string
_ conn.open()
_ do stuff to database
_ conn.close
loop
Whenever I run the code however, I get the message "Data source rejected
establishment of connection" when it tries to open the second
connection. The source of the error is Microsoft OLE DB for ODBC
Drivers.
I think the problem is probably in my code. The description for the
message I'm getting is "The data source rejected the establishment of a
connection for implementation defined reasons."
Although I don't know if it will make any difference, here's a summary
of my environment. I coding in VB.NET. The target database is Navision
(from Microsoft Business Solutions). FYI - the Navision ODBC driver
prohibits me from using ODBC.NET.
Anyone have any ideas?
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!