Re: Cannot Connect ADOConnection at Run-Time
- From: Mike Sandoval <NoThankYou@xxxxxxxxxxxxxx>
- Date: Tue, 26 Apr 2005 08:02:07 -0500
Andy wrote:
What is your ConnectionString ?
Andy
"Mike Sandoval" <NoThankYou@xxxxxxxxxxxxxx> wrote in message news:426dab20$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Thank you Betsy,
It still does not work. It only works if it is set Connected := true at design time; otherwise, I cannot connect at Run-time.
Any other ideas?
Mike
Andy,
Here is my ConnectionString:
Provider=MSDASQL.1;Persist Security Info=False;User ID=administrator;Extended Properties="DSN=MS Access Database;DBQ=C:\Data\ABC Database\db1.mdb;DefaultDir=C:\Data\ABC Database;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;"
I have also tried...
strfile := 'C:\Data\ABC Database\db1.mdb';
with ADOConnection1 do begin
Close;
ConnectionObject := nil;
end;
ADOConnectionString := '';
ADOConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;';
ADOConnectionString := ADOConnectionString + 'Data Source=' + strfile + ';';
ADOConnectionString := ADOConnectionString + 'Persist Security Info=True' +';';
ADOConnection1.ConnectionString := ADOConnectionString;
Thanks... .
- Follow-Ups:
- Re: Cannot Connect ADOConnection at Run-Time
- From: Andy
- Re: Cannot Connect ADOConnection at Run-Time
- From: Betsy
- Re: Cannot Connect ADOConnection at Run-Time
- References:
- Cannot Connect ADOConnection at Run-Time
- From: Mike Sandoval
- Re: Cannot Connect ADOConnection at Run-Time
- From: Betsy
- Re: Cannot Connect ADOConnection at Run-Time
- From: Mike Sandoval
- Re: Cannot Connect ADOConnection at Run-Time
- From: Andy
- Cannot Connect ADOConnection at Run-Time
- Prev by Date: Master / detail with TADODataset?
- Next by Date: Re: Master / detail with TADODataset?
- Previous by thread: Re: Cannot Connect ADOConnection at Run-Time
- Next by thread: Re: Cannot Connect ADOConnection at Run-Time
- Index(es):