Hi again to everyone,
I would like to thank Stephen and Bret for their help earlier. I managed to
get things working on the update form, although I haven't moved to the
state_id rather than the state_name system yet. I still receive errors
(ColdFusion was unable to determine the value of the parameter) with
#selected_var# using Steven's method, but Bret's works fine.
Now I have yet another problem on my update action page and although I am
learning SQL at the moment I don't have enough knowledge to understand what
I should do here.
I would like to note that <CFUPDATE DATASOURCE="dbcms"
TABLENAME="tbldistrib">, works great. I would, however, like to learn the
proper SQL for the update action because I have been told that it is much
better than CFUPDATE. Please correct me if I am mistaken.
Any help with this will be much appreciated.
My Query is as follows:
<CFQUERY DATASOURCE="dbcms">
UPDATE tbldistrib
SET distrib_name='#Form.distrib_name#',
distrib_city='#Form.distrib_city#',
distrib_state='#Form.distrib_state#',
distrib_phone='#Form.distrib_phone#'
WHERE distrib_id = '#distrib_id#'
</CFQUERY>
I have a hidden field in my update form for the distributor ID:
<INPUT TYPE="hidden" NAME="distrib_id" Value="#distrib_id#">
The error I receive is:
ODBC Error Code = 22005 (Error in assignment)
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria
expression.
SQL = "UPDATE tbldistrib SET distrib_name='Calico Corners III',
distrib_city='Charlston', distrib_state='SOUTH CAROLINA',
distrib_phone='555-555-5555' WHERE distrib_id = '31'"
Data Source = "DBCMS"
The error occurred while processing an element with a general identifier of
(CFQUERY), occupying document position (2:1) to (2:29) in the template file
c:\inetpub\wwwroot\cms\updatedata.cfm.
Thanks for your time,
Mike
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]