I want to connect to a SQL Server using ZEOS components under Windows, compiler is LAZARUS.
Here is my function:
procedure ConnecttoDatabase(Servername, Databasename: String;
aConnection: TZConnection); overload;
var
DatabaseStr: String;
begin
aConnection.Connected := False;
aConnection.Database := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + Databasename +'.mdb;Persist Security Info=False';
aConnection.HostName := Servername;
aConnection.Protocol := 'ado';
aConnection.Connected := True;
end;
Execute this function I get an "EOLE Exception" error, I need help on the correct connection string