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
 General SQL Server Forums
 New to SQL Server Programming
 Urgent: db connection problems

Author  Topic 

deulu
Starting Member

6 Posts

Posted - 2006-09-25 : 05:34:26
Hi
I have this major problem:

I used to use sql 7.0 with vb6 thru this line of code connection:
.ConnectionString = "Data Source=" & SQL_SRV & ";User ID=sa" & ";Initial Catalog= NorthWind" //no password

Through an executable file, i was able to run my program from different stations (LAN network; database sql at my station)

Lately, i shifted from 7.0 to sql 2005.
With the following line of code connection:
.ConnectionString = "Data Source=" & SQL_SRV & ";User ID=sa" & ";Password=****" & ";Initial Catalog= NorthWind"

or through windows authentication:
.ConnectionString = "Data Source=" & SQL_SRV & "; Initial Catalog=NorthWind; Trusted_Connection=yes"

if i run my executable file on my station, it works perfectly fine.
But when i try to run the executable file from any other station, the following occurs:

run-time error '-2147467259 (80004005)':

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.


Any clue where could be the problem?

Thanks

Rishi Maini SQL2K5 Admin
Yak Posting Veteran

80 Posts

Posted - 2006-09-25 : 06:05:35
Duplicate of http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=72493


Thanks
Rishi Maini
Go to Top of Page

sa
Yak Posting Veteran

77 Posts

Posted - 2006-09-26 : 01:20:28

use SERVER in the "DATA SOURCE" argument.
Go to Top of Page

sa
Yak Posting Veteran

77 Posts

Posted - 2006-09-26 : 01:23:41
or add the PASSWORD argument even if you have no password, just leave it blank. this is how it will look like PASSWORD=;
Go to Top of Page
   

- Advertisement -