|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem inserting date into Access DB
I'm seriously stuck on this...I'm trying to take a date from a form and insert it into an Access 2000 database with ASP
Here's the code: frmClubId = Request.Form("Names") frmDate = Request.Form("Date") sqlStatement = "INSERT INTO testDates(ClubId,Date) VALUES(" & frmClubId & ", #" & frmDate & "#)" Set rs = conn.Execute(sqlStatement) I've already Response.Write the sql, so I know that frmClubId is and integer and frmDate is mm/dd/yyyy any help is greatly appreciated Thanks in advance! |
|
#2
|
|||
|
|||
|
Try sqlStatement = "INSERT INTO testDates(ClubId,[Date]) VALUES(" & frmClubId & ", #" & frmDate & "#)"
|
|
#3
|
|||
|
|||
|
THANK YOU SO MUCH!
that's so wierd because i already tried that and it didn't work...but I gave it a shot again and sure enough.... guess that's just the way it goes sometimes... Thanks again Doug g! |
|
#4
|
|||
|
|||
|
You're welcome.
"Date" is one of those reserved words used by the database or data drivers. Life is simpler if you avoid reserved words as column names. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Problem inserting date into Access DB |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|