Thanks. Can you add the “regression” label to the bug report as asked by Zac_Spitzer?
Now, I’ve added. @Gunter, Did you saw? Please make sure of this
https://lucee.daemonite.io/t/lucee-5-3-3-62-and-cfinsert-cfupdate/6245/19?u=cfmitrah
Yes, verifying it now with a test database/table/script
Yes, cfupdate seems to be ok. I run into problems with date fields (related to this [LDEV-1344] - Lucee ) and assumed that it was because of the problems I faced with cfinsert, but it isn’t. Thanks for sorting this out!
@Gunter, OK YWC
if you change the table name to a non existent table, i see the same error
logging with sql server profiler, the error we are seeing is caused by
use [];
i.e. the database name isn’t being passed in
Msg 1038, Level 15, State 4, Line 1
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.
Msg 911, Level 16, State 1, Line 1
Database '' does not exist. Make sure that the name is entered correctly.
(also posted in jira)
looks like perhaps this commit did it
https://luceeserver.atlassian.net/browse/LDEV-1980
again, database handling changes have been made for a specific database (in this case mysql),
but only test cases for that specific database are added
Like @Zackster stated before. It broke somewhere around 21 Sep 2018, so I downgraded Lucee to 5.2.9.31, and it works fine.
This, together with the webservice problem I experienced (https://lucee.daemonite.io/t/cf-lucee-incompatibility-for-createobject-soap-request/6276/24), it’s safe to say that I better stick with 5.2.9.31 for now.
Either this regression never got fixed, or it’s back … Can someone comment on this? Any ideas?
Lucee 5.3.2.77 Error (database)
Message 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.
DatabaseName Microsoft SQL Server
DatabaseVersion 14.00.3335
DriverName Microsoft JDBC Driver 4.0 for SQL Server
DriverVersion 4.0.2206.100
I ended up by replacing all the <cfinsert and <cfupdate tags with <cfquery and SQL statements like insert into … and update …
Was a lot of work, but I like it more at the end. It’s cleaner (<cfqueryparam …).
Currently am also doing the same @Gunter.
Thanks for your input.
You should look at Notepad++ if you are on windows, as you can use it to find a string in all files in a directory and all subdirectories, you can also use it to replace all instances in a file or files
can you share an example?
that said, these tags are a code smell and should be avoided
[edit] I have deprecated them for Lucee 7
This below is code, I have executed within <cftransaction>
tag
<cfinsert datasource="dsName"
tablename="tableName"
formfields="title,name">
are you saying it only happens when wrapped in a transaction?
here’s an example test case which uses mssql and is known to work
No @Zackster, tested with/without transaction tag, am getting same error.
ok, cool, just wanted to check, as you had mentioned it
are you able to modify that test case to repo your problem?