SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Database is not connecting with ASP...
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

huge
Starting Member

Canada
31 Posts

Posted - 07/31/2001 :  11:15:01  Show Profile  Send huge an ICQ Message  Reply with Quote
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.

Thanks for any help
Mike M

JustinBigelow
SQL Gigolo

USA
1157 Posts

Posted - 07/31/2001 :  11:19:50  Show Profile  Reply with Quote
Do you have a user in the actual database mapped to the either the WinNT login or SQL Server login? You have to have a user in the db before you can actually open the database.

Justin

Go to Top of Page

huge
Starting Member

Canada
31 Posts

Posted - 07/31/2001 :  11:41:35  Show Profile  Send huge an ICQ Message  Reply with Quote
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.

Thanks man
Mike M

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000