PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [WD22] HFSQL C/S OLEDB connection issue from Excel 2016
[WD22] HFSQL C/S OLEDB connection issue from Excel 2016
Débuté par Mike James, 11 jan. 2018 05:34 - 1 réponse
Posté le 11 janvier 2018 - 05:34
I am attempting to connect to tables in a HFSQL Client Server database via OLEDB from Excel 2016.

Using Data, Get Data, From other sources, From OLEDB, I can successfully connect to a database by building a connection string via the wizard, but when I try to select a particular table, instead of a preview of the data I see an error message reading:

DataSource.Error: An error happened while reading data from the provider: 'Value cannot be null.
Parameter name: pUnk'
Details:
DataSourceKind=OleDb
DataSourcePath=data source=localhost:4900;extended properties="Language=ISO-8859-1";initial catalog=<Mydatabasename>;provider=PCSoft.HFSQL

Making the same connection via ODBC works correctly.

I have read the document Examples for using the OLE DB provider for HFSQL, which includes the following:

Connecting to a HFSQL Client/Server database with a user who has a password:
When the "Importing data" window is opened at the end of import, make sure that the password was properly stored by Excel.
To do so, click the "Properties..." button then, in the "Definition" tab, check whether the password is properly saved in the "connection string". The connection string must have the following format (with the password):
Provider=PCSoft.HFSQL;Initial Catalog=DatabaseName;User ID=User;Data Source=HyperFileSQLServer:4900;Extended Properties="";Initial Catalog=DatabaseName;Password=password (duplication of the Initial catalog= is as it appears in the document)

But when I attempt to include the user id and password in the connection string, it is not allowed ("can only be provided using credentials").


Has anyone seen this before or has any suggestions?
Posté le 15 janvier 2018 - 21:19
After further work I have found that an ODBC DSN connection is the only workable option for me to extract data within Excel from an HFSQL C/S database - I cannot get DSN-less ODBC or OLEDB to extract data, even though the connection tests for these two are successful.