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