I am using access connection like-[code=vb]
a = TextBox2.Text.R emove(1)
a = TextBox2.Text.R emove(1)
c = TextBox3.Text.R emove(1)
b = TextBox4.Text
TextBox5.Text = a + c + " " + b
Dim com As New OleDbCommand("I NSERT INTO Employees(Code) VALUES(@cd) WHERE Sr_No='" & TextBox1.Text & "'", Connect.OledbCo nnection())
com.Parameters. AddWithValue("@ cd", TextBox5.Text)
com.Connection. Open()
com.ExecuteNonQ uery()
com.Connection. Close()
MsgBox("OK")
'Catch ex As Exception
' MsgBox(ex.Messa ge)
'End Try[/code]
but there is a problem inwhere clause it is giving me error as "Missing semicolon (;) in SQL statement...
Is there any solution for that ?
a = TextBox2.Text.R emove(1)
a = TextBox2.Text.R emove(1)
c = TextBox3.Text.R emove(1)
b = TextBox4.Text
TextBox5.Text = a + c + " " + b
Dim com As New OleDbCommand("I NSERT INTO Employees(Code) VALUES(@cd) WHERE Sr_No='" & TextBox1.Text & "'", Connect.OledbCo nnection())
com.Parameters. AddWithValue("@ cd", TextBox5.Text)
com.Connection. Open()
com.ExecuteNonQ uery()
com.Connection. Close()
MsgBox("OK")
'Catch ex As Exception
' MsgBox(ex.Messa ge)
'End Try[/code]
but there is a problem inwhere clause it is giving me error as "Missing semicolon (;) in SQL statement...
Is there any solution for that ?
Comment