[AccessD] ADO Command object

Arthur Fuller artful at rogers.com
Thu Mar 13 07:05:01 CST 2003


Maybe this is what you want, Susan? With a connection object you can do
things like this:

Debug.print CurrentProject.Connection.Properties("User ID")

-----Original Message-----
From: accessd-admin at databaseadvisors.com
[mailto:accessd-admin at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: March 12, 2003 10:46 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] ADO Command object


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
>
>

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list