|
-
Feb 17th, 2001, 02:04 PM
#1
Thread Starter
Junior Member
Hi
I bought some cheap web space the other day on an NT server so I could play around with ASP and databases.
I am trying to upload an Access database - ( I'll use SQl server once i know what I'm doing
The company gave me this as an instruction
"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.mappath("/")\ &
"<dbname>.mdb;DefaultDir=" & Server.mappath("/")\ & "
\<username>;DriverId=25;FIL=MS
Access;MaxBufferSize=512;PageTimeout=5;UID=<username>;PWD=mypassword"
(the above must be placed on one line)
The idea is that I put the above in ADO connection string so saying that my db is called DBtest.mdb and my username is mfoster, how should I fill out my connection string and do I upload the mdb file to my mfoster root directory on the server
i can't get my head around the mappath function so I'm not sure what I should be filling in !
I hope this makes sense to someone
thanks
Mark
-
Feb 17th, 2001, 08:43 PM
#2
Hyperactive Member
I use this connection string to connect to my database. Make sure you rename db.mdb to your database name, and the username and password appropriatly.
Code:
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DBQ=" & Server.Mappath("db.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};UID=USERID;PWD=PASSWORD"
if you have anymore questions, just reply.
-
Feb 19th, 2001, 05:14 AM
#3
Thread Starter
Junior Member
Hi
That worked perfectly - many thanks
Mark
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|