Relative linking to Access...

This is a discussion on "Relative linking to Access..." within the Classic ASP section. This forum, and the thread "Relative linking to Access... are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Aug 9th, 2005, 20:03
Reputable Member
Join Date: Sep 2004
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Aug 9th, 2005, 22:21
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Aug 9th, 2005, 22:51
Reputable Member
Join Date: Sep 2004
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
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: Select all
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Aug 9th, 2005, 22:55
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
http://www.connectionstrings.com suggest:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("mydb.mdb") & ";User Id=[username here];Password=[password here];"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Aug 10th, 2005, 06:49
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Aug 10th, 2005, 07:24
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
just add a semi colon before the world Password in your string...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Aug 10th, 2005, 14:19
Reputable Member
Join Date: Sep 2004
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks Guys. Finally got the dern thing working!
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

Tags
relative, linking, access

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 Forum 1 Mar 12th, 2008 23:43
ASP Multi users Access to Microsoft Access ish Classic ASP 0 Apr 26th, 2007 20:05
Is it possible to position something relative something else? the newbie web designer Web Page Design 7 Feb 22nd, 2007 18:04
Access: linking queries djme Databases 0 Oct 7th, 2006 19:24
can layers be relative? warmer Web Page Design 0 Nov 8th, 2005 18:42


All times are GMT. The time now is 15:53.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42