Re: how to disable an AdoConnection
- From: "Vitali Kalinin" <vitkalinin@xxxxxxxxx>
- Date: Mon, 17 Jul 2006 13:46:51 +0300
"tdrgabi" <tdrgabi@xxxxxxxxx> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
news:44bb5b37$1@xxxxxxxxxxxxxxxxxxxxxxxxx
AFAIK you are replacing DesignTime connection string with new one at
the problem is that i need the connection string because in design mode i
open the datasets , when im building the grids columns to see if the data
is shown correct, or when im doing a raport file in raport designer.
and if i will relly on manually removing the connection string every time
i build a version (often) ... sometimes im gonna forget and the clients
will get the nice error at start.
i was thinking if i can stop from code the connection from connecting ...
something like having a flag CanConnect and setting it only after i choose
the server and password.
now i need a way to stop the connection from connecting i tryied on
BeforeConnect if CanConnect=false then Abort ... but it still connects ...
removing the connection string in before connect doesnt help, because i
think it already uses it, because even if i make the string empty in
before connect ,.... it still connects.
runtime, I am suggesting you to do that in BefforeConnect event. Thus you
will connect to proper DB even if you will forget to disconnect at design
time.
If this is not an option for you, you can try to subclass TADOConnection and
manipulate there with StreamedConnected property.
.
- References:
- how to disable an AdoConnection
- From: Gabriel
- Re: how to disable an AdoConnection
- From: Vitali Kalinin
- Re: how to disable an AdoConnection
- From: tdrgabi
- how to disable an AdoConnection
- Prev by Date: Re: how to disable an AdoConnection
- Next by Date: Re: how to disable an AdoConnection
- Previous by thread: Re: how to disable an AdoConnection
- Next by thread: Re: how to disable an AdoConnection
- Index(es):
Relevant Pages
|