Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dsnless connection
Message
From
03/12/2003 05:30:57
Philip Jones
Cornwall County Council
Truro, United Kingdom
 
 
To
All
General information
Forum:
ASP.NET
Category:
Databases
Title:
Dsnless connection
Miscellaneous
Thread ID:
00855328
Message ID:
00855328
Views:
59
Can anyone see what's wrong with this pls?

------------------------------------------------------
Dim sServer
Dim sDatabase
Dim sUserName
Dim sPassword
Dim oConn
Dim oCmd

sServer = "XX.XX.XX.XX"
sDatabase = "databasename"
sUserName = "username"
sPassword = "XXXXXXXX"

Set oConn = Server.CreateObject("ADODB.Connection")

oConn.ConnectionString = "DRIVER={SQL Server};SERVER=" + sServer + _
";UID=" + sUserName + _
";PWD=" + sPassword + _
";DATABASE=" + sDatabase
Set oCmd = Server.createObject("ADODB.command")
oConn.Open
----------------------------------------------------

I am getting 'Login failed for user'username'.

I can get into the sql server via query analyser with the same username and password. I don't understand why I can't get in from the asp.
Next
Reply
Map
View

Click here to load this message in the networking platform