Re: Cannot Connect ADOConnection at Run-Time
- From: "Andy" <andy@xxxxxxxxxxxxxx>
- Date: Thu, 28 Apr 2005 12:25:19 +0930
Try setting the 'Persist Security Info=False'
You have it set to false in your original settings in design time - but then
setting it to true in your run time code.
Andy
"Mike Sandoval" <NoThankYou@xxxxxxxxxxxxxx> wrote in message
news:426e3bcc@xxxxxxxxxxxxxxxxxxxxxxxxx
> 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...
.
- 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
- Re: Cannot Connect ADOConnection at Run-Time
- From: Mike Sandoval
- Cannot Connect ADOConnection at Run-Time
- Prev by Date: Re: stored proc RETURN_VALUE.... there it is, I want to use it !!!
- Next by Date: Re: ADO and BLOB
- Previous by thread: Re: Cannot Connect ADOConnection at Run-Time
- Next by thread: ADO Tab Missing
- Index(es):