Nowadays I am working on one of my assignments in vb.net. Assignment is about making a software that work like ATM.I am facing problem in this query for the access databaseerror is syntax error but there is no error as far i know I will appreciate if you can helpstatement is
cmd = New OleDbCommand("INSERT INTO Transaction VALUES('" & WithDrawTxt.Text & "','" & AccountNo.ToString & "','" & dt.ToString & "')", cn)i = cmd.ExecuteNonQuery
Table Transaction has fields Amount, Account_Number, Transaction_Date and last is Transaction#. All have field text except Transaction# which is auto number.
I have changed it to following statement too but its not working even then
cmd = New OleDbCommand("INSERT INTO Transaction(Amount,Account_Number,Transaction_date) VALUES('" & WithDrawTxt.Text & "','" & AccountNo.ToString & "','" & dt.ToString & "')", cn)i = cmd.ExecuteNonQuery