| | |
How to: Update Records (complicated)
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Hi experts this is an urgent question. how do you import and export database online?
I have 2 equal database. I uploaded my FrontEnd(OPAC) and Database online. I have also a same database in my BackEnd(VB6) located in my computer. My problem is how do i update both database in every transaction done.
E.g. I added a record in my backend, the system will automatically update the database record online.
how can i accomplish this? is it possible? Tnx.
BTW im using VB6, ASP and Access
I have 2 equal database. I uploaded my FrontEnd(OPAC) and Database online. I have also a same database in my BackEnd(VB6) located in my computer. My problem is how do i update both database in every transaction done.
E.g. I added a record in my backend, the system will automatically update the database record online.
how can i accomplish this? is it possible? Tnx.
BTW im using VB6, ASP and Access
Kenneth
"Better Than Yesterday"
"Better Than Yesterday"
•
•
Join Date: Sep 2007
Posts: 1,080
Reputation:
Solved Threads: 68
Yes it is possible, but in ASP you need to create two connections, one to each server, along with two recordset objects. Once you do this, just do an update on both. However, you need to make sure that your one at home is connected to the internet at all times.
If you do not wish for this to happen, then you need to manually create a page that grabs all records in the online database that are not within your home database. Then insert those. Use something like:
SELECT * FROM Comments WHERE CommentID IN (" & An array of your comment id's from yoru home database & ")
If you do not wish for this to happen, then you need to manually create a page that grabs all records in the online database that are not within your home database. Then insert those. Use something like:
SELECT * FROM Comments WHERE CommentID IN (" & An array of your comment id's from yoru home database & ")
•
•
Join Date: Sep 2007
Posts: 1,080
Reputation:
Solved Threads: 68
well, are both connected to the internet? If so, just create two connections:
conn1 = Server.CreateObject("ADO.Connection")
conn2 = ...
conn1.provider.. etc.
conn2.provider.. etc.
Then just grab your information from conn1 with an SQL statement:
SELECT * FROM Users WHERE DateCreated > (lastdateyoudidthis.Thisavoidrecordsrepeated)
Then just do a loop for insert statements:
while Not recordsetname.EOF
SQL = "INSERT INTO Users_Bak "....
conn2.execute(SQL)
recordsetname.MoveNext
loop
conn1 = Server.CreateObject("ADO.Connection")
conn2 = ...
conn1.provider.. etc.
conn2.provider.. etc.
Then just grab your information from conn1 with an SQL statement:
SELECT * FROM Users WHERE DateCreated > (lastdateyoudidthis.Thisavoidrecordsrepeated)
Then just do a loop for insert statements:
while Not recordsetname.EOF
SQL = "INSERT INTO Users_Bak "....
conn2.execute(SQL)
recordsetname.MoveNext
loop
Last edited by SheSaidImaPregy; Feb 27th, 2008 at 5:38 pm.
![]() |
Similar Threads
- php read text scanned from other text editor (PHP)
- Inventory Control Database Design (Costing Methods) (Database Design)
Other Threads in the ASP Forum
- Previous Thread: Java Script with ASP page
- Next Thread: Need an ASP programmer for a few forms
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection diagnostics dreamweaver excel fso iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit webserver windows7






