Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I'm must finish a program that use

Status
Not open for further replies.

give2get

Programmer
Oct 15, 2002
8
JP
I'm must finish a program that use ADODC Data Access Component to connect and retrival data from SQLServer.
I have some ADODCs on my forms and these ADODC autoconnect before I try to change those connectstring to have right connectstr to Sql server.
Seem they are loaded before form load.
Is there any way to change connect string before form load?
Note: I must use ADODC settle on form, because My pro so big to use another method.
Thanks alot.
 
If you delete the design time values in the ConnectionString and/or RecordSource properties the controls shouldn't connect automatically

Another way to use ADO, instead of inserting the control on a form, is to set a project reference to ADO and declare variables for your ADODB objects. Can be at form level or in a bas module, public or private in scope. Eg.

Public WithEvents conSales As ADODB.Connection
Private WithEvents rsCust As ADODB.Recordset

Paul Bent
Northwind IT Systems
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top