Panos
asked on
Invalid data '' for CFSQLTYPE CF_SQL_INTEGER
Hello experts.
Using my query i have the error :Invalid data '' for CFSQLTYPE CF_SQL_INTEGER
I get this error for a value with cfparam:
<cfparam name="Form.TUVmonth" default="">
The query is like:
<cfquery name="InsertArtikel" datasource="#dsn#">
INSERT INTO ARTIKEL (.........TUVmonth)
Values (............,<cfquerypara m value="#Form.TUVmonth#" cfsqltype="cf_sql_integer" >)
</cfquery>
The type in DB is int.
(i have this problem only when i don't put any value in the formfield Tuvmonth.)
Any help?
Using my query i have the error :Invalid data '' for CFSQLTYPE CF_SQL_INTEGER
I get this error for a value with cfparam:
<cfparam name="Form.TUVmonth" default="">
The query is like:
<cfquery name="InsertArtikel" datasource="#dsn#">
INSERT INTO ARTIKEL (.........TUVmonth)
Values (............,<cfquerypara
</cfquery>
The type in DB is int.
(i have this problem only when i don't put any value in the formfield Tuvmonth.)
Any help?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try not to use it
ASKER
I have this error:
Context validation error for tag cfprocparam.
The tag must be nested inside a cfstoredproc tag
Context validation error for tag cfprocparam.
The tag must be nested inside a cfstoredproc tag
use cfqueryparam
ASKER
Hi
This is working without cfparam.
Is this OK?
(<cfqueryparam cfsqltype="cf_sql_integer" value="#val(FORM.TUVmonth) #">)
This is working without cfparam.
Is this OK?
(<cfqueryparam cfsqltype="cf_sql_integer"
yes that is perfect
ASKER
And something else.
If i want to have default values f.e for checkboxes the value 0,is this wrong to use the cfparam tag?
If i want to have default values f.e for checkboxes the value 0,is this wrong to use the cfparam tag?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi
Thank you for your help
regards
panos
Thank you for your help
regards
panos
ASKER
If i use the cfprocparam in the query must i use the cfparam too?
(<cfparam name="Form.TUVmonth" default="">
<cfquery name="InsertArtikel" datasource="#dsn#">
INSERT INTO ARTIKEL (.........TUVmonth)
Values (............,<cfprocparam
</cfquery>)