• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 278
  • Last Modified:

SQL requests on a access database on a webserver....

Right now i am sending SQL requests to my access database om my computer. But i want to do the same with a database on a webserver.
This i how i connect right now.

AdoDbQ := TADOQuery.Create(nil);
AdoDbQ.Prepared := True;
AdoDbQ.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0; Data Source=db.mdb;Persist Security Info=False;Jet OLEDB:Database Password=';

AdoDbQ.SQL.Text := 'SQL request';

But what do i do when the database is placed on a webserver? and how can i write to it...?
1 Solution
Do you mean database will not be on the same machine as you app but you want to access it from your app, or you want to access db from the web server i.e. write/read from web application (using let's say asp or another scriptin)?

If MS Access db is on web server and you want to open it from your machine, you have to share that folder on web server where .mdb is located, then just use

and that's it.

If you want to access it from the Web application, that's another story. Depends on how you will develop Web app (Delphi, .asp, asp.net, jsp....)
TheFreeGoAuthor Commented:
No... the database i placed on a normal webserver, like http://www.mydomain.com/db.mdb/

I've heard about mySQL, what is it and can it be used...? The webserver supports it...
You want to open Access database from URL i.e using http to connect to it from anywhere?
Or you want to be able to run your site off the Access db?
I don't get it...
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

TheFreeGoAuthor Commented:
I want to treat the DB like i was placed on my own computer(the client) but only, it is placed on a webserver with a location like this: http://www.mydomain.com/db.mdb.

Because then, all the clients will share the same database.
You can't use http protocol to open MSAccess DB using Delphi (and any other tool). MS SQL Server, as I am aware of, has that feature (SQL 2000 only) that you can send SQL query to database using http but I don't know anybody doing that (you have to enable it, I think)- security I guess.

If your database has to available from the Web, i.e. your application(s) will open it from remote locations, then try (if you have Delphi 6 Ent, I don't so I don't know details) with WebServices and Delphi. With WebService running on the same LAN as you DB, you can ask it to read/write to your database. Of course, you have to make your WebService first, put it on web server and run it. Then, change your application to query your WebService instead of MDB (Web Service will open mdb) from anywhere (internet).
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to accept bogiboy's answer
 Please leave any comments here within the next seven days.


Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones

EE Cleanup Volunteer

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now