String sql= "INSERT INTO UserRecord( name, email, contactNo, password, gender, nationality, " +
"dateOfBirth, address, postalCode, secretQuestion, secretAnswer, userType, obsoleteStatus)";
sql += "VALUES('" + name + "','" + email + "','" + cNo + "','" + pwd + "','" +gen + "','" + nationality + "','"
+ dob + "','" + address + "','" + pCode + "','" + secQuestion +"','"+secAnswer + "','"+ userType +"','" + obsoleteStatus + "')";
String sql2= "INSERT INTO PaymentAccount(creditCardNo,creditCardType,expiryDate,CVV)";
sql2 += "VALUES('" + cCardNo + "','" + cCardType + "','" + expiryDate + "','" + cvv + "')";
大家好,我在互联网上对使用 Start Transaction 进行了一些研究并尝试实施它,但似乎我总是出错。我提供的 sql 是完美的,但我需要有人可以告诉我如何使用启动事务,因为我一直在搞乱“”。提前谢谢大家