Link to home
Start Free TrialLog in
Avatar of koossa
koossa

asked on

SQL Server data transfer via ASP

I've got a Visual basic database application that flags data changed on a local SQL Server and update these changes to a communal online SQL Server Database using form post methods.
Everything is works fine, but if the user lose his local data I want to give him the option to restore his data by retrieving only the portion of his data from the online database.

What would be the best option to minimize bandwidth usage?
Avatar of sammySeltzer
sammySeltzer
Flag of United States of America image

I can't think of a better option than select only data that exists in communal online sql sever but doesn't exist in local data.

INSERT INTO Localdata(columns)
SELECT columns
FROM communal Online
WHERE communal Online
.key NOT IN (SELECT key FROM Localdata)

Open in new window


This is your pseudo-code but the concept is sound.

Insert into table in localdata (columnNames) Select columnNames from table in communal server where table.pk in communalServer NOT IN (select key from table in localdata).

If this data belongs to a particular user, then

WHERE user ='some user' and  communal Online
.key NOT IN (SELECT key FROM Localdata)

Open in new window


Another option, which is not nearly as efficient, in my view, is to backup local data and restore from communal online data.
Avatar of koossa
koossa

ASKER

Hi

I know how to do the query part, what I want to know is what is the way to transfer the data that will use the least amount of bandwidth, eg XML, CSV, MDB, Zipped, compressed as string?
SOLUTION
Avatar of sammySeltzer
sammySeltzer
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of koossa

ASKER

Ons the server side I can generate CSV file from the SQL data without a problem, but is there a way to compress them using ASP?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial