Question : [ODBC Microsoft Access Driver]Invalid descriptor index error

I'm trying to take some information a user enters into a form and add it to a database (MS Access), but one field gives me this error when the entry is longer than a certain length:

Error Executing Database Query.

[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver]Invalid descriptor index

The field in the data base is "memo", and I have the cfsqltype set to longvarchar. I don't understand why it isn't working. Any ideas?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
<cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "form1">
  <cfquery datasource="residents">   
    INSERT INTO notes (jssn, jnote, jDate)
    VALUES (
    <cfif IsDefined("FORM.residentName") AND #FORM.residentName# NEQ "">
    <cfqueryparam value="#FORM.residentName#" cfsqltype="cf_sql_clob" maxlength="255">
    <cfelse>
    ''
    </cfif>
    , <cfif IsDefined("FORM.thenote") AND #FORM.thenote# NEQ "">
    <cfqueryparam value="#FORM.thenote#">
    <cfelse>
    ''
    </cfif>
    , <cfif IsDefined("FORM.notedate") AND #FORM.notedate# NEQ "">
    <cfqueryparam value="#FORM.notedate#" cfsqltype="cf_sql_longvarchar">
    <cfelse>
    ''
    </cfif>
    )
  </cfquery>
  
</cfif>

Answer : [ODBC Microsoft Access Driver]Invalid descriptor index error

Do yourself a favor and get rid of all the automated wizard code. It's hard to read (and is also wrong).  What happens if you run this code?

*  You need to supply the data types for the first two columns.  I'm assuming TEXT/VARCHAR, but change as needed

<cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "form1">
  <cfquery datasource="residents">  
    INSERT INTO notes (jssn, jnote, jDate)
    VALUES (
    <cfqueryparam value="#FORM.residentName#" cfsqltype="cf_sql_varchar" maxlength="255">
    ,  <cfqueryparam value="#FORM.thenote#" cfsqltype="cf_sql_varchar" >
    ,  <cfqueryparam value="#FORM.notedate#" cfsqltype="cf_sql_longvarchar">
    )
  </cfquery>
 
</cfif>

Random Solutions  
 
programming4us programming4us