一
一生中最爱
Unregistered / Unconfirmed
GUEST, unregistred user!
一下语句在sql server中测试没问题,在sybase下出错
TD: TTransactionDesc;
begin TD.TransactionID := 1;
TD.IsolationLevel := xilREADCOMMITTED;
qry.SQL.Clear;
qry.SQL.Text:='select * from sbls ';
qry.Open;
db.StartTransaction(td);
qry.SQL.clear;
qry.SQL.Text:='insert sbls(lsh,swdm,sblx) '+
'select 11,''aaaaa'',''1''';
qry.ExecSQL();
qry.SQL.Clear;
qry.SQL.Text:='select * from sbls ';
qry.Open;
qry1.SQL.clear;
qry1.SQL.Text:='insert smls(lsh,xh,xmdm,je) '+
'select 11,1,''001'',100.01';
qry1.ExecSQL();
db.Rollback(td);
把事务去掉即可,请高手指点,目前只有这点分
TD: TTransactionDesc;
begin TD.TransactionID := 1;
TD.IsolationLevel := xilREADCOMMITTED;
qry.SQL.Clear;
qry.SQL.Text:='select * from sbls ';
qry.Open;
db.StartTransaction(td);
qry.SQL.clear;
qry.SQL.Text:='insert sbls(lsh,swdm,sblx) '+
'select 11,''aaaaa'',''1''';
qry.ExecSQL();
qry.SQL.Clear;
qry.SQL.Text:='select * from sbls ';
qry.Open;
qry1.SQL.clear;
qry1.SQL.Text:='insert smls(lsh,xh,xmdm,je) '+
'select 11,1,''001'',100.01';
qry1.ExecSQL();
db.Rollback(td);
把事务去掉即可,请高手指点,目前只有这点分