Page 1 of 1

Error on ZConnection dfata source not found

Posted: 16.06.2021, 16:52
by Fernando
Hi all:
I try to connect to a Sql Server in Win10, with Lazarus. I set a ZConnection component, set the properties Catalog and adatabase to "contoso university" (my database), the hostname to "localhost". Also i try to set the catalog to "sqlexpress" (name of my sql server), the localhost to "localhost/sqlexpress"(the name that use Adoconnection in Delphi), and more tries, with the same result, when try to set the propertie "connected" to true, i received the following error : "[Microsoft] [ODBC Driver Administrator] The data source name cannot be found and no default driver was specified with value "true"". I unkonw where set the data source name, or specify a default controller.

Any help would be appreciated

Thanks in advance

Re: Error on ZConnection dfata source not found

Posted: 17.06.2021, 09:41
by marsupilami
Hello Fernando,
Fernando wrote: 16.06.2021, 16:52 Hi all:
I try to connect to a Sql Server in Win10, with Lazarus. I set a ZConnection component, set the properties Catalog and adatabase to "contoso university" (my database), the hostname to "localhost". Also i try to set the catalog to "sqlexpress" (name of my sql server), the localhost to "localhost/sqlexpress"(the name that use Adoconnection in Delphi), and more tries, with the same result, when try to set the propertie "connected" to true, i received the following error : "[Microsoft] [ODBC Driver Administrator] The data source name cannot be found and no default driver was specified with value "true"". I unkonw where set the data source name, or specify a default controller.
On ODBC please use ODBC connection strings. The ODBC connection string goes into the database property. The hostname is kept empty in this scenario. For examles of connection strings see https://www.connectionstrings.com/sql-server/.

Best regards,

Jan