Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: MSDE


Message #1 by "Enzo" <enzo@t...> on Mon, 18 Jun 2001 23:24:26 +0800
Hi!!!  Good day to all!!!



I'm using MSDE.  On the sample code in the book (Beg ASP 3) the code for 

the connection is:



        objConn.Open "Provider=3DSQLOLEDB;Persist Security 

Info=3DFalse;" & _

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

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



When I try I move the mdf file to another folder then change of course 

the path on the code, the code doesn't work.  I only works on the 

specified path above.  why is it like that???  Is it a must to put the 

mdf files in this specified folder only??? I have tried doing this using 

MDB file and it worked.  I can place my dbase anywhere.  Any 

difference???  Please help me figure this out and help to clear things 

out I'm confused.



Thanks



Enzo



Message #2 by "Gerhard Wentink" <data@w...> on Mon, 18 Jun 2001 20:13:29 -0700
I think you must understand that there is a  difference between SQL server

and Access. SQL server is (as in the name) a server. SQL server of course

stores information on a hard disk, but this isn't accessable directly, only

through client applications (like the Query Analyzer) that talk to the

server application through a network protocol (e.g. TCP/IP).

The OLEDB provider talks to the server too. SQL server knows where the files

are stored. With the connection string you tell the OLEDB provider which

database on which machine must be used.

I usually use a connection like this: "Provider=SQLOLEDB; Data

Source=Servername; Initial Catalog=Databasename; User Id=sa; Password= "

Data Source is the name of your SQL server (normally the same name as the

machine it is installed on).

SQL server knows where to look for the files. If you move the files by hand.

SQL server does not know where the files are. That's what is happening on

your machine.

I hope this makes sense



Regards,



Gerhard Wentink



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

From: "Enzo" <enzo@t...>

To: "ASP Database Setup" <asp_database_setup@p...>

Sent: Monday, June 18, 2001 8:24 AM

Subject: [asp_database_setup] MSDE





Hi!!!  Good day to all!!!



I'm using MSDE.  On the sample code in the book (Beg ASP 3) the code for the

connection is:



        objConn.Open "Provider=SQLOLEDB;Persist Security Info=False;" & _

               "User ID=sa;Initial Catalog=Movie;" & _

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



When I try I move the mdf file to another folder then change of course the

path on the code, the code doesn't work.  I only works on the specified path

above.  why is it like that???  Is it a must to put the mdf files in this

specified folder only??? I have tried doing this using MDB file and it

worked.  I can place my dbase anywhere.  Any difference???  Please help me

figure this out and help to clear things out I'm confused.



Thanks



Enzo





---

STAY UP TO DATE ON ASP.NET, C#, VB.NET, SQL and XML

Developersdex indexes over 100 of the top ASP, SQL, VB

and XML sites bringing in more than 5,000 new resources

every day.  They even integrate all the top .NET

newsgroups so you can search/post/reply across

multiple newsgroups within their site.  The next time

you want to find an answer on ASP, C#, SQL, VB or XML

think of Devdex!  http://www.developersdex.com/




$subst('Email.Unsub')







Message #3 by "Enzo" <enzo@t...> on Tue, 19 Jun 2001 02:51:48 +0800
Hello Gerhard!!!!  Yah you're right I have figure it out a while ago.  I 

tried making a UDL file to see how would it make the connection and I 

found out that there is a certain folder only for the database to be 

placed inorder that SQL can find it.  Thank you very much for 

explanation, you have supported my observation.



thank you very much!!!!



Enzo

ICQ# 36446068

http://enzoy.cjb.net


  Return to Index