iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > Classic ASP

Reply
 
LinkBack Thread Tools
Old August 9th, 2005, 05:03 PM   #1
Reputable Member
 

Join Date: Sep 2004
Posts: 139
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 JohnMitch is on a distinguished road
Relative linking to Access...

My problem that I am having is that I have always used a DNS for my databases and I haven't ever done this before. Here is my problem.

I need index.asp to submit a form to Data.mdb . Data.mdb is in the same folder as index.asp so all I need is a relative link (I believe). I have tried using the tutorial on this but have had no luck. My database has a password on it so lets just call that DUCK. Anyone that can give me the code for this will be forever in my gratitude.

Thanks guys!
JohnMitch is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 9th, 2005, 07:21 PM   #2
Reputable Member
 

Join Date: Aug 2003
Location: United Kingdom
Posts: 339
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 D3mon is on a distinguished road
I usually use something like:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("mydb.mdb")

be aware though that hvaing the database in the root of folder means it is exposed to the possiblity of being directly downloaded. Best to place it in a non-public folder.
D3mon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 9th, 2005, 07:51 PM   #3
Reputable Member
 

Join Date: Sep 2004
Posts: 139
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 JohnMitch is on a distinguished road
Yeah, I am not worried about people downloading my database as this particular one has nothing of value or use to them inside of it.

Thanks for your help D3mon, but how do I add the password to this to open it? I've been trying this:
Code:
Set connectionToDatabase=Server.CreateObject("ADODB.Connection")
ConnectionToDatabase.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("MYDB.mdb") & _
						  "Password=DUCK;"
What this does is it adds Password=DUCK to the end of the databse name instead of unlocking the dern thing. Any suggestions with this?
JohnMitch is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 9th, 2005, 07:55 PM   #4
Reputable Member
 

Join Date: Aug 2003
Location: United Kingdom
Posts: 339
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 D3mon is on a distinguished road
http://www.connectionstrings.com suggest:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("mydb.mdb") & ";User Id=[username here];Password=[password here];"
D3mon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 10th, 2005, 03:49 AM   #5
WebForumz Admin Badge
 

Join Date: Jul 2003
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 113 Webforumz Staff is on a distinguished road
Personally I've never had any luck using a password with Access, but maybe I just never did it right.

Funny, I avoided SQL Server for years thinking it was intimidating, but in now think it's easier than Access. (Not that you're using it for that reason)
Webforumz Staff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 10th, 2005, 04:24 AM   #6
Highly Reputable Member
 
benbacardi's Avatar
 

Join Date: Feb 2004
Location: United Kingdom
Age: 21
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 benbacardi will become famous soon enough
just add a semi colon before the world Password in your string...
benbacardi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 10th, 2005, 11:19 AM   #7
Reputable Member
 

Join Date: Sep 2004
Posts: 139
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 JohnMitch is on a distinguished road
Thanks Guys. Finally got the dern thing working!
JohnMitch is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
relative , linking , access


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
relative linking in php sudhakararaog PHP 1 March 12th, 2008 09:43 PM
ASP Multi users Access to Microsoft Access ish Classic ASP 0 April 26th, 2007 05:05 PM
Is it possible to position something relative something else? the newbie web designer HTML, XHTML and CSS 7 February 22nd, 2007 03:04 PM
Access: linking queries djme Databases 0 October 7th, 2006 04:24 PM
can layers be relative? warmer HTML, XHTML and CSS 0 November 8th, 2005 03:42 PM


Search Engine Optimization by vBSEO 3.2.0 RC8