Also, as a future ER or KB article, I have noticed that on an edit form with a chooser control that there has to be at least one updatable field on the form for everything to work. It would be nice to display the field values and still user a chooser control. In this instance, I really don't have a requirement to update anything except the values in the chooser.

Jeff

Jeff Fleitz wrote:
I am working with an Access 2003 database, which has a table called Workshop. Workshop is a spouse of PlumUser via the PlumUserWorkshop table which is storing just the autoincrementing keys from the parents (UserID, WorkshopID).

I have a form called WorkshopRegistrationForm, which is essentially a PlumUserEdit form or ProfileEditForm, with a DisplayChooser tag that allows a user to select workshops.

    <cf_DisplayChooser
        spouseTable="Workshop"
        childTable="PlumUserWorkshop"
        spouseTablePrimaryKey="WorkshopID"
        spouseTablePrimaryKeyType="integer"
        foreignKeyFromChildTableToMainTable="UserID"
        foreignKeyFromChildTableToSpouseTable="WorkshopID"
        chooserLabel="Select Your Workshops"
        maximumNumberOfOptions="100"
        spouseTableDisplayColumn="WSTitle"
        spouseTableDisplayColumnType="Text"
        attachedItemsLabel="Registered"
        unattachedItemsLabel="Not Registered">


The chooser works fine when originally adding workshops, but when coming back in after some have been successfully added, I am getting a SQL error for a 'datatype mismatch in criteria'. Looking at the query, quotes are surrounding the integer values in the WHERE clause.

These are brand new unmodified tags, the project was created today. I have not seen this one before, probably because I am using SQL Server most of the time. I am curious as to why I don't seem to have any problems with the PlumRoles chooser control in the PlumUserEditForm. Any clues? Of course my 'one day project' just hit a major snag ;)


Processing Request
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

The error occurred in D:\wwwroot\fmc_dev\components\DatabaseBlocks.cfc: line 68
Called from D:\wwwroot\fmc_dev\customtags\DisplayChooser.cfm: line 191
Called from D:\wwwroot\fmc_dev\customtags\DisplayChooser.cfm: line 95
Called from D:\wwwroot\fmc_dev\customtags\DisplayChooser.cfm: line 22
Called from D:\wwwroot\fmc_dev\ws\WorkshopRegistrationForm.cfm: line 45
Called from D:\wwwroot\fmc_dev\components\DatabaseBlocks.cfc: line 68
Called from D:\wwwroot\fmc_dev\customtags\DisplayChooser.cfm: line 191
Called from D:\wwwroot\fmc_dev\customtags\DisplayChooser.cfm: line 95
Called from D:\wwwroot\fmc_dev\customtags\DisplayChooser.cfm: line 22
Called from D:\wwwroot\fmc_dev\ws\WorkshopRegistrationForm.cfm: line 45

66 :         <cfif Len(Trim(Arguments.orderByClause)) GT 0>
67 :             ORDER BY #PreserveSingleQuotes(Arguments.orderByClause)#
68 :         </cfif>
69 :         </cfquery>
70 :


--------------------------------------------------------------------------------

SQL SELECT Workshop.WorkshopID, Workshop.WSTitle FROM Workshop WHERE WorkshopID NOT IN ('3','12') ORDER BY Workshop.WSTitle
DATASOURCE   fmc
VENDORERRORCODE   -3030
SQLSTATE   22018








**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:

http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************

Reply via email to