?
Solved

Access Database manipulation without system DSN?

Posted on 2003-10-22
5
Medium Priority
?
268 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

741 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