Well, there's something wrong here. Your line of code is:
"Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
But the result of Response.Write is:
Data Source=xxxx01;Integrated Security=SSPI
I doubt your server is really called "xxxx01" is it?
Doh! Sorry 'bout that. Here's the output:
Provider=SQLOLEDB;Data Source=xxxx01;Integrated Security=SSPI;Initial
Catalog=qdb
Move the Open statement to a line that follows the response.end
statment (e-mail address removed) wrote:
Obviously I'm doing something wrong. Here's my code:
<%
dim demopath
Set demoConn = CreateObject("ADODB.Connection")
demoPath="Provider=SQLOLEDB;" & _
"Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
"Initial Catalog=qdb"
demoConn.open demoPath
response.write demopath
response.end
%>
BTW, thanks for all the help Bob.
Bob Barrows [MVP] wrote:
Assign the connection string to a variable and response.write the
contents of that variable:
dim constr
constr="provider= ..."
response.write constr
response.end
dim cn
etc
(e-mail address removed) wrote:
I'm not sure the response.write worked but here's the output:
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist
or access denied.
/test3.asp, line 6
Bob Barrows [MVP] wrote:
(e-mail address removed) wrote:
Aha! Now I can see the logon credentials. Per your
suggestion, I tried to write.response my connect string, but
got the same error. Here's what I tried:
response.write demopath
So what was the result?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my
From header is my spam trap, so I don't check it very often. You
will get
a quicker response by posting to the newsgroup.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap
so I don't check it very often. If you must reply off-line, then
remove the "NO SPAM"
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so
I don't check it very often. If you must reply off-line, then remove
the "NO SPAM"
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"