I am getting an error when linking to a page with the following query

<cfquery name="get_itemtitle" datasource="#request.dsn#" maxrows=1>
SELECT * FROM items
WHERE itemid = <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#attributes.itemid#">
</cfquery>

the url I use to link to this page is

/index.cfm?fuseaction=nonsitepage.display&itemid=1577&preview=true

the error occurs sometimes when the page firsts loads with the following error

Invalid data '' for CFSQLTYPE 'CF_SQL_INTEGER'.

whereas when you refresh again and again it always works

any thoughts on why this might be?

thanks in advance
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to