sahrom
asked on
Login failed for user 'sa'
I am following a example in a book. It is dealing with ASP, which covers this area well, but gives very little explanatin on installing sql 2000
I am using msde version, and installed it, it did not ask for a user, and so I am using the default - where do I go to check the user
with the asp snippet as such:
objConn.Open "Provider=SQLOLEDB;Persist Security Info=False;" & _
"User ID=sa;Initial Catalog=Movie;" & _
"Initial File Name=C:\MSSQL7\Database\Mo vie2000.md f"
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.
i really do not know where to go to fix this
THANks
I am using msde version, and installed it, it did not ask for a user, and so I am using the default - where do I go to check the user
with the asp snippet as such:
objConn.Open "Provider=SQLOLEDB;Persist
"User ID=sa;Initial Catalog=Movie;" & _
"Initial File Name=C:\MSSQL7\Database\Mo
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.
i really do not know where to go to fix this
THANks
ASKER
thank you very much for your reply
I now get the following error
Error Type:
ADODB.Connection (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/BegAsp/Connect.asp, line 29
-this is more of the code - or how i have it now:
Dim strDatabaseType
'Choose one of the following two lines, and comment out the other
'strDatabaseType = "Access"
strDatabaseType = "MSDE"
If strDatabaseType = "Access" Then
objConn.Open "Provider=Microsoft.Jet.OL EDB.4.0;" & _
"Data Source=C:\datastores\Movie 2000.mdb;" & _
"Persist Security Info=False"
Else
objConn.Open "Provider=SQLOLEDB.1;Passw ord="";Use r ID=sa;Initial Catalog=Movie;Data Source=CPQ12126180872"
End If
I now get the following error
Error Type:
ADODB.Connection (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/BegAsp/Connect.asp, line 29
-this is more of the code - or how i have it now:
Dim strDatabaseType
'Choose one of the following two lines, and comment out the other
'strDatabaseType = "Access"
strDatabaseType = "MSDE"
If strDatabaseType = "Access" Then
objConn.Open "Provider=Microsoft.Jet.OL
"Data Source=C:\datastores\Movie
"Persist Security Info=False"
Else
objConn.Open "Provider=SQLOLEDB.1;Passw
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
RaisinJ makes a good point:
>>Also, if you have a default install of SQL Server, the password for sa is blank, in your connection strings, "Password=;", you should not have to put double or single quotes. <<
Anotherwhat you can express an empty password is as follows:
objConn.Open "Provider=SQLOLEDB.1;User ID=sa;Initial Catalog=Movie;Data Source=CPQ12126180872"
>>Also, if you have a default install of SQL Server, the password for sa is blank, in your connection strings, "Password=;", you should not have to put double or single quotes. <<
Anotherwhat you can express an empty password is as follows:
objConn.Open "Provider=SQLOLEDB.1;User ID=sa;Initial Catalog=Movie;Data Source=CPQ12126180872"
Hello sahrom,
This is is a problem of authentication mode selected by default MSDE install as windows authentication mode. In ISQL it login without any user name and password.
Bcoz it is installed as windows autentication mode it does not give permission of login as SA and flesh back an error not trusted user.
U have to pass some paramiter to change the authentication mode while executing seup.exe of MSDE.
Hope this will help
Amit Jain
This is is a problem of authentication mode selected by default MSDE install as windows authentication mode. In ISQL it login without any user name and password.
Bcoz it is installed as windows autentication mode it does not give permission of login as SA and flesh back an error not trusted user.
U have to pass some paramiter to change the authentication mode while executing seup.exe of MSDE.
Hope this will help
Amit Jain
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
or refer to URL :
http://support.microsoft.com/default.aspx?scid=kb;en-us;285097
http://support.microsoft.com/default.aspx?scid=kb;en-us;285097
MSDE will accept any password you give it, but whether you need to use quotes or not is a different matter.
Have a look in your MSDE setup.exe directory, there should be a help file (HTML) which talks about how to run the install program (but it is very complicated).
The setup runs for me with just the sa password parameter, but if you want (need) to set the instance name, you here is an example of more parameters: (you want INSTANCENAME)
setup /upgradesp sqlrun INSTANCENAME= InstanceName SECURITYMODE=SQL UPGRADEUSER=AnAdminLogin UPGRADEPWD=AdminPassword DISABLENETWORKPROTOCOLS=1
Amit Jain
Have a look in your MSDE setup.exe directory, there should be a help file (HTML) which talks about how to run the install program (but it is very complicated).
The setup runs for me with just the sa password parameter, but if you want (need) to set the instance name, you here is an example of more parameters: (you want INSTANCENAME)
setup /upgradesp sqlrun INSTANCENAME= InstanceName SECURITYMODE=SQL UPGRADEUSER=AnAdminLogin UPGRADEPWD=AdminPassword DISABLENETWORKPROTOCOLS=1
Amit Jain
ASKER
thanks all for the information and links, they are all usefull
so the problem is not how I have the US ID and Passward, but the user
authentication mode
with my options listed by amit1979
so the problem is not how I have the US ID and Passward, but the user
authentication mode
with my options listed by amit1979
objConn.Open "Provider=SQLOLEDB.1;Passw