Friday, March 9, 2012

Inserts and updated sqlserver

Hi
I have a multithreaded application. VC6++, VB6 and OLEDB. Every thread
has its own session to the database.
If I do all the inserts and do updates in one thread it works fine.
All my data is in the database.
If I split the work to be done on more than one thread it shows in the
SQL Profiler the it does the inserts and updates, but when I look in
the database not all the data was added. There were no errors logged.
Does anyone have an idea what could cause this?
Thanks
GertGert wrote:

> Hi
> I have a multithreaded application. VC6++, VB6 and OLEDB. Every thread
> has its own session to the database.
> If I do all the inserts and do updates in one thread it works fine.
> All my data is in the database.
> If I split the work to be done on more than one thread it shows in the
> SQL Profiler the it does the inserts and updates, but when I look in
> the database not all the data was added. There were no errors logged.
Do you insert the data in the transaction? Maybe you do not call COMMIT at
the end of it and the transaction is rolled back after the timeout.
sincerely,
--
Sebastian K. Zaklada
Skilled Software
http://www.skilledsoftware.com
This posting is provided "AS IS" with no warranties, and confers no rights.

No comments:

Post a Comment