RogerCooper
Registered User.
- Local time
- Yesterday, 22:43
- Joined
- Jul 30, 2014
- Messages
- 788
I am receiving the error "You must use the dbSeeChanges option with OpenRecordset when accessing a SQL Server table that has an IDENTITY column" when running the following code.
When I run this in the immediate mode, it works correctly. The error only occurs when I use it in code (I have set SQLString to the code I wish to run).
Any ideas on how to avoid this error.
Code:
INSERT INTO [CRM Analysis] ( ID, [Table], [Date], CREATED_BY, ASSIGNED_TO )
SELECT dbo_CRM_Task.ID, "Task" AS Expr1, dbo_CRM_Task.CREATE_DATE, dbo_CRM_Task.CREATED_BY, dbo_CRM_Task.ASSIGNED_TO
FROM dbo_CRM_Task LEFT JOIN [Task in CRM Analysis] ON dbo_CRM_Task.ID = [Task in CRM Analysis].ID
WHERE (((dbo_CRM_Task.CREATE_DATE)>=#7/1/2024#) AND (([Task in CRM Analysis].ID) Is Null));
When I run this in the immediate mode, it works correctly. The error only occurs when I use it in code (I have set SQLString to the code I wish to run).
Code:
DB.Execute SQLString
Any ideas on how to avoid this error.