Welcome! Log In Create A New Profile

Advanced

Database transaction MSSQL

Posted by Prolay Sarkar 
Prolay Sarkar
Database transaction MSSQL
January 20, 2009 04:56PM
Hi,

I am facing a big problem where i have to make a update into multiple tables, say 3 tables A B C one after the other. and i am using MSSQL for that. I am not able to maintain transaction consistency so that i can role back if one of the transaction fails.

I use HAdd/HModify operation to do that and by using this command i can pass a FileName and it gets saved in the database. like HAdd(A)

Now the problem is i cannot use HTransactionStart/HTransactionEnd with MSSQL so i have to use SQLTransaction(sqlStart) but in this case i have to write a insert/update query but I have 100 fields in my table. so how to go about it. Is there any mechanism to pass File/Object and it gets saved into database. Please help.. Its Urgent

Thanking you,

Regards,
Prolay
Fabrice Harari
Re: Database transaction MSSQL
January 20, 2009 06:23PM
Hi...

A query can be built as a string then executed, and certainly nothing prevents you to build this string dynamically... You can use the hlistxxx functions to retrieve the names of the field for each file and build your string...

Best regards

Prolay Sarkar
Re: Database transaction MSSQL
January 22, 2009 11:00AM
Hi,

If I have the Native drivers can i use HTransactionStart/HTransactionEnd along with SQL and oracle database!

Regards
Prolay
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: