Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: beginning asp 3.0 chapter 12


Message #1 by "Hope Kerr" <hak01@b...> on Mon, 18 Jun 2001 20:18:38
I am having a problem connecting to the movie2000.mdf database using the 

sql server 2000.  

This is my code



strDatabaseTpe="MSDE"

objConn.Open "Provider=SQLOLEDB;Data Source=Server;" & _

		             "Database=C:\datastores\Movie2000.mdf;" & _

		             "User ID=sa;Password=;"



where Server is my server name.



This is the error i am getting"



Cannot open database requested in login 'C:\datastores\Movie2000.mdf'. 

Login fails.

/

Message #2 by "Enzo" <enzo@t...> on Tue, 19 Jun 2001 04:40:40 +0800
Hi Hope!!! you mix all things up i now what you're tryin to do.  You 

mixed up with using Access as your database with SQL dbase.  When you 

would like to use the Movie2000.MDF use the code below:



objConn.Open "Provider=3DSQLOLEDB;Persist Security Info=3DFalse;" & _

               "User ID=3Dsa;Initial Catalog=3DMovie;" & _

               "Initial File Name=3DC:\MSSQL7\Data\Movie2000.mdf"



If you would like to use Movie2000.MDB (Access file) use the code:



objConn.Open "Provider=3DMicrosoft.Jet.OLEDB.4.0;" & _

               "Data Source=3DC:\datastores\Movie2000.mdb;" & _

               "Persist Security Info=3DFalse"



Don't mix things up because Access files can be placed anywhere on your 

hard drive BUT the MDF file must only resides in one common folder.  I 

think c:\MSSQL7\Data is the default folder.



To make things easier just follow the instructions on the book after it 

works then it is the time you'll experiment with your code =3D)



I hope this helps =3D)



Enzo

ICQ# 36446068

http://enzoy.cjb.net

  ----- Original Message -----

  From: Hope Kerr

  To: ASP Database Setup

  Sent: Monday, June 18, 2001 8:18 PM

  Subject: [asp_database_setup] beginning asp 3.0 chapter 12





  I am having a problem connecting to the movie2000.mdf database using 

the

  sql server 2000. 

  This is my code



  strDatabaseTpe=3D"MSDE"

  objConn.Open "Provider=3DSQLOLEDB;Data Source=3DServer;" & _

               "Database=3DC:\datastores\Movie2000.mdf;" & _

               "User ID=3Dsa;Password=3D;"



  where Server is my server name.



  This is the error i am getting"



  Cannot open database requested in login 'C:\datastores\Movie2000.mdf'. 



  Login fails.

  /




  Return to Index