[Last Call] Learn how to a build a cloud-first strategyRegister Now


Two select statements on one table getting an error upon posting to table

Posted on 2011-10-21
Medium Priority
Last Modified: 2012-05-12
  I need to run a query on a table that displays some information in a dropdown list and retrieves other information that will post to a new table upon submission.  Here is an example of what I am trying to accomplish:

                 Select LastName + ' ' + FirstName + ' ' + 'office ' + ' ' + Company AS Agent,Paynum,AssociateCell
              From tblUser
                   Where Inactive = '0' AND Role ='agent'
                    Order By LastName

When I try to post the data to a new table I get the following error:
Error Diagnostic Information
An error occurred while evaluating the expression:
Error near line 64, column 37.
Error resolving parameter FORM.ASSOCIATECELL
The specified form field cannot be found. This problem is very likely due to the fact that you have misspelled the form field name.

Below is the code on the submittion page
<cfquery name="addUser" datasource="HSO">
	Insert Into savings_card            			(FName1,LName1,FName2,LName2,Address,City,State,Zip,Email,Phone,TransType,Agent,AssociateCell,Affiliation,Rep,DateEntered)
       Value  ('#form.FirstName1#','#form.LastName1#''#form.FirstName2#',

Open in new window

Question by:jdines
  • 2
LVL 16

Expert Comment

ID: 37008594
First please confirm that you have check the spell including case (I notice that there is no consistency in the format of your control names, some start with capital some start with small letter).

Also make sure that the data type that you are entering in the form is an accepted data type in the table field
LVL 16

Accepted Solution

Sheils earned 2000 total points
ID: 37008608
Also does the code work when you remove '#form.AssociateCell#'

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question