sunRef/DB
트랜잭션
민성아빠
2004. 2. 4. 11:30
objDB.BeginTrans
SQL = "INSERT INTO member_host(unique_key,id,pw,tel, hp,zip,addr1,addr2, advisor) VALUES
('"&unique_key&"','"&id&"','"&pw&"','"&tel&"','"&hp&"','"&zip&"','"&addr1&"','"&addr2&"','"&advisor&"')"
sqlExecute SQL
SQL = "INSERT INTO member_sub
(unique_key,num,relation,name,ssn,birthyear,birthmonth,birthday,sex,email,job) values
('"&unique_key&"',"&num&",'"&relation&"','"&name&"','"&ssn&"','"&birthyear&"','"&birthmonth&"','"&birthday&"',
'"&sex&"','"&email&"','"&job&"')"
sqlExecute SQL
If objDB.Errors.Count = 0 Then
objDB.CommitTrans
Else
objDB.RollbackTrans
End If
SQL = "INSERT INTO member_host(unique_key,id,pw,tel, hp,zip,addr1,addr2, advisor) VALUES
('"&unique_key&"','"&id&"','"&pw&"','"&tel&"','"&hp&"','"&zip&"','"&addr1&"','"&addr2&"','"&advisor&"')"
sqlExecute SQL
SQL = "INSERT INTO member_sub
(unique_key,num,relation,name,ssn,birthyear,birthmonth,birthday,sex,email,job) values
('"&unique_key&"',"&num&",'"&relation&"','"&name&"','"&ssn&"','"&birthyear&"','"&birthmonth&"','"&birthday&"',
'"&sex&"','"&email&"','"&job&"')"
sqlExecute SQL
If objDB.Errors.Count = 0 Then
objDB.CommitTrans
Else
objDB.RollbackTrans
End If