Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2024-09

Still trying to connect to Microsoft Excel

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Larry Dalton

I need help with this EXCEL Error code: "Could not start transaction! ODBC error details: LastReturnCode:SQL_ERROR;Record 1:SqlStat:HYC00; NativeError:106;Message:[Microsot][ODBC Excel Driver]Optional feature not implemented;" I am trying to acces an Excel Workbook from a Lazarus pascal application using TSQLQuery

I am using Microsoft365 Excel, on a Windows11 os, and Lazarus 3.2. I am using a TODBCconnection with the following settings:

Name:OdbcConnection1;

Driver: Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, .xlsb)

Params: DBQ=C:\Programs\InventoryData\inventory.xlsm

Connected=true

Transaction= SqlTransaction1

I am connecting this with TSQLQuery with following settings:

AutoCalcFields= true (I?ve tried both true and false with this one and doesn?t matter)

Database=ODBCConnection1

ParseSQL=true

SQL=Select * from [Cadillacs$]

Transaction=SQLTransaction1

UsePrimaryKeyAsKey=false (tried both ways)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240907/41bf6a05/attachment.htm>

Reply by email