I am coding a banking and ATM application, which is split into two parts. In one part the employees of the bank can open new accounts for customers, edit accounts, etc. It includes assigning a unique PIN code for the customer. This is all saving to a database. The customer then uses the ATM part of the application to withdraw money. They use a unique PIN code to access their account. The problem that I'm having is retrieving the PIN from the database. I want to write a simple If statement, to match the PIN entered with the corresponding PIN in the database, so that it will retrieve all the relevant customer's details, eg. bank balance. The PIN is successfully saving to the database through the following....
If inc <> -1 Then
Dim cb As New OleDb.OleDbCommandBuilder(da)
Dim dsNewRow As DataRow
dsNewRow = ds.Tables("tblCustomer").NewRow()
dsNewRow.Item("PINCode") = mskPINCode.Text
ds.Tables("tblCustomer").Rows.Add(dsNewRow)
da.Update(ds, "tblCustomer")
End If
So how do I retrieve the PIN from the database, that matches the PIN entered and hence, retrieves bank balance, etc?
If inc <> -1 Then
Dim cb As New OleDb.OleDbCommandBuilder(da)
Dim dsNewRow As DataRow
dsNewRow = ds.Tables("tblCustomer").NewRow()
dsNewRow.Item("PINCode") = mskPINCode.Text
ds.Tables("tblCustomer").Rows.Add(dsNewRow)
da.Update(ds, "tblCustomer")
End If
So how do I retrieve the PIN from the database, that matches the PIN entered and hence, retrieves bank balance, etc?