Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hi, i am trying to set up an OLEDB

Status
Not open for further replies.

nat35

Programmer
Nov 10, 2002
86
AU
hi,
i am trying to set up an OLEDB
connection string and i am having some problems...
CONN_STRING = "Provider=SQLOLEDB;Data Source= 10.1.1.50;Initial Catalog=intranet;"
CONN_USER = "sa"
CONN_PASS = ""
And it is kicking back the following error

Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNMPNTW]Specified SQL server not found.
I am fairly new at this so your help would be greatly appreciated..
thanks..
nat


 
Hi there


First your provider should be con.Provider = "SQLOLEDB.1" shouldn't it??
And secondly have u got a server name as opposed to the ip address? I'm not sure if that's even an issue tho ... although I find it's best to use (local) for the datasource especially if your asp pages are on the same server as the database.

Try this

CONN_STRING = "Provider=SQLOLEDB.1;Data Source=(local);Initial Catalog=Intranet;User ID=SA;Password="

Transcend
 
ok now got absolutely confused what do you mean by local
in my situation I have sqldatabase on apps_server(server name ) and my asp
on web_server I publish my web to web_server from frontpage which is on my local machine
by the way I’ve tried name server instead of ip address and I had the same error
sorry I feel so stupid may be you know same articles to read first
 
Hi there,

all that local means is if you have the asp pages on the same physical server as the database ...

Your provider of SQOEDB should be SQLOLEDB.1

See what happens when you change that

Transcend
 
hi Transcend,
I ve changed provider to sqoedb.1 and ip address to the name of server so it does not work.still the same error
nat
 
Hi there ... damn formatting

should be S Q L O L E D B . 1 without the spaces ..

Transcend
 
What version of SQL are u running,

is it by any chance the desktop version of SQL 7?

Transcend
 
Also .. put a stop in your code at this line

CONN_PASS = ""

and then tell me what your connection string comes up as ... i assume that you are adding Conn_User and Conn_Pass to the connection string at some point?

Transcend
 
hi again,
i fixed my problem it had somethign to do with the network library. both systems are
not using the same.I've added extracode
CONN_STRING = "Provider=SQLOLEDB.1;Network Library=DBMSSOCN;Data Source=xx.x.x.xx,1433;Initial Catalog=Intranet;User ID=SA;Password="
thank you for your time Transcend
nat
 
I see your trying to use a DSNless connection. First of all SQLServers use the computer name to indentify itself. Here's a connect string that works.

ConnectString = "Provider=S Q L O L E D B; DATA SOURCE=(Computer name where SQLServer exists);UID=sa;PWD=;DATABASE=(Database name) "

Remove the spaces from S Q L O L E D B
Make sure that sa has permissions or authors the database your connecting to

-Ellen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top