Error on ZConnection dfata source not found

Forum related to MS SQL Server

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
Fernando
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 14.06.2021, 10:47

Error on ZConnection dfata source not found

Post 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
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Error on ZConnection dfata source not found

Post 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
Post Reply