Re: connect to db in codes



Keith,

Let's assume that you want an Ado connection named conn

You can either have a component in a form or datamodule named conn and
manage its properties programattically
begin
conn.connectionstring := 'your connection string';
conn.open;
end;

or

You can create your component programattically and then manage its
properties

Var
conn : TADOConnection

begin
conn := TADOConnection.create (Application)
conn.connectionstring := 'your connection string';
conn.open;
end;

Regards,

Mac

"Keith" <support@xxxxxxxxxxxxx> wrote in message
news:44707633@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

Is it possible to connect to access or sql server purely in codes not
using components?

thanks



.