Hi,
I have 2 tables loginInfo and UserInfo. LoginInfo Stores username and passwords while userinfo stores other user details such as Address,postalcode,phone etc.
I insert values into loginInfo first and if successful I enter the userInfo details. If exception occurs while entering details into userInfo i delete the loginInfo details.
This is how I do now
'login details are entered successfully
If CreateLogin(uName.uPass) Then
Try
'Create the user details
CreateUser('Userdetails)
Catch ex As Exception
'if exception occurs then delete the login
DeleteLogin(uName)
End Try
End IF
Is there a better way to deal with this situation? can use Transactions?
Thanks in advance.