> Any idea why I'm getting an "Error Executing Database Query." > With this? > I can take out the query and return "lesson" and "row" just fine. > Lesson and ID in the table are varchar and integer type fields > respectively. > > <cfcomponent> > <cffunction name="recieveData" access="remote"> > <cfargument name="lesson" type="string" required="yes"> > <cfargument name="row" type="string" required="yes"> > <cfquery name="updateDB" datasource="coursesDB"> > UPDATE Lessons > SET Lesson = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" > value="#Arguments.lesson#"> > WHERE ID = <cfqueryparam cfsqltype="CF_SQL_INTEGER" > value="#Arguments.row#"> > </cfquery> > <cfreturn #Arguments.lesson#> <!---Test. works fine when cfquery > removed---> > </cffunction> > </cfcomponent>
My guess is that one of the following is true: 1. You don't have a datasource called "coursesDB". 2. The user account used by CF doesn't have rights to update the Lessons table. 3. The Lessons table belongs to another user account, so your user account can't see it without specifying the username explicitly ("UPDATE otherusername.Lessons ..."). 4. The table is not in fact named "Lessons". 5. The table doesn't have a field called "Lesson". 6. The "Lesson" field doesn't contain a VARCHAR. 7. The table doesn't have a field called "ID". 8. The "ID" field doesn't contain an INTEGER. 9. You're passing the wrong datatype to one of the fields - my guess would be that Arguments.row should be a number instead of a string. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211940 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54