JON, I've run in to this problem before and if you are using MS ACCESS then its as simple as selecting autonumber for your ID field, however if your using SQL server (any ver) you have to make the ID field Data Type ="int" and the Identity value to yes and you are good to go.
Ernie Pena Sr. CF Developer M.D. Anderson ----- Original Message ----- From: "CF_JONNY" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 3:12 PM Subject: <<<>>> SQL Question 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 ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm 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

