|
 |
asp_databases thread: database connection
Message #1 by "Elizabeta Siljanovski" <elizabetas@m...> on Fri, 7 Dec 2001 22:32:11 -0500
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0001_01C17F6F.0435D9E0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi everybody!
I have a code that should compare values entered by user to the values
in database. When the second page is called, I get the following error:
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
Cannot open database requested in login 'TechStatus.mdb'. Login fails.
/RoomsStatus/CheckLogin.asp, line 7
This is the code:
Dim Connection
set Connection = Server.CreateObject("ADODB.Connection")
Connection.Open "Provider=SQLOLEDB; Data Source=server.adress.bla.blah;
" & _
"Initial Catalog= database.mdb; User ID=myid; " & _
"Password=mypassword"
any ideas?
Thanks!
Message #2 by "Kim Iwan Hansen" <kimiwan@k...> on Sat, 8 Dec 2001 05:10:57 +0100
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0002_01C17FA6.B888DB40
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
hold on a second, you're using a sql server connection string for an access
database? i wouldn't think that was legitimate, but then again, I don't
want to say it isn't when i'm not 100% sure.
try and use the appropriate connection string for access instead:
DBase = server.mappath("database.mdb")
cnAdmin = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= " & DBase
otherwise, if it's really supposed to work with the string you're using, the
problem is your username/password.
-Kim
-----Original Message-----
From: Elizabeta Siljanovski [mailto:elizabetas@m...]
Sent: 8. december 2001 04:32
To: ASP Databases
Subject: [asp_databases] database connection
Hi everybody!
I have a code that should compare values entered by user to the values in
database. When the second page is called, I get the following error:
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
Cannot open database requested in login 'TechStatus.mdb'. Login fails.
/RoomsStatus/CheckLogin.asp, line 7
This is the code:
Dim Connection
set Connection = Server.CreateObject("ADODB.Connection")
Connection.Open "Provider=SQLOLEDB; Data Source=server.adress.bla.blah; "
& _
"Initial Catalog= database.mdb; User ID=myid; " & _ "Password=mypassword"
any ideas?
Thanks!
$subst('Email.Unsub').
Message #3 by "Ken Schaefer" <ken@a...> on Sat, 8 Dec 2001 15:43:10 +1100
|
|
Initial Catalogue should be the name of the SQL Server database, not the
name of the .mdf file.
Alternatively, if you're trying to connect to an Access database, do what
Kim suggested.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Elizabeta Siljanovski" <elizabetas@m...>
Subject: [asp_databases] database connection
: Hi everybody!
:
: I have a code that should compare values entered by user to the values
: in database. When the second page is called, I get the following error:
:
: Error Type:
: Microsoft OLE DB Provider for SQL Server (0x80004005)
: Cannot open database requested in login 'TechStatus.mdb'. Login fails.
: /RoomsStatus/CheckLogin.asp, line 7
:
: This is the code:
:
: Dim Connection
: set Connection = Server.CreateObject("ADODB.Connection")
: Connection.Open "Provider=SQLOLEDB; Data Source=server.adress.bla.blah;
: " & _
: "Initial Catalog= database.mdb; User ID=myid; " & _
: "Password=mypassword"
:
: any ideas?
:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #4 by "Elizabeta Siljanovski" <elizabetas@m...> on Fri, 7 Dec 2001 23:46:04 -0500
|
|
I mixed up the ways to call Access/SQL server.
I think it works now (there is no output for this yet so I'm not 100%
sure but it's not reporting any errors so I'm guessing it's fine.
Thank you all!!
-----Original Message-----
From: Ken Schaefer [mailto:ken@a...]
Sent: Friday, December 07, 2001 11:43 PM
To: ASP Databases
Subject: [asp_databases] Re: database connection
Initial Catalogue should be the name of the SQL Server database, not the
name of the .mdf file.
Alternatively, if you're trying to connect to an Access database, do
what
Kim suggested.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Elizabeta Siljanovski" <elizabetas@m...>
Subject: [asp_databases] database connection
: Hi everybody!
:
: I have a code that should compare values entered by user to the values
: in database. When the second page is called, I get the following
error:
:
: Error Type:
: Microsoft OLE DB Provider for SQL Server (0x80004005)
: Cannot open database requested in login 'TechStatus.mdb'. Login fails.
: /RoomsStatus/CheckLogin.asp, line 7
:
: This is the code:
:
: Dim Connection
: set Connection = Server.CreateObject("ADODB.Connection")
: Connection.Open "Provider=SQLOLEDB; Data
Source=server.adress.bla.blah;
: " & _
: "Initial Catalog= database.mdb; User ID=myid; " & _
: "Password=mypassword"
:
: any ideas?
:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$subst('Email.Unsub').
|
|
 |