We help IT Professionals succeed at work.

Send registers froma database to a server database (mysql)

Manuel Lopez-Michelone
Hi guys,

I have in a internet server a MySQL database. I wrote a delphi program that creates a local database and I want to be able to send the registers created to the server's MySQL database.

How I can add this to my program, or rephrasing the question... How I can send data registers from a local table (in my computer) to a MySQL server database thru delphi?

Any ideas?

best regards
Watch Question

 This could be a complicated issue.  If you want to send data records from one table locally to the server side then you can open a query on the local, and for each record, run an insert query on the server.  If you are ok with deleting all records on the server before reproducing them this would be easy.  If on the other hand, you need to try to do a more elegant synchronization then it can be a lot more work.

  As an example... if you wanted to synchronize purchase orders then you would need to synchronize the header and all of the line items (and any other associated tables).  This would involve determining if the record exists on the server.  If it does then you need to update it.  If it does not you need to insert a new one.  Generally all of the updates are done inside a transaction so it all happens or none of it happens.  If you have multiple outside users doing synchronization then you need to have a unique ID for all locations so you can determine if the record exists or not.

  Basically we would need to know more about what, precisely, you are attempting.  Connecting to both database servers is the easy part.

Let me know when you can give me more info to go on.
CodedKSenior Software Engineer
I agree with developmentguru and i want to add this :

I suppose since you created both local and remote database you know how to do the queries.
If your problem is only how to make both databases talk and exchange data then this is fairly simple.
I strongly recommend AnyDAC its the best by far and its free.
They are going to remove the link soon cause another company bought it so download it...
As soon as you set the remote connection password you are ready to go...
Drop another AnyDac component on the form for the local connection and start querying.


Explore More ContentExplore courses, solutions, and other research materials related to this topic.