I'm trying to troubleshoot an error that I'm getting when I try to insert/append into an Azure SQL database.
The error I'm getting:
Error: Write Data In-DB (353): Error running PreSQL on "NoTable": Microsoft OLE DB Provider for SQL Server: An explicit value for the identity column in table 'CHART' can only be specified when a column list is used and IDENTITY_INSERT is ON.\42000 = 8101
The tool that I'm using to perform the insert is Alteryx 10.0, a great data blending and advanced analytics tool, specifically the Write Data In-Database tool.
I've been trying to figure this out since Saturday morning, with no luck. This evening I decided to review the OLE connection string to see if it provided me any clues. I came across the Use Procedure To Prepare parameter in the connection string. Documentation indicates that this parameter dictates how a temporary stored procedure is created and released. There are two possible setting:
A temporary stored procedure is created when a command is prepared. All temporary stored procedures are dropped when the session is released.
A temporary stored procedure is created when a command is prepared. The procedure is dropped when the command is unprepared, when a new command is specified, or when all application references to the command are released.
Question 1: do temporary stored procedures rely upon global temporary table? If so, could this be the cause of my error, because Azure SQL database does not support global temporary variables?
Question 2: is the Use Procedure To Prepare
parameter optional? If this is in fact the problem I'm running into, the hope would be I could remove this parameter from my connection string and avoid creating a global temporary table.
EDIT: Despite the error message indicating I'm trying to insert into the identity column, I am not. I believe the beginning of the error message that specifies "No Table" is the tip off that the system is looking for a global temporary table that is not supported by Azure SQL
Thanks in advance for you input.