Ask a Question related to Coldfusion Database Access, Design and Development.
-
adotfilm #1
MS Access UPDATE not updating with cfquery
Three columns will update (GolaCalls, GoalContacts, and GoalAppts). However,
the two columns FirstName and LastName remain unchanged even if there is a
change to the field #form.FirstName# or #form.LastName#.
I get no error messages and if I hardcode #form.FirstName# to something like,
FROG, then it works. The variable is being passed as I have it print out for
verification.
Any ideas why FirstName and LastName will not update?
CODE:
<cfquery datasource="scorecarddb" username="####" password="####"
name="uploadrep">
UPDATE #tblName#
SET FirstName = '#form.FirstName#', LastName = '#form.LastName#', GoalCalls =
'#form.GoalCalls#', GoalContacts = '#form.GoalContacts#', GoalAppts =
'#form.GoalAppts#'
WHERE ((LastName = '#form.LastName#') AND (FirstName = '#form.FirstName#'));
</cfquery>
adotfilm Guest
-
Cfquery Update Syntax Suddenly bad???
The following code has been working for 2yrs or so; And suddenly I get the following error; Error Executing Database Query. Syntax error in... -
Results of update in CFQUERY
And what about delete? Seems like delete does not return anything neither. -
Error executing a cfquery update statement. PLEASE HELP
I have been over and over this. I am trying to update a simple table. I took this script from the same server using a different DSN. I keep... -
update query not updating
Hi I am trying to update via an datagrid only nothing seems to happen how would I diplay what the update query looks like msgbox reponse.write?... -
Update not updating :(
Hi guys, Still having problems with updating my mysql database records. I can now enter the data i want to update but, when I check the database... -
Dan Bracuk #2
Re: MS Access UPDATE not updating with cfquery
Look at your where clause. You are saying change the names if they are equal the new values.
What is the primary key of your tblName table?
Dan Bracuk Guest
-
adotfilm #3
Re: MS Access UPDATE not updating with cfquery
OK, good point. So I'm trying the WHERE clause with the primary key 'ID',
having this field passed into the query from a hidden field--BUT--it still
isn't working.
UPDATE #tblName#
SET FirstName = '#form.FirstName#', LastName = '#form.LastName#', GoalCalls =
'#form.GoalCalls#', GoalContacts = '#form.GoalContacts#', GoalAppts =
'#form.GoalAppts#'
WHERE ID = '#form.ID#';
adotfilm Guest
-
Dan Bracuk #4
Re: MS Access UPDATE not updating with cfquery
Take the quotes away from any numeric fields. ID is probably one of them.
Dan Bracuk Guest
-
adotfilm #5
Re: MS Access UPDATE not updating with cfquery
Thank you for your help. I created another column to use as an unique numeric ID for each person and referenced that. Couldn't make the Primary Key work for some reason. Thanks again.
adotfilm Guest



Reply With Quote

