with a cfinsert tag you want to use the fieldnames attribute to pass a comma delimited 
list of the columns in your form... I generally try to avoid cfinsert and cfupdate -- 
they've been known to cause some problems -- and go with cfquery or cfstoredproc. 
Though they're helpful at the beginner level if you're not real familiar with sql. In 
any event, you could create the column list dynamically by selecting * from your table 
where your autonumber or other primary key is null -- this will return a query with no 
records, but all the columns for that table, then you can use #myquery.columnlist# in 
your cfinsert as in:

<cfquery name="getcols" datasource="mydsn">
  select * from mytable where id is null
</cfquery>

<cfinsert tablename="mytable" fieldnames="#getcols.columnlist#">

This will prevent it from trying to insert something into any non-existant columns...

> Ok,

> I'm trying not to bug everyone to death on newbie Qs. I'm
> sure this is super
> simple...

> I am inserting a cf form into the SQL table, which is
> working, until it
> hangs now with my javascript validation before submit.

> ERROR:

> Error Diagnostic Information

> Field name not found in the specified table.

> Table = 'buyers' Field = 'SUBMIT'

> Data Source = "4dra"

> SQL = ""

> Data Source = "4dra"


> I can remove the "SUBMIT" name, but then the javascript
> errors...because it
> uses the field name to check. I guess I could add a field
> in the table for
> submit, but that seems silly. Here is the javascript:

> function verify(val){
> if (val <= 7499) {
> alert("Your total Credit Card Debt must be at LEAST $7,500
> to qualify");
> document.frmForm.totalamount.focus();
> } else {
> document.frmForm.Submit.disabled = false;
> }
> }

> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To unsubscribe:
>    Send UNSUBSCRIBE to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org




s. isaac dealey                972-490-6624

new epoch                      http://www.turnkey.to

lead architect, tapestry cms   http://products.turnkey.to

tapestry api is opensource     http://www.turnkey.to/tapi

certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816


-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe:
   Send UNSUBSCRIBE to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to