If you just leave out the athid on the insert statement you should be fine.  The point 
of autoID is that you don't have to specify the value.



>>> "CF_JONNY" <[EMAIL PROTECTED]> 03/18/02 04:12PM >>>
When inserting a new record I get an error saying that the autoID fields
cannot use a null value.

how do I write the sql like this?

<CFQUERY NAME="reg_ath" DATASOURCE="name" DBTYPE="ODBC" >

INSERT INTO ATHLETES (athid, athFirstName, athLastName, athAge, AthEmail ,
athStreet , AthCity , athState, athZip, athgoals )

VALUES (#Form.athId#, ' #FORM.athFirstName#', '#FORM.athLastName#'  ,
#FORM.athAge # ,'#athEmail#',  '#FORM.athStreet#' ,  '#FORM.athCity#' ,
'#FORM.athState#' , #FORM.athZip#, ' #FORM.athGoals# ')

</CFQUERY>


On form page;

   <input type="hidden" name="athid">


JON



_________________________________________________________

Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com 




______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to