Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dsnless connection
Message
 
À
03/12/2003 05:30:57
Philip Jones
Cornwall County Council
Truro, Royaume Uni
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
00855328
Message ID:
00863606
Vues:
16
Try passing the connection string into the open method of the connection object instead of setting the connection string property. Its worth a shot i guess. Otherwise, double check to make sure that the username has a sql server password set and is not set for windows authentication.

HTH

Eric

>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform