Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access Database manipulation without system DSN?

Posted on 2003-10-22
5
Medium Priority
?
269 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 750 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

618 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