what happens when you use a cf_sql_varchar in the queryparam? And what happens when you run the INSERT statement in a Database console window? same thing, or does it keep the leading 0's?
Mark On 4/30/07, Will Tomlinson <[EMAIL PROTECTED]> wrote: > I googled this and can't come up with a solution. > > I have an id field with a varchar datatype. I need to insert an id value into > it. <cfquery> is removing my leading 0's. > > Is there a simple way to solve this without an ugly hack? > > Thanks, > Will > > I removed the <cfqueryparam> to try and get ANYthing to work. > > <cfquery name="addinstructors" datasource="#SESSION.dsn#"> > INSERT INTO tblinstructors > ( > instructorid, > instructorfirstname, > instructorlastname , > semesterid > ) VALUES ( > #instructorid#, > <cfqueryparam value="#instructorfname#">, > <cfqueryparam value="#instructorlname#" />, > <cfqueryparam cfsqltype="cf_sql_integer" value="1" /> > ); > </cfquery> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade & see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276528 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4