943,779 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 996
  • ASP RSS
Feb 27th, 2008
0

How to: Update Records (complicated)

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
werks is offline Offline
57 posts
since Jan 2008
Feb 27th, 2008
0

Re: How to: Update Records (complicated)

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 & ")
Reputation Points: 43
Solved Threads: 68
Veteran Poster
SheSaidImaPregy is offline Offline
1,080 posts
since Sep 2007
Feb 27th, 2008
0

Re: How to: Update Records (complicated)

How can i do that.. Please guide me through
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
werks is offline Offline
57 posts
since Jan 2008
Feb 27th, 2008
0

Re: How to: Update Records (complicated)

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
Last edited by SheSaidImaPregy; Feb 27th, 2008 at 5:38 pm.
Reputation Points: 43
Solved Threads: 68
Veteran Poster
SheSaidImaPregy is offline Offline
1,080 posts
since Sep 2007
Mar 1st, 2008
0

Re: How to: Update Records (complicated)

Hello,
This is good issue. And a nice solution.
sbv
Reputation Points: 15
Solved Threads: 8
Junior Poster
sbv is offline Offline
178 posts
since Jan 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Java Script with ASP page
Next Thread in ASP Forum Timeline: Need an ASP programmer for a few forms





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC