[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Replacing SQL Databases
Racke,
If your customer is uploading a complete set of data, then you can
simply reload the entire database. A customer of mine uploads current
product data nightly and I wrote a script that creates a new
"products.txt" file automatically.
I have a cron job setup that checks for new data. If new data is
present, the script deletes the products.sql file from the products
directory, installs the new products.txt file and restarts IC. IC takes
care of dropping the existing table, creating the new one and adding all
the rows defined in products.txt automagically.
You may run into a problem if products that are linked to current orders
are dropped after the update and I'm not sure how much of a problem this
would be.
This only works if you customer is sending all of the data with each
update. If they are sending deltas or smaller updates (adds/drops) then
you'll have to build something yourself to let them administer their
products database remotely.
________________________________________________________
Blue Circle Technologies office: (810) 231-2126
http://www.bluecircletech.com mobile: (586) 344-4812
>-----Original Message-----
>From: interchange-users-admin@interchange.redhat.com
>[mailto:interchange-users-admin@interchange.redhat.com] On
>Behalf Of Stefan Hornburg (Racke)
>Sent: Wednesday, April 10, 2002 9:46 AM
>To: interchange-users@interchange.redhat.com
>Subject: [ic] Replacing SQL Databases
>
>Hello, Interchange users !
>
>A customer of our company would like to upload a new databases
>where many rows are deleted. This is no problem with text
>databases, you just drop the new file and reconfig.
>
>This don't work for SQL databases, only new records are added,
>but the old ones with no counterpart in the upload stay there.
>Is there a Interchange way instead of using SQL statements to
>achieve database updates with deleting records ?
>
>Ciao
> Racke
>