[Lazarus] Still trying to connect to Microsoft Excel

Larry Dalton larrydalton71 at gmail.com
Sat Sep 7 19:08:00 CEST 2024


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>


More information about the lazarus mailing list