Re: Simulating VB Nothing variant in Delphi
- From: "Mike Shkolnik" <mshkolnik2002@xxxxxxx>
- Date: Wed, 21 Jun 2006 22:39:37 +0300
UnAssigned in Delphi is the same as Nothing in VB
cat.ActiveConnection := UnAssigned;
--
With best regards, Mike Shkolnik
E-mail: mshkolnik@xxxxxxxxxxxxx
WEB: http://www.scalabium.com
"Ian Hinson" <pparagon@xxxxxxxxxxxxxx> wrote in message
news:44994410$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Often in VB code you see statements like:
Set cmd.ActiveConnection = Nothing
or
Set dbs = Nothing
To simulate Nothing in Delphi use:
var
vntNothing: OLEVariant;
begin
TVarData(vntNothing).VType := varDispatch;
TVarData(vntNothing).VDispatch := Nil;
// then you can do things like..
cat.Set_ActiveConnection(vntNothing);
without getting a data type mismatch.
Ian.
.
- Follow-Ups:
- Re: Simulating VB Nothing variant in Delphi
- From: Ian Hinson
- Re: Simulating VB Nothing variant in Delphi
- References:
- Simulating VB Nothing variant in Delphi
- From: Ian Hinson
- Simulating VB Nothing variant in Delphi
- Prev by Date: Simulating VB Nothing variant in Delphi
- Next by Date: Re: Simulating VB Nothing variant in Delphi
- Previous by thread: Simulating VB Nothing variant in Delphi
- Next by thread: Re: Simulating VB Nothing variant in Delphi
- Index(es):
Relevant Pages
|