Susan Harkins
harkins at iglou.com
Wed Mar 12 09:56:00 CST 2003
Exactly Mark -- you can use a connection string or a connection object. The latter requires more code, but the connection string, as Charlotte or Doris pointed out (sorry, I can't remember which one of you said that), the connection string can be a pain to work with. Other than that though, I can really find no advantage to using a Connection object. I expected to find some benefit, such as properties or methods available only via the Connect object, because most of the code samples I see uses the Connection object, but other than perspective, I can see no advantage. I'll keep digging around a little, but so far, I've not really turned up anything. Susan H. > > Would the explanation be that in your sample code > > With cmd > .ActiveConnection = strConn > > It appears that the connection is being initialised here. Perhaps in the > other example, it reads clearer when you are passing in a live cnn > connection rather than strCnn. > > Having said that, you could use cnn in both scenario's. > > I do think ( as I think you do ), that your way is neater. > > For a further question on this, see my new thread 'Using Global Connctions' > > Best Regards > > > Mark L. Breen > Solution Providers Ltd > Ireland > > > > > ----- Original Message ----- > From: "Susan Harkins" <harkins at iglou.com> > To: <accessd at databaseadvisors.com> > Sent: Tuesday, March 11, 2003 10:01 PM > Subject: Re: [AccessD] ADO Command object > > > -- I still > don't see the advantage of using the Connection object instead of a > connection string. > > I'm not arguing -- I just don't understand. The light's not going on. :) > > Susan H. > > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > >