- see footer for list info -<
Just testing some apps on a new server with CFMX7. Came across a problem using querySetCell() when a column type is integer and I want to set a string value...

I get an error "Invalid data blah blah blah for CFSQLTYPE CF_SQL_INTEGER". Fair enough, that makes sense, although I didn't have this problem with CFMX6 - but what's the best way of changing the column type to CF_SQL_VARCHAR before calling querySetCell()?

Looking at a dump of qMyQuery.getMetaData() I can see that among the available metadata methods are getColumnTypeName() and setColumnTypeName(). I can use getColumnTypeName() without any trouble, it returns "NUMERIC" for the column in question. However, I get an error if I try to call setColumnTypeName() to change the column type before trying to call querySetCell() - "coldfusion.runtime.java.MethodSelectionException: The selected method setColumnType was not found."

I have a horrible workaround for this using Query of Query and CAST(), but I'd really prefer something a bit neater. Is it possible to use setColumnTypeName() or is there some other way besides my QoQ nonsense? This is the code I'm using which is barfing on me...
<cfset void = qContent.setColumnTypeName(listFindNoCase(qContent.columnList,stPD.name),javaCast("String","VARCHAR"))>



Thanks

Mark

_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to