I have a problem inserting record into the database collecting the data from textbox and combobox and inserting it to the database but i have been getting error for the past few hou that i have been trying to deug it but the error it giving me is
Private Sub Command1_Click()
Dim conConnection As New adodb.Connection
Dim cmdCommand As New adodb.Command
Dim rstRecordset As New adodb.Recordset
Dim strSQL As String
Dim cmd As sqlcommand
conConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\" & "MedicalCheck.mdb;mode=read"
conConnection.Open
With cmdCommand
.ActiveConnection = conConnection
.CommandText = "INSERT INTO Logininfo VALUES ('" & textbox1.Text & " ','" & textbox2.Text & "')"
.CommandText = "insert into emp values( ' " & textbox1.Text & " ', " & textbox2.Text & "')"
cmd.executeNonQuery()
Response.write (" One record inserted")
.CommandType = adCmdText
End With
With rstRecordset
.CursorType = adOpenStatic
.CursorLocation = adUseClient
.LockType = adLockBatchOptimistic
.Open cmdCommand
' .Update
End With
MsgBox ("Record Inserted")
End Sub
I could not get result to the problem