TMyConnection - username, server etc

TMyConnection - username, server etc

Postby Hans » Wed 11 Jan 2006 20:47

Hi,

I currently use multiple connections in my application and have some questions. I use one main connection which prompts for logon at the start of the program. All other connections are per Form.

1. Even if I set connected=false (Except main connection) the other connections seem to connect automatically, since I do not call 'connect'. Is this the way it should work?

2. Do I have to set pooling options in all TMyConnection instances?

3. Last username is stored in registry. Can I force it to be stored in a differend registry key

I hope someone can answer these questions, since i cannot find much information in the Helpd.

best regards,
Hans
Hans
 
Posts: 52
Joined: Wed 24 Aug 2005 20:05

Postby Ikar » Thu 12 Jan 2006 10:38

> 1. Even if I set connected=false (Except main connection) the other
> connections seem to connect automatically, since I do not call 'connect'.
> Is this the way it should work?

Of course, connection shouldn't open spontaneously.
But it's valid behavior if you, for example, open linked DataSets.

> 2. Do I have to set pooling options in all TMyConnection instances?

It depends on your task. In most cases ConnectionPooling isn't needed.

> 3. Last username is stored in registry. Can I force it to be stored in a
> differend registry key

Currently MyDAC doesn't provide such functionality. You should write your
own connection dialog.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby Hans » Thu 12 Jan 2006 17:21

Thanks for your response!

I have chosen to use pooling since I believ it will improve performance when using multiple connections. I set the minimum number of connectiosn to 10, so i expect that these connections will stay open untill I disconnect or my application quits.

What I ment with my question is that i wonder if i choose to use pooling, do i have to set the polling in each connection object or is it enough to set these options in one object. Will it then be activated for all connections?

best regards,
Hans
Hans
 
Posts: 52
Joined: Wed 24 Aug 2005 20:05

Postby Ikar » Mon 16 Jan 2006 10:09

>I have chosen to use pooling since I believ it will improve performance
>when using multiple connections.

The pooling option is effective if you have a lot of short-living connections during work session. This situatuation is common for web applications.

> Will it then be activated for all connections?

To activate pooling for all MyConnections in your application, you have to do it for each MyConnection object. For more information see MyDAC Help.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56


Return to MySQL Data Access Components