Ask a Question related to Coldfusion Database Access, Design and Development.
-
surenr #1
insert using cfinsert
I have been trying to upgrade my server from CF 5 to CF 7. I have a table as
keywords with the attributes as follows:
ID int (primary key)
keyword char
In form 1 the code is as follows:
<form name="InsertKeywords" action="form2" method="post">
<input name="keyword" type="text" maxlength="255">
</form>
In form 2 the code is as follows:
<cfinsert datasource="EMP" tablename="keyword">
As the ID is a primary key the system automatically generates a unique key and
inserts into the DATABASE,Suppose if the database had the following:
Metal 10
Chalk 11
The next keyword will have the ID as 12.It used to work earlier,now i get this
odd error:
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Cannot insert the value
NULL into column 'ID', table 'EMP.dbo.keyword'; column does not allow nulls.
INSERT fails.
Any help or suggestions would help.
surenr Guest
-
a problem about cfinsert&sql.insert
hi~ when i insert data into form,there is a stranger things happend: when i insert with one value ,it's ok,but when changing the number of the... -
cfinsert help
I would like to have people insert information into a database. It's a single table in a database, so I thought I would try <cfinsert> I'm... -
cfinsert from javascript
I have write javascript to create form field when button is click. function addEvent(myTable){ var lastRow = myTable.rows.length; var... -
CFInsert
Hi. I was hoping I could get help on an issue. I am using CFInsert to add data from a form into two tables that are related. Table 1: Members... -
CFinsert misbehaves
Any ideas why a CFinsert tag would work on my partner's desktop and not on my laptop? Both are using CF 6.0 and MS Access database. All the... -
SteveBryant #2
Re: insert using cfinsert
Double check in your database that the Identity property of your ID field is true. SQL Server won't increment just because a field is a primary key. It incremenets based on the Identity property.
SteveBryant Guest



Reply With Quote

