HELP on how to modify two mdb database (local and distant) 
Author Message
 HELP on how to modify two mdb database (local and distant)

Hi all,

This problem drive me nuts, i think that's possible to modify in same time a
server database and a local database but i don't know how...

Actually i've got three pages for add, update and modify some records on the
server database.
I use ASP for execute my SQL on the server and to trace my queries in a
table named MaJ (this table keeps sql literal and the dates of
modifications).

When the client have make his modifications he clicks on a button.
Then i use a query to select all records of the MaJ table and i use the
Server.CreateObject("Scripting.FileSystemObject") to generate a sql.sql file
and write a line for each record. It's make something like this :

INSERT INTO BNEUFS (NEUF_ID, DESCR, MARQUE, TYPE, PRIX, ANNEE, CARACT,
PHOTO1, PHOTO2, PHOTO3, CAT_ID)
VALUES('N9MBA006','Moissonneuse-batteuse','','',null,null,'','','','','MBA')
UPDATE BQTEN SET QTE = QTE+1 WHERE CAT_ID='MBA'

When i do that, i use response redirect to my sql.sql file and the browser
ask the client to download my file (my client use Explorer 4, so there no
problem with response.redirect ;o).
If the download is ok (ouf), i wrote a little module on the client Access
database who read each line of my SQL file and execute the SQL in client
side to maintain a miror recordset of the server database...

Some problems with this method (sure it's not complete :o) :
- i'm never sure that the client really download that file (he can forget).
- as i'm not sure that the client have already download the file i can't
delete my SQL records of MaJ so my sql file will be bigger and bigger...
- this is ugly to code...(i do it ! it's works, but i really dislike that
method)

So i've got the impression to code what in France we call an "usine gaz"
(something big and useless).

It would be very pleasant for me to know the method to modify the two mdb in
the same time, using ASP or ActiveX...


thanks in advance,

Pierre.



Wed, 26 Sep 2001 03:00:00 GMT  
 HELP on how to modify two mdb database (local and distant)

Quote:

>This problem drive me nuts, i think that's possible to modify in same time
a
>server database and a local database but i don't know how...

With ASP there's no way to modify a database that is on the client machine.
You have to do it with javascript or VBScript  at client side.

For example:
A user fill a form to add a record in a table. When he press a button, the
script insert the record in the client database and then submit the form to
server. Then, on the server, asp page update the server database.

To update the client db, you can copy the same code that update the server
db. If you use vbscript, you can create the ADO object with the
CreateObject("...") function (without "server.") and then you can call all
the method as usually.
Be sure ADO is installed on the client machine (You can use any other
database object, like RDO, DAO, etc., but they have to be installed on the
client machine.)

Bye

Stefano



Fri, 28 Sep 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. need help updating a local front end mdb from an mdb on an ftp site

2. FTP : append distant file to local one

3. Managing Two MDB Databases

4. Using DGGrid with two databases (access, *.mdb)

5. Managing Two MDB Databases

6. Merging Two MDB Databases Through VB !

7. Problem to acceed two MDB database with different Password

8. OT: To compare two database mdb structures and make changes

9. Access a MySQL Distant Database

10. Open Two Database with Two System.Mda and Two different User Names and Password

11. export data from local txt file to .mdb file on server

12. Modifying variables using the Locals Window

 

 
Powered by phpBB® Forum Software