SqlDbx Forum

SqlDbx

You are not logged in.

#1 2009-02-10 10:38:38

Cx
Guest

Begin transaction - commit

I'm having difficulties using theese commands.
I want to run an update for me db and as there are so many rows, I need to be sure I want to see how many rows being updated before commiting the update.

begin transaction

update northwind
SET x=y AND a=c
WHERE q=f

ROLLBACK

COMMIT

This does not work. Any suggestions?

#2 2009-02-10 13:28:43

sqldbxhelp
Administrator

Re: Begin transaction - commit

I am not sure what does not work.
I do not see anything wrong with this SQL.
The number or rows which would be updated
is displayed on a window status bar in a last column.
Can you give more details.

Offline

#3 2009-02-11 04:56:49

Cx
Guest

Re: Begin transaction - commit

First of all, thank you for the apply.

Yes, the number updated are displayed as you mentioned.
What I'm trying to do, is to begin the transaction, perform the update to see how many rows beeing updated, and commit it if it looks OK.
If not OK:
If it turns out to many rows are being updated (my query is not spesific enough) I want the option to roll back, and make changes, and try it again.

This I can't performe in the way I described. (I used this in MS query analyzer which I don't have in hand)

The db is an access db. Maybe the ODBC connection is making this hard to do?

#4 2009-02-12 11:08:21

sqldbxhelp
Administrator

Re: Begin transaction - commit

I did not realize that you were using ODBC connection.
In ODBC case SqlDbx simply passes commands to ODBC
driver and it seems that Access driver does not understand
BEGIN TRANSACTION, ROLLBACK and COMMIT statements

Offline

Board footer

Powered by FluxBB