Link to home
Start Free TrialLog in
Avatar of TungVan
TungVan

asked on

Question on ADODB.Connection with VB6

Hi,

I created a variable called:

Private mConnection As ADODB.Connection


At some point of my debugging process, sometimes I see that

mConnection = ""

and sometimes

mConnection = Nothing


I know what nothing is, but is there a difference btw mConnection = "" and mConnection = Nothing



Thx
Avatar of Steve Sirica
Steve Sirica
Flag of United States of America image

I don't hink it takes some one from mensa to say "Yep, sure looks different to me."

I'll be nothing until it's initialized by say something like
set mConnection = new adodb.connection
at that point you will begin to see it as ""
Avatar of Jim Horn
Since mConnection is an Object, clearing it is done by Set mConnection = Nothing.  Setting it to an empty string might just be sloppy work on the previous developer's part.
jim I don't think Tung is setting the connection object to a connection string I think they were just illustrating it's value while looking at it at a certain poink.
ASKER CERTIFIED SOLUTION
Avatar of Bob Lamberson
Bob Lamberson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial