Has anyone ever come across GENERATEDKEY not being...
# cfml-general
d
Has anyone ever come across GENERATEDKEY not being output in the result struct for MSSQL (we are on 2014 and AWS RDS) insert (ACF2018 on Ubuntu)? The key is autoincrement, pk etc. The box is not checked in the datasource config. I tried the SET NOCOUNT ON/OFF. No error on the insert. The insert is happening.
t
I've found that it doesn't work if you're using the microsoft jdbc driver. But using the built in one from Adobe, it works fine.
d
Well weird, it is the default one, which I always use. "Microsoft SQL Server" in the dropdown
t
don't know. You can probably work around it with an
OUTPUT
statement, which might be better anyway.
d
ya, or
Copy code
select Scope_Identity() as [ID]
just stinks when you expect something to work.
💯 1
👍 2