That is just the thing, I have copied the code from a working form.
But here it is.
Try
Me.intGatePassNumber = CInt(Me.editGatePassNumber.Text)
Me.dtGatePass = Me.objdsGatePass.Tables("tbl_TSGatePass")
Me.drGatePass = Me.dtGatePass.NewRow
Me.drGatePass("ID") = CInt(Me.editGatePassNumber.Text)
Me.drGatePass("PermissionTo") = Me.editPermissionTo.Text
Me.drGatePass("Company") = Me.editCompany.Text
Me.drGatePass("DateTaken") = Me.editDateTaken.Value
Me.drGatePass("DateReturning") = Me.editDateReturning.Text
Me.drGatePass("NotReturning") = Me.chkNotReturning.Checked
Me.drGatePass("AuthorisedBy") = Me.editAuthorisedBy.Text
Me.dtGatePass.Rows.Add(Me.drGatePass)
Me.odbcdaGatePassEntry.Update(Me.objdsGatePass.tbl _TSGatePass)
MsgBox("Entry added!")
Catch ex As Exception
CType(Me.MdiParent, frmMDI).dspConsoleTechnicalServices.Text = CType(Me.MdiParent, frmMDI).dspConsoleTechnicalServices.Text & vbCrLf & ex.Message
End Try
"Jonathan Allen" wrote:
It would help to see more of your code.
--
Jonathan Allen
"Vexander" wrote:
I am developing a front end for an SQL DB. Every other entry form I have created works, excpet the lastes one. When I try to add a new entry, on the ODBCDataapater.Update line I get the following error.>
ERROR [HY007] [Microsoft][ODBC SQL Server Driver]Associated statement is not prepared
<<
I have googled the error and looked on MSDN, and I get nothing that helps. Please help ASAP. I Cannot carry on with my develpment until I sort this out.
Thanx