Knowledgebase: TroubleShooting
[QODBC-Desktop] Using QODBC with SQL Server Linked Server - INSERT/UPDATE/DELETE via OPENQUERY
Posted by William - QODBC Support on 19 October 2026 11:20 AM

[QODBC-Desktop] Using QODBC with SQL Server Linked Server - INSERT/UPDATE/DELETE via OPENQUERY

Problem Description:

When using QODBC as a linked server in MS SQL Server (SSMS), attempts to INSERT/UPDATE/DELETE records via standard T-SQL (e.g., UPDATE QODBC...TableName) may fail with OLE DB provider errors such as:

  • Error 7343: "The rowset was using optimistic concurrency and the value of a column has been changed"
  • Error 7412: "Row cannot be located for updating"
  • Error 7395: "Cannot start more transactions on this session" (nested transaction required)
  • "Error parsing complete XML return string"

Affected products: QODBC Desktop, MS SQL Server (linked server via MSDASQL)
Expected outcome: Use OPENQUERY to perform INSERT/UPDATE/DELETE operations on QODBC linked tables reliably.

Symptoms:

  • Standard SQL UPDATE/INSERT/DELETE on a linked server table fails with OLE DB errors 7343, 7412, or 7395.
  • The same query works correctly in the QODBC Test Tool.
  • The issue appears after upgrading to a newer version of QODBC (e.g., v358+).

Cause:

QODBC does not support all OLE DB features required by MS SQL Server linked server direct UPDATE/INSERT/DELETE operations. The MSDASQL provider requires optimistic concurrency and nested transaction support that QODBC may not fully expose to the linked server layer. Using OPENQUERY bypasses these limitations by sending the query directly to QODBC.

Environment:

RequirementDetail
QODBC Version v24.0.0.358+ (direct UPDATE may also fail on earlier versions)
MS SQL Server Any version using the MSDASQL OLE DB provider
Linked Server Named "QODBC" or custom name pointing to QuickBooks Data DSN

Resolution:

Use the OPENQUERY function in MS SQL Server to perform INSERT/UPDATE/DELETE operations on QODBC linked tables.

Updating Records via OPENQUERY

Incorrect (may fail with error 7343/7412):

UPDATE a
SET CustomFieldOther = 'C'
FROM QODBC...Invoice a
WHERE a.TxnID = 'SOME-TXNID'

Correct (using OPENQUERY):

UPDATE OPENQUERY(QODBC, 'SELECT TxnID, CustomFieldOther FROM Invoice WHERE TxnID = ''SOME-TXNID''')
SET CustomFieldOther = 'C'

Inserting Records via OPENQUERY

INSERT OPENQUERY(QODBC, 'SELECT Name, Type FROM ItemInventory')
VALUES ('New Item', 'InventoryAssembly')

Deleting Records via OPENQUERY

DELETE OPENQUERY(QODBC, 'SELECT TxnID FROM Invoice WHERE TxnID = ''SOME-TXNID''')

Additional Notes:

  • Version matters: If you were using QODBC v358 and encountered "Error parsing complete XML return string" or nested transaction errors, upgrading to the latest version (e.g., v359+) may resolve these issues.
  • Double single quotes: In OPENQUERY strings, escape single quotes with double single quotes ('').
  • Always test in QODBC Test Tool first: Verify the query works in the QODBC Test Tool before using it via OPENQUERY or linked server.
  • Linked server not found (error 7202): If SSMS returns "Could not find server 'QREMOTE' in sys.servers," the linked server hasn't been created yet. Use sp_addlinkedserver with provider "Microsoft OLE DB Provider for ODBC Drivers" (NOT "Microsoft OLE DB Provider for SQL Server"). Selecting SQL Server as the provider is a common pitfall - QODBC requires the ODBC provider to route queries correctly.

How to Perform INSERT/UPDATE/DELETE Using OPENQUERY with Linked MS SQL Servers Troubleshooting QODBC Error 7343 and OLE DB Provider Issues QODBC Optimizer - How to Enable, Rebuild, and Troubleshoot Performance

Keywords:

SQL Server Linked Server OPENQUERY INSERT UPDATE DELETE Error 7343 Error 7412 Error 7395 MSDASQL Optimistic Concurrency SSMS OLE DB
(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).