navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Passing Numeric into Tinyint field

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Passing Numeric into Tinyint field
Page: [1]
 
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.

(in reply to sentinel)
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.

(in reply to rdouglass)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Passing Numeric into Tinyint field
Page: [1]
Jump to: 1





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