ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 16th, 2005, 10:33 PM
tdefreese tdefreese is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 1 tdefreese User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 36 m 9 sec
Reputation Power: 0
Post CFGRIDUPDATE error from environment change.

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>

Reply With Quote
  #2  
Old September 18th, 2005, 03:42 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,689 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 16 h 33 m 51 sec
Reputation Power: 53
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > CFGRIDUPDATE error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT