Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 .exe connection to database

Author  Topic 

Steve2106
Posting Yak Master

183 Posts

Posted - 2011-03-30 : 15:27:52
Hi There,

I have created an .exe that connects to a SQL Server 2005 Database.
The .exe program can be run with a parameter or without.
It runs perfect when I double click on it and returns everything it should from the sql database.
When I call the program from an asp.net web application the program runs perfectly but does not connect to the sql database.
It gives a connection error. What I cannot understand is why does it connect when I run the program independantly but when called from the web app it receives a connection error.

Does anyone know why this may be happening?

Thanks for the help.

Best Regards,


Steve

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-03-30 : 15:34:49
Please post the error.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Steve2106
Posting Yak Master

183 Posts

Posted - 2011-03-31 : 11:42:18
Hi There,
Thanks for the reply.

This is the error code:

Connection failed:
SQLState: '01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBMSLPCN]ConnectionOpen (ConnectO).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBMSLPCN]SQL Server does not exist or access denied.

Best Regards,

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-03-31 : 12:49:52
Please see this blog post regarding how to troubleshoot it: http://weblogs.sqlteam.com/tarad/archive/2008/05/23/60609.aspx

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -