Cfgridupdate not updating
Generally, this is done using the primary key that is usually unique for each record in the table. (Which I can't use...binding that) Using Coldfusion 8.
Essentially, when a row is inserted, the DB should be adding the primary key, not the grid, due to auto increment, but it seems as if theres a conflict.You could also try using cftry/cfcatch to catch the database exception and look at the SQL being used from within the cfcatch object.I don't use cfgrid so I don't have too much to offer.””’hen an error is encountered, all updating stops leaving some changes made but others undone without any determine the state in which the data in the database has been left.• With the CFGRIDUP DATE tag you have no control over the order in which changes are made: Row deletions happen first row insertions next, and finally updates to existing rows are executed.The subject of how CFGRIDUPDATE handles updates to existing records needs to be addressed.
As you know from using the SQL UPDATEstatement, to effectively update a single record in a database you need to be able to identify it uniquely by using one or more fields in the record.
Cold Fusion creates the following arrays as Form variables to return edits to grid rows and cells: Form.mygrid.col2[ change_index ] Form.mygrid.col3[ change_index ] Form.mygrid.original.col1[ change_index ] Form.mygrid.original.col2[ change_index ] Form.mygrid.original.col3[ change_index ] Form.mygrid. Action[ change_index ] The value of change_index increments for each row that changes, and does not indicate the specific row number.
When the user updates data or inserts or deletes rows, the action page gets one array for each changed column, plus the Row Statsus. The action page does not get arrays for unchanged columns.
I use this code that I've found in the reference but when i try to insert a new record coldfusion give me this error: "cfgridupdate could not find the grid named First Grid" So, i write a new code with cfgrid and cfgridupdate but coldfusion give me always the same error.
but First Grid is the cfgrid name parameter passed to the page for the cfgridupdate tag?
Basically, I have a bunch of users I'm entering into a grid. I want all of the users to be saved with that category id.