|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I’m running into some problems and was wondering if you can help. Thank you in advance for your time.
I have 2 environments. First one - Cold Fusion 4.5 SQL 7.0 Second one - Cold Fusion 7.0 SQL 2000 I migrated all my codes and table structure from 1st to 2nd. The problem I am having is in the CFGRIDUPDATE. Whenever I try to update a row in a grid, I get this error message below. The same primary keys are their in both database. Can anyone tell me what my problem is? Any help will be greatly appreciated!!! This is my error Message: Primary key not found for the "CTX_DM_ADJUSTMENTS" table. The table you are attempting to UPDATE (CTX_DM_ADJUSTMENTS) does not have a primary key (a field or set of fields which uniquely identify each record). The error occurred in D:\Test\Direct_Mail_Inventory\DM_Adjustments_Update.cfm: line 10 8 : <body> 9 : <font face="Arial, Helvetica, sans-serif"> 10 : <cfgridupdate grid="GRIDAdj" 11 : datasource="PS8CURDEV" dbtype="ODBC" 12 : tablename="CTX_DM_ADJUSTMENTS" > Here's the Grid CFM page. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <cfinclude template="header2.cfm"> <html> <head> <title>Direct Mail Inventory Management</title> </head> <body> <CFform action="DM_Adjustments_Update.CFM?" method="post"> <CFQUERY NAME = "qGetDM_Adjustments" datasource = "PS8CURDEV"> SELECT * FROM CTX_DM_ADJUSTMENTS WITH (NOLOCK) where 0=0 <cfif isdefined ("FORM.BU") AND #FORM.BU# IS NOT ""> and BUSINESS_UNIT = '#FORM.BU#' </cfif> <cfif isdefined ("Form.CUST_ID") AND #Form.CUST_ID# IS NOT ""> and CUST_ID = '#RTRIM(FORM.CUST_ID)#' </CFIF> <cfif isdefined ("Form.ITEM_ID") AND #Form.ITEM_ID# IS NOT ""> and ITEM_ID = '#RTRIM(FORM.ITEM_ID)#' </CFIF> and (STATUS = 'U' OR STATUS is NULL) </CFQUERY> <div align="center"><strong><font size="5"><cfoutput> Item Adjustments <br> </cfoutput></font></strong><font size="5"><cfoutput></cfoutput></font></div> <cfoutput> <div align="center"> <input name="Update" type="Submit" value="Save"> <br> </div> </cfoutput> <cfoutput> <div align="center"><a href = 'DM_Adjustments.cfm'>Item Adjustments</a><br> <a href = 'DM_Home.cfm'>Home</a><br> <br> </div> </cfoutput> <div align="center"><br> <cfgrid name = "GRIDAdj" Width = "1000" query="qGetDM_Adjustments" insert="yes" Sort = "Yes" selectmode="edit" > </cfgrid> </div> </CFform> |
|
#2
|
|||
|
|||
|
Unfortunately I don't use CFGRID so I won't be able to offer much help. All I can recommend is to ensure that there is indeed a primary key in the table and that you are passing the correct id field from the grid.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > CFGRIDUPDATE error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|