Ask a Question related to Coldfusion Database Access, Design and Development.
-
blu_sky #1
another Error executing database query
Just when I thought I had all my forms finely tuned, I get the error below,
which has me stumped (using DrmWeaver 2004, CF7, mysql):
Error Executing Database Query.
General error: Column count doesn't match value count at row 1
The error occurred in C:\Inetpub\wwwroot\haf_cf\forms\businesses.cfm: line 81
79 : <cfelse>
80 : NULL
81 : </cfif>
82 : )
83 : </cfquery>
SQL INSERT INTO contacts (mem_type, firstname, lastname, company, address,
address2, city, ste, zip, phone, fax, email, website, biz_type) VALUES ( 'CPM'
, 'Osborne' , 'Sybex' , '2121 Chapp St' , NULL , 'Baltimore' , 'MD' , '10489' ,
'555-555-4469' , '718-998-9988' , 'bill@asdx.com' , 'www.xyz.com' , 'Home
Builder' )
DATASOURCE haf
This is the form code:
<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
<cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "form1">
<cfquery datasource="fah">
INSERT INTO business_apps (mem_type, firstname, lastname, company, address,
address2, city, ste, zip, phone, fax, email, website, biz_type) VALUES (
<cfif IsDefined("FORM.mem_type") AND #FORM.mem_type# NEQ "">
'#FORM.mem_type#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.lastname") AND #FORM.lastname# NEQ "">
'#FORM.lastname#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.company") AND #FORM.company# NEQ "">
'#FORM.company#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.address") AND #FORM.address# NEQ "">
'#FORM.address#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.address2") AND #FORM.address2# NEQ "">
'#FORM.address2#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.city") AND #FORM.city# NEQ "">
'#FORM.city#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.ste") AND #FORM.ste# NEQ "">
'#FORM.ste#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.zip") AND #FORM.zip# NEQ "">
'#FORM.zip#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.phone") AND #FORM.phone# NEQ "">
'#FORM.phone#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.fax") AND #FORM.fax# NEQ "">
'#FORM.fax#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.email") AND #FORM.email# NEQ "">
'#FORM.email#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.website") AND #FORM.website# NEQ "">
'#FORM.website#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.biz_type") AND #FORM.biz_type# NEQ "">
'#FORM.biz_type#'
<cfelse>
NULL
</cfif>
)
</cfquery>
<cflocation url="../confirmation/confirm_business_mem.cfm">
</cfif>
I can't see anything wrong, but CF says that there is. I'm still going
throught the learning curve. Thanks in advance for the help.
blu_sky Guest
-
Error Executing Database Query
I have a website, which is visited by 18.000 unique users a day, who view almost 900.000 pages As you can see, one user views a lot of pages.... -
Error Executing Database Query.
The error occurred in C:\CFusionMX7\wwwroot\CFIDE\gettingstarted\tutorial\index.cfm: line 2 2 : <cfquery name="atrwork"... -
error executing database query on login
I've noticed we started getting this message when you try to Login to the website. We have recently just installed the CF standard edition 7.0 We... -
Error Executing Database Query.Communication link
Pretty much everyday when I get up now all my coldfusion sites that use MySQL just take forever to load. In fact they never load or even time out,... -
Error Executing Access Database Query
The query works in 5, chokes in MX7 Error Message: Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'. ... -
OldCFer #2
Re: another Error executing database query
You're specifying 14 DB fields but you're only supplying 13 form fields. You forgot
form.firstname, I believe.
OldCFer Guest
-
blu_sky #3
Re: another Error executing database query
Dang!! You're right! I forgot the firstname field. I learn something new everytime I visit this forum. Guess I'll hang aroung here more often. Thanks again OldCFer!
blu_sky Guest



Reply With Quote

