I would double check the database. Check to make sure your are using the
Right ODBC / Database and then re-validate that the field is in fact
Set as ID and an Identity seed 1

I am assuming this is MS-SQL Server 

-----Original Message-----
From: Orlini, Robert [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 18, 2006 12:04 PM
To: CF-Talk
Subject: Insert fails?

When I insert info into my dbase I get an insert fails error. See below.


Cannot insert the value NULL into column 'ID', table
'pc_inventory.dbo.inventory'; column does not allow nulls. INSERT fails.

The ID filed is setup as an Identity field in SQL.

Any ideas please? Seems simple, but I'm stuck in neutral here. Thanks.

Insert code is:

<CFQUERY name="inventory" datasource="pc_inventory"> INSERT INTO
inventory ( department, floor, lname, fname, pcname, phone, password,
pcmodel, workgroup, ip, printerip, printer, serialnumber, port,
switchport, oldpcnumber, newpcnumber,
comments)

VALUES (
'#FORM.department#',
'#FORM.floor#',
'#FORM.lname#',
'#FORM.fname#',
'#FORM.pcname#',
'#FORM.phone#',
'#FORM.password#',
'#FORM.pcmodel#',
'#FORM.workgroup#',
'#trim(FORM.ip)#',
'#FORM.printerip#',
'#FORM.printer#',
'#trim(FORM.serialnumber)#',
'#FORM.port#',
'#FORM.switchport#',
'#trim(FORM.oldpcnumber)#',
'#trim(FORM.newpcnumber)#',
'#FORM.comments#')
</CFQUERY>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:246902
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to