Solved

Access Database manipulation without system DSN?

Posted on 2003-10-22
5
261 Views
Last Modified: 2011-10-03
I am designing a website consisting of an access database, and some ASP pages to view and hopefully edit the database information.  The ISP which hosts the site won't allow me to create a system DSN, or set up anything as far as SQL goes, but I'm stuck with them because of a contract the previous web guy made.  To display the data I want, i've created a file DSN in the web root and used it to access the database (no pun intended) and display the info in a table.  That's fine and good, but I'm having trouble being able to modify the database.  I created a Data Access Page in access, but it won't work unless opened locally on the server.  What are my options for access database manipulation over the web without using either a system DSN or other server side database referencing deals?  
0
Comment
Question by:alanteigne
  • 3
5 Comments
 
LVL 4

Expert Comment

by:hamidovt
ID: 9605104
you can open Access file (aaa.mdb or whatever is the name of your db) using its physical path.
when you need to modify you database, just download it via ftp, make the changes and upload again.
I guess this will solve your problem.

to can open Access file using its physical path you ca use following connection

dim cn
set cn = server.CreateObject ("ADODB.Connection")
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:/mydir/mydb.mdb"

for more info refer to following url  http://www.w3schools.com/ado/ado_connect.asp
0
 
LVL 4

Accepted Solution

by:
Zonebit earned 250 total points
ID: 9606878
hamidovt gave a correct answer but I would tweak it just a little bit:

'''
dim cn
dim conStr
dim dbPath

'dbPath should be the virtual path to the database on your webserver
dbPath = Server.MapPath("/db/web/directory")
set cn = server.CreateObject ("ADODB.Connection")
conStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath & ";User Id=admin;Password="
cn.Open conStr
'''

As for having trouble updating your database, the "IUSR_" and "IWAM_" accounts must have write privileges to the database.  This solves 90% of insert/updating problems.
0
 

Author Comment

by:alanteigne
ID: 9607302
Thanks guys!  Actually, I gave in and went ahead and signed up for a new hosting provider since i'm under the gun.  However, I'll try to get your suggestion working for future projects.  Thanks again!
0
 
LVL 4

Expert Comment

by:hamidovt
ID: 9607362
well...
if you appreciate my answer why havent you split points????
0
 
LVL 4

Expert Comment

by:hamidovt
ID: 9607367
Zonebit just added some comments to it and you gave all points to him
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now