VB.NET質問スレ(Part27)
■ このスレッドは過去ログ倉庫に格納されています
0034デフォルトの名無しさん
2008/10/04(土) 23:44:57フラグとかで管理するのはだめ?
dim btrflg as boolean = false
dim bcmtflg as boolean = true
dim sSQL as string = ""
try
コネクション.BeginTransaction
btrflg = true
'SQLを実行
sSQL = "UPDATE ・・・"
if hoge.excute < 1 then
bcmtflg = false
end if
'SQLを実行
sSQL = "INSERT ・・・"
if hoge.excute < 1 then
bcmtflg = false
end if
catch
finally
if btrflg = true then
if bcmtflg = true then
hoge.Commit
else
hoge,Rollback
end if
end if
end try
■ このスレッドは過去ログ倉庫に格納されています