Link to home
Start Free TrialLog in
Avatar of juul040798
juul040798

asked on

ADODC.connectionstring empty at form_load...

I want to specify my ADODC.Connectionstring during the form_load of a program and keep this property empty as initial value. But I get an error at startup (before the form_load is completed) that the string is missing. With a normal Data-control the data1.databasename can be specified in the form_load. Why not with ADODC?
Avatar of mkmccreary
mkmccreary

Is the error you get:
    Data Source name not found, and no default driver specified.

or something like that.  If so try this.  Clear both the ConnectionString and the RecordSource property of the ADODC.  Then set the ConnectionString first, and the RecordSource next, during your Form_Load.  If this isn't your error, give me a little more information and I will try to figure it out for you.

Good Luck,
Martin
ASKER CERTIFIED SOLUTION
Avatar of agarwal_rahul
agarwal_rahul

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of juul040798

ASKER

Is it possible that the adodc1.refresh is crucial in this subject. When I do this without the refresh, it seems not to work...
Without Refresh u will not be able to populate the recordset.