Thanks for the help but the same error has come up. I have worked out it is to do with this line.
If i put a number instead of the txtPrimKey.Text then it will work perfectly. I have also tried usingCode:cmd = New OleDbCommand("select * from Data where ID = txtPrimKey.Text", EMP)
but that still will not work.Code:cmd = New OleDbCommand("select * from MP where ID = PRIM", EMP)
If there any way of getting a the string PRIM to work.




Reply With Quote