Y'know, this has wound up being one of those "Ghost in the machine" things.
I back pedaled and took all of the cfqueryparams out of the query and
ran it a couple of times to make sure that the sql was sound, it was.
Then I added the query params back in, starting with the char fields,
they worked, then I added the cfquery params to the date fields, they
worked.
Lastly I added them back to the bit fields.. it all works.
I did make sure that the incoming cfarguments were defined as boolean,
for the corresponding bit fields, but other than that I can only assume
that I cleared something funky out of cache somewhere....
Carl Von Stetten wrote:
> Scott,
>
> What cfsqltype attribute are you using in your cfqueryparam? You might
> try "cf_sql_bit". Also, I had to write a custom function to generate
> bit values for all boolean values. Here's my function:
>
> <!--- BooltoBit can be used to convert logical boolean values
> ("on/off","true/false","yes/no", "1/0") to bit values for
> insertion into SQL databases
>
> Example:
>
> foo = <cfqueryparam value="#BooltoBit(foo)#" cfsqltype="cf_sql_bit">
>
> --->
> <cffunction name="BooltoBit" returntype="numeric">
> <cfargument name="b" type="string" required="yes">
> <cfset var result = "">
> <cfif LCase(b) eq "on">
> <cfset b = True>
> <cfelseif LCase(b) eq "off">
> <cfset b = False>
> </cfif>
> <cfif IsBoolean(b)>
> <cfif b>
> <cfset result = 1>
> <cfelse>
> <cfset result = 0>
> </cfif>
> <cfelse>
> <cfset result = -1>
> </cfif>
> <cfreturn result>
> </cffunction>
>
> HTH,
> Carl
>
> Scott Stewart wrote:
>
>> The cfqueryparam tags work fine with the character fields, but they're
>> returning true or false as opposed to 1 or 0, even though 1 or 0 is
>> passed to it from the form.
>>
>> Any ideas?
>>
>> Scott Stewart wrote:
>>
>>
>>> That's cool, I appreciate the input.
>>>
>>> thanks
>>>
>>> sas
>>>
>>> Craig Dudley wrote:
>>>
>>>
>>>
>>>> Had a good look but can't find the examples, it's fairly easy to set up
>>>> anyway.
>>>>
>>>> The MS SQL Server JDBC driver is three/jar fiels I think? Just drop them
>>>> into \ColdFusion8\runtime\jre\lib\ext and restart CF, the .jar should then
>>>> appear in the big CF Server Java Class Path box in settings summary in CF
>>>> Admin.
>>>>
>>>> When you add a datasource, elect other from the driver dropdown it will ask
>>>> you for a JDBC URL, Driver Class and Driver Name. All of which is standard
>>>> JDBC stuff but there are docs in the MS download package I think, it's not
>>>> complex either way but sorry I couldn't find my examples as it might have
>>>> saved some time.
>>>>
>>>> Craig.
>>>>
>>>> -----Original Message-----
>>>> From: Scott Stewart [mailto:[EMAIL PROTECTED]
>>>> Sent: 11 August 2008 17:14
>>>> To: CF-Talk
>>>> Subject: Re: CF 8 Built in SQL Server drivers vs. MS SQL Server 2000 SP3
>>>> Driver
>>>>
>>>> Thanks Craig....
>>>>
>>>> The higher ups have deemed this a "last resort"... so if it comes to
>>>> this I'll put up some results.
>>>> I'm pursuing what could be an issue with cfqueryparam
>>>>
>>>> Craig Dudley wrote:
>>>>
>>>>
>>>>
>>>>
>>>>> Not for a while, from memory you just drop the three MS .jar's somewhere
>>>>>
>>>>>
>>>>>
>>>>>
>>>> in
>>>>
>>>>
>>>>
>>>>
>>>>> CF's classpath and restart CF to install and creating datasources becomes
>>>>>
>>>>>
>>>>>
>>>>>
>>>> a
>>>>
>>>>
>>>>
>>>>
>>>>> bit more dificult, I'll see if I can dig up an example for you.
>>>>>
>>>>> I seem to remember that performance wasn't all that great, in fact, CF7's
>>>>> built in drivers were faster in most of my test cases. Sorry I haven't
>>>>>
>>>>>
>>>>>
>>>>>
>>>> tried
>>>>
>>>>
>>>>
>>>>
>>>>> them on CF8.
>>>>>
>>>>> The MS drivers don't cause any issues with CF's built in drivers though so
>>>>> why not give it a try on your dev box?
>>>>>
>>>>> Craig.
>>>>>
>>>>> -----Original Message-----
>>>>> From: Scott Stewart [mailto:[EMAIL PROTECTED]
>>>>> Sent: 11 August 2008 15:10
>>>>> To: CF-Talk
>>>>> Subject: CF 8 Built in SQL Server drivers vs. MS SQL Server 2000 SP3
>>>>>
>>>>>
>>>>>
>>>>>
>>>> Driver
>>>>
>>>>
>>>>
>>>>
>>>>> Hey all,
>>>>>
>>>>> I've run into an issue that I need opinions on. We've run into some SQL
>>>>> server issues, where MS is saying "patch the driver".
>>>>> Has anyone used the MS SQL Server 2000 SP3 JDBC driver in place of the
>>>>> one shipped with CF8?
>>>>> Has it cleared up 8180 errors?
>>>>> Any performance gains/losses?
>>>>> Any "gotchas"?
>>>>>
>>>>> thanks
>>>>>
>>>>> sas
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310760
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4