|
| |
|
|
sentinel
Posts: 566 Joined: 5/4/2005 From: Chicago, Illinois Status: offline
|
Passing Numeric into Tinyint field - 3/28/2008 15:16:46
hey all.... I am using the following code to try to pass a numeric value into a TINYINT field in Mysql 5. "INSERT INTO ot (ot1,ot2,ot3,UserID,DateEntered,OTHours1,OTHours2,OTHours3) VALUES ('" & request.form("ot1") & "','" & request.form("ot2") & "','" & request.form("ot3") & "', '" & user & "',curdate(),'" & request.form("OTHours1") & "','" & request.form("OTHours2") & "','" & request.form("OTHours3") & "')" I receive this error: Database Results Error Description: [MySQL][ODBC 3.51 Driver][mysqld-5.0.51a-community-nt]Incorrect integer value: '' for column 'OTHours1' at row 1 Number: -2147467259 (0x80004005) Source: Microsoft OLE DB Provider for ODBC Drivers Am i trying to insert the OTHours1 using the wrong format or something? I can add values manually from command line but not using the SQL code. Thanks
_____________________________
No matter where you go, there you are.
|
|
|
|
rdouglass
Posts: 9167 From: Biddeford, ME USA Status: offline
|
RE: Passing Numeric into Tinyint field - 3/28/2008 15:41:11
quote:
,'" & request.form("OTHours1") & "', Try getting rid of those apostrophes. None when using numeric values. ...," & request.form("OTHours1") & "," & request.form("OTHours2") & ",... That help any?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
sentinel
Posts: 566 Joined: 5/4/2005 From: Chicago, Illinois Status: offline
|
RE: Passing Numeric into Tinyint field - 3/28/2008 15:45:28
Yes thank you very much!
_____________________________
No matter where you go, there you are.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|