Hello...
i am doing some kind of application using Vb.net connected to an access database..unfor tunately i am getting this SYNTAX ERROR IN INSERT INTO STATEMENT...i have been trying to find out y for a day now but i really can't find answers...im feeling sorry for myself now..i am jst a beginner...coul d someone out there pls help me with this..i so much thank you in advance...
here is my simple code...
Dim command as New Oledbcommand
With command
.Connection = myconnection
.CommandText = "INSERT INTO tblemployee(Fna me,Mname,Lname, Position,Gender ,Cstatus,Bday,A ge,Address,Tele phone,Cellphone ,Emailaddress,S oftwareknowledg e) VALUES('" & txtFname.Text & "','" & txtmname.Text & "','" & txtLname.Text & "','" & cmbposition.Tex t & "','" & cmbgender.Text & "','" & cmbcstatus.Text & "','" & txtbday.Text & "','" & txtage.Text & "','" & txthome.Text & "','" & txttelephone.Te xt & "','" & txtcp.Text & "','" & txtEmail.Text & "','" & txtswk.Text & "')"
.ExecuteNonQuer y()
End With
i am doing some kind of application using Vb.net connected to an access database..unfor tunately i am getting this SYNTAX ERROR IN INSERT INTO STATEMENT...i have been trying to find out y for a day now but i really can't find answers...im feeling sorry for myself now..i am jst a beginner...coul d someone out there pls help me with this..i so much thank you in advance...
here is my simple code...
Dim command as New Oledbcommand
With command
.Connection = myconnection
.CommandText = "INSERT INTO tblemployee(Fna me,Mname,Lname, Position,Gender ,Cstatus,Bday,A ge,Address,Tele phone,Cellphone ,Emailaddress,S oftwareknowledg e) VALUES('" & txtFname.Text & "','" & txtmname.Text & "','" & txtLname.Text & "','" & cmbposition.Tex t & "','" & cmbgender.Text & "','" & cmbcstatus.Text & "','" & txtbday.Text & "','" & txtage.Text & "','" & txthome.Text & "','" & txttelephone.Te xt & "','" & txtcp.Text & "','" & txtEmail.Text & "','" & txtswk.Text & "')"
.ExecuteNonQuer y()
End With
Comment