|
-
Jun 28th, 2000, 10:01 AM
#1
Thread Starter
New Member
This may sound silly, but I'm a newbie and I was wondering if it's possible to set up an ADO data control using code only. Ultimately what I'm after is a way to set the Data Source in the ConnectionString to a path specified in an input file. If I set up the control by dragging one onto the form, it uses that ConnectionString value and not the one I specify during the FormLoad call. Here's what I tried in FormLoad():
Adodc1.ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
& strDBPath & ";Persist Security Info=False"
where strDBPath is read out of the input file.
The other reason I'd like to hard code it is because I give it a dummy SQL query for the RecordSource, and then construct the one I want during FormLoad based on other input variables. So I'm doing an extra query that doesn't need to be done. Any thoughts would be appreciated!
Deepfreeze
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|