I have an asp site which I am constructing and I have finished the database design and such. Now I want to start connecting to the DB using ASP. This is my first time doing this with SQL server. I keep getting this error:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database requested in login 'AdultMatch'. Login fails. /Match/sessionid.asp, line 10
Her is the script that runs this database (its asp):
set conn = Server.CreateObject("ADODB.CONNECTION") conn.Open "dsn=AdultMatch" dim UserIP UserIP= request.servervariables("REMOTE_ADDR") dim MySQL MySQL = "Execute sproc_getSID '" & UserIP & "'" SET ORS = conn.Execute (MySQL) ' creates and executes the recordset SID = ORS("SID") 'Gets the SID value from the recordset ORS.Close 'close the recordset set conn = nothing 'close the connection
I have no idea what is wrong. I have registered the DNS on the system. There is no uname and pwd as far as I am concerned. Does this mean I have to setup a new user in SQL Server? The setting on the systems ODBC is that it connects with "Windows NT authentication using network login ID"
I have no idea on the security issues with SQL and how to set them.
Ok well I was mesin around and boom finally I got it. Thanks your tip helpd. I made a new user, there was one before but it was the database administrator. I made one for the usrs. Then I still counldnt get it but then I went back to the ODBC connector in win. Then changed the uname and pass and sure enough that did it.