Also, your statement will fail if form.sml_image_name is undefined. In that
case, the last column name specified in your columns list will be followed
by a comma.
----- Original Message -----
From: "Barney Boisvert" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, June 01, 2004 11:14 AM
Subject: RE: database error when using cfqueryparam
> Take out the "bio_f = " before the CFQUERYPARAM tag. You're already
> specifying the column name in the first parenthesized list, so you don't
> need it in the value list.
>
> Cheers,
> banreyb
>
> > -----Original Message-----
> > From: Daniel Farmer [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, June 01, 2004 11:09 AM
> > To: CF-Talk
> > Subject: database error when using cfqueryparam
> >
> > Having trouble figuring out what is causing this error....
> >
> > ERROR
> >
> > MERANT][ODBC SQL Server Driver][SQL Server]The name 'bio_f'
> > is not permitted in this context. Only constants,
> > expressions, or variables allowed here. Column names are not
> > permitted.
> >
> > SQL = "INSERT INTO team ( member_name, email_address,
> > phone_office, phone_cell, phone_fax, bio, bio_f, sml_image )
> > VALUES ( 'dan farmer', 'sdfsdf', 'sdfdsf', 'dsfsdf', 'sdf',
> > 'sdfsdf', bio_f = ? ,'' )"
> >
> > Query Parameter Value(s) -
> >
> > Parameter #1 = dsfsdfsdf
> >
> >
> >
> > MY QUERY
> >
> > <cfquery name="addit" datasource="#db_datasource#"
> > username="#db_username#" password="#db_password#"
> > dbtype="#db_type#" dbname="#db_name#" dbserver="#db_server#">
> >
> > INSERT INTO team (
> > member_name,
> > email_address,
> > phone_office,
> > phone_cell,
> > phone_fax,
> > bio,
> > bio_f,
> > <cfif isdefined('form.sml_image_name')>sml_image</cfif>
> > )
> >
> > VALUES (
> > '#form.member_name#',
> > '#form.email_address#',
> > '#form.phone_office#',
> > '#form.phone_cell#',
> > '#form.phone_fax#',
> > '#form.bio#',
> > bio_f = <cfqueryparam value="#form.bio_f#"
> > cfsqltype="cf_sql_longvarchar">
> > <cfif
> > isdefined('form.sml_image_name')>,'#form.sml_image_name#'</cfif>
> >
> > )
> >
> > </cfquery>
> >
> >
> >
>
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- database error when using cfqueryparam Daniel Farmer
- Re: database error when using cfqueryparam Bryan Stevenson
- Re: database error when using cfqueryparam Bryan F. Hogan
- RE: database error when using cfqueryparam Barney Boisvert
- Re: database error when using cfqueryparam Charlie Griefer
- Re: database error when using cfqueryparam Daniel Farmer
- RE: database error when using cfqueryparam Dave Watts
- RE: database error when using cfqueryparam Tangorre, Michael