|
-
May 25th, 2001, 08:31 PM
#1
INsert Into Access Problem
I cannot figure this out for the life of me. I have an Access database that has a table I am trying to insert a new row to using the Connection Objects Execute command here's what I have:
Dim sql As String
sql = "Insert into RoomAssign" _
& "(RoomNo,Day,PersonNo,TimeIn,TimeOut) " _
& "Values('" & mRoomNo & "','" & mDay & "'," & mPersonNumber _
& ",'" & mTimeIn & "','" & mTimeOut & "')"
dbConn.Execute sql
In the table, RoomNo and Day as strings, PersonNo is a long and TimeIn and TimeOut are Date/Time fields. When I run it, I get this error:
Run-time error '-2147217900 (80040e14)':
Syntax Error in INSERT INTO statement.
If anyone can help, I'd appreciate it much.
dbhutt
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|