HighTechTalks DotNet Forums  

Reopenning ADODB Connection

Dotnet Framework (ODBC.net) microsoft.public.dotnet.framework.odbcnet


Discuss Reopenning ADODB Connection in the Dotnet Framework (ODBC.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Bob Laflin
 
Posts: n/a

Default Reopenning ADODB Connection - 05-21-2004 , 08:25 AM






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!

Reply With Quote
  #2  
Old   
carlos saraiva
 
Posts: n/a

Default Re: Reopenning ADODB Connection - 06-24-2004 , 07:19 AM






Have you been able to solve the problem yet ?
I have a similar situation myself where my asp site supplies the same
error message;

"Data source rejected
establishment of connection"

Yet not all the time, it does connect rather sucessfully with 1-5 users,
but still bombs out occasionally. Usually after getting the error, and
refreshing after 20 seconds, it works again.

I am also connecting to a navision database, but am using classic not
.net asp.

If you have found a solution to this or know more about how or why the
error is caused please let me know.

Regards
Carlos Saraiva


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #3  
Old   
Marco Morreale
 
Posts: n/a

Default Re: Reopenning ADODB Connection - 10-18-2004 , 03:12 AM



I am experiencing the same problem:
ERROR [08004] [Microsoft Business Solutions ApS][Microsoft Business
Solutions-Navision ODBC Driver]Data source rejected establishment of
connection

I'm accessing Navision Db (ver. 3.7) from .NET web application.

Did you find out anything?

Marco


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.