storing alpha-muneric Emp ID's to database.
Posted on 2003-12-08
The problem is....I want to store Alpha-numeric Employee ID's in the database. When i stroe a numeric Employee ID like 001, 030 things went ok.... But when i try to enter Employee ID like " aa11 ", it is not saved to the database. And an error occurs.
The error number is : -2147217900
Description : The name " aa11 " in not permitted in this context. Only constants, experssions or variables allowed here. Column names are not permitted.
One thing more.... when i directly put some alpha-numeric ID in the data base .. there is no problem... But when i try to put with the vb6 interface forms the above mentioned error occurs....
Is there something wrong with the sql string i am using to do the task. The string is...
strsql = "INSERT INTO Employee(EmpID, Name) VALUES("
strsql = strsql & Me.txtEmpID.Text & "','"
strsql = strsql & Me.txtName.Text & "')"
thanks for any solution to this problem.