CFInsert CFUPDATE

Currently getting the following error after upgrading from Lucee 5.2.9.31 to 5.3.2.77.

An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as β€œβ€ or [] are not allowed. Change the alias to a valid name.

MY CODE:

<cfset ffilist = "Acctid,FINStatus,FINVendor,FinLineItems">
<cfset form.Acctid = "#session.acctid#">
<!--- Other form fields passed via POST Form Data --->
<cfinsert tablename="tbl_Finance" datasource="AMX" formfields="#ffilist#">

What am I missing? Is this an actual bug? I am trying to avoid a new install. But I will if I have to.

does the error include the generated sql?

I would dump your variables before the cfinsert

Then check the database in question. You may have a NULL where NULLS are not allowed, or you may have a mismatched datatype.

Recent patches to Windows and MS SQL Server have been known to cause issues.

Additionally, I highly suggest moving away from CFINSERT as the tag on AFC or Lucee is overly dependent upon your database and datatypes. If everything doesn’t match, it will break. In some instances the data is placed in the wrong columns based upon variable order.

1 Like

The Error Occurred in
C:\Program Files\Apache Software Foundation\Tomcat 8.5_Tomcat85\webapps\pme\AMS\finance.cfm: line 52

50: <cfdump var="#session#">
51: 
52: <cfinsert tablename="tbl_Finance" datasource="AMS" formfields="#ffilist#">
53: <!---<cflocation url="#currentpage#" addtoken="false">--->
54:

can you do a try catch and dump the cfcatch for the full details