Dear Support,
I use last version of SDAC 4.35.1.16 prof. with Delphi 2007 with last service pack.
I have this problem / question.
I use TMSConnection component. I set connectionString at designtime and all is OK.
I set options - KeepDesignConnected to false in TMSConnection component.
I connect a TMSQuery to this TMSConnection. After this I close my TMSConnection with method Disconnect.
When I open my TMSQuery, itself open my TMSConnection.
If I set connectionString := '' and open my TMSQuery at this point I can't open Connection and I obtain an error message.
At this point my question is : is it normal this behavior ?
How can I disconnect from my DB TMSConnection component ?
Best regards.
Sergio Bertolotti
Problem/info about TMSConnection and ConnectionString property
-
- Posts: 54
- Joined: Tue 02 May 2006 12:03
- Location: Italy
You can disconnect using one of the following lines:
The KeepDesignConnected option has no sense at run time.
Setting the ConnectionString to an empty string just clears connection setting.
When you are trying to open a TMSQuery component linked to this connection, the connection automatically gets connected.
Code: Select all
MSConnection.Disconnect;
MSConnection.Close;
MSConnection.Connected := False;
Setting the ConnectionString to an empty string just clears connection setting.
When you are trying to open a TMSQuery component linked to this connection, the connection automatically gets connected.
Last edited by Antaeus on Wed 23 Apr 2008 12:08, edited 1 time in total.
-
- Posts: 54
- Joined: Tue 02 May 2006 12:03
- Location: Italy