January 25, 2012 at 12:35 pm
hi all
i work to a program that linked to database sql server
and i want move 1000 records from client to sql server in other computer for insert to table factor
i want ensure that this records all complete moving to server and inserted?
can you help me for solve this problem in best way and power full?
my records first save to string gride in my program that written by delphi
then user click button move this data by "for " move to temp table in server and insert into
then move compelet this step move or insert into table factor from temp table
sql server 2008
help me
January 25, 2012 at 12:40 pm
How do you mean move 1000 records from a client? What format is it stored locally?
January 25, 2012 at 12:42 pm
tnt750 (1/25/2012)
can you help me for solve this problem in best way and power full?my records first save to string gride in my program that written by delphi
then user click button move this data by "for " move to temp table in server and insert into
then move compelet this step move or insert into table factor from temp table
sql server 2008
help me
Ah must read in more detail next time.
You will need iterate through the delphi data grid (?) and use a sqlconnection component.
You're probably better off going to one of the delphi forums to be honest.
January 25, 2012 at 12:50 pm
no problem by delphi
my problem is with sql server for ensure that my records complete move and insert to factor table
January 25, 2012 at 12:54 pm
It is delphi in a way as you would open a sql transaction in delphi code and fire each insert individually. In the event of failure the catch block should rollback, the finally block commit.
January 25, 2012 at 1:04 pm
thank you MysteryJimbo
very much
for help me
parden me
i can not speak english well
i come from iran
January 25, 2012 at 2:40 pm
I would bulk insert all 1000 rows into a staging table. Then do the insert in a single transaction, or roll back if some failure occurs.
If the process dies in the middle of the individual inserts your' code will need to be robust enough to pick up where it left off or handle duplicate inserts.
The probability of survival is inversely proportional to the angle of arrival.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply