• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

RDO-Control and Connections

I'm using the RDO Control from VB 5.0 Enterprise Edition.
My question is, how I am able to use only one connection for all controls. Now every control creates a connection to the SQL-Server.
Thank you for answering
 
0
Marek_Adar
Asked:
Marek_Adar
1 Solution
 
aleshCommented:
Create a module or class module in which you initialize (open) the connection at application start up (Sub Main) and declare a variable to be used thru the application which can be available for all forms (Public var).
Then set the connection for all controls thru code not in their properties at design time!
That way all your controls can and should use the same connection.

Best wishes,
Alesh
0
 
vfinnCommented:
I take it from your question that you are designing and ocx or something similar

If this is the case then simply give the ocx a property which would be of type rdoConnection and you can then pass the same connection to each control
0
 
Marek_AdarAuthor Commented:
Thank you,
I will ty it
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now