ADO Connection
- From: "Ivan Krastev" <i.krastev@xxxxxxxx>
- Date: Fri, 14 Mar 2008 22:25:54 +0100
Hi,
I'm trying to connect to acces database from delphi.
I tried different examples, but each time when I connect
appear ado login dialog and prompt me for a user and
password. After pressing OK without any input the connection is
created successfull.
How is possible to skip this dialog. I tried with different DB without
success - each time appear this dialog.
Also I have not installed access on my machine. Maybe this is the reason?
Thanks in advance!
best regards
Ivan Krastev
----------------------------------------------------------------------------
--
here is a part of my source code
var
MyDBConnection : TADOConnection;
begin
// create the connection object
MyDBConnection := TADOConnection.Create(Application);
try
// set the connectionstring
MyDBConnection.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;'
+ 'Data Source=' + PrgDir +
'pcbis_sort.mdb;'
+ 'Persist Security Info=False';
// open the connection
MyDBConnection.Open;
// do whatever you want with this connection
// (...)
// close the connection
MyDBConnection.Close;
finally
// in all cases, free the object
MyDBConnection.Free;
end;
end;
.
- Follow-Ups:
- Re: ADO Connection
- From: Jon Purvis
- Re: ADO Connection
- From: Pieter Zijlstra
- Re: ADO Connection
- Prev by Date: New find on Invalid Parameter type-Sybase ASA 9.0
- Next by Date: Re: ADO Connection
- Previous by thread: New find on Invalid Parameter type-Sybase ASA 9.0
- Next by thread: Re: ADO Connection
- Index(es):
Relevant Pages
|