ADO DB Connection to SQL Server (ASP.Net)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I'm attempting to connect to a SQL Server DB, using ADO, from my new ASP.NET
web application. I can use the same connect string from within a VB.Net app
(windows app) just fine, but I cannot do it from within my web app... Here
is the error I am receiving:

Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection.

I am using windows authentication, which works just fine within my windows
app - I'm using the web server on my local machine... Here is my connect
string and code associated with this:

sDatabaseType = "SQL Server"
sServerName = "MyServer"
sDatabaseName = "MyDatabase"sConnectString = "DRIVER={SQL
Server};SERVER=" & sServerName & ";Trusted_connection=yes;DATABASE=" &
sDatabaseName & ";"
gdcDataConnection = New ADODB.Connection
gdcDataConnection.Open(sConnectString)

I would appreciate any help that you can provide!!!!!
Thank you!-Valerie
.


Quantcast