Subject | Re: [ib-support] Changing metadata in a production database |
---|---|
Author | Tiago Costa |
Post date | 2003-02-14T15:25:21Z |
Daniel,
It was two different transactions: (1) and (2) in the example.
Tiago
Daniel Rail wrote:
Tiago Silva Costa
ECALC Sistemas de Computacao Ltda
Tel:(11)3898-1602 Fax:(11)3063-0359
email: tiago@...
http://www.ecalc.com.br
[Non-text portions of this message have been removed]
It was two different transactions: (1) and (2) in the example.
Tiago
Daniel Rail wrote:
>Hi,--
>
>
>
>>Jason,
>>
>>
>
>
>
>> I'm using the "Database Explorer" that comes with delphi. So, I'm
>>connecting via BDE.
>> I did not commit any changes... Only rollback
>>
>>
>
>
>
>> What I found is that if I don't change "field2" and rollback, it works
>>(field1 return to ""), but if i update field2 in the same transaction (i
>>didn't commit, or rollback), looks like that bde commit my changes and
>>starts a new transaction...
>>
>>
>
>
>
>>(1) Start transaction
>>(1) SELECT * FROM table1 (field1 "")
>>(1) UPDATE table1 SET field1='T' where id=1
>>(2) ALTER TABLE table1 add field2 VARCHAR(10)
>>(1) UPDATE table1 SET field2="test" where id=1
>>(*) - I think BDE here COMMIT and Starts another transaction
>>
>>
>
>Or, it might be that it does a prepare on the UPDATE statement and
>doesn't find "field2", because you didn't commit the ALTER TABLE
>statement. It's generally not a good idea to mix DDL(Data Definition
>Language, i.e.: ALTER TABLE) and DML(Data Manipulation Language, i.e.:
>SELECT and UPDATE), within the same transaction. You're seeing one
>of the side effects of mixing them.
>
>
>
>>(1) SELECT * FROM table1 (both fields "T" and "test")
>>(1) ROLLBACK
>>(1) SELECT * FROM table1 (field1 "T")
>>
>>
>
>
>Daniel Rail
>Senior System Engineer
>ACCRA Group Inc. (www.accra.ca)
>ACCRA Med Software Inc. (www.accramed.ca)
>
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>
>
Tiago Silva Costa
ECALC Sistemas de Computacao Ltda
Tel:(11)3898-1602 Fax:(11)3063-0359
email: tiago@...
http://www.ecalc.com.br
[Non-text portions of this message have been removed]