Re: Command Vs Connection Object
From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 10/13/04
- Next message: Stuart Clark: "Re: Viewing the contents of two tables using ASP and MS Access"
- Previous message: Ken Schaefer: "Re: Command Vs Connection Object"
- In reply to: Ken Schaefer: "Re: Command Vs Connection Object"
- Next in thread: Chris Hohmann: "Re: Command Vs Connection Object"
- Reply: Chris Hohmann: "Re: Command Vs Connection Object"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 13 Oct 2004 09:14:41 -0400
We can't. The only visible indication is that we are allowed to pass
CommandType arguments in the connection's Execute statement. These arguments
are passed to the implicit Command object.
The only reason I know this is that David Sceppa wrote about it in his
"Programming ADO" book. I seem to recall Bill Vaughn mentioning it in his
book as well. Unfortunately, both books are unavailable to me at the moment
so I can't cite page numbers.
Bob Barrows
Ken Schaefer wrote:
> Interesting - and how can we see that?
>
> Cheers
> Ken
>
>
> "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
> news:%23LfP6QRsEHA.2252@TK2MSFTNGP11.phx.gbl...
>> No, I meant what I said. A Command object is always used to send
>> command to a database. Even when you use the connection's Execute
>> method to execute the statement, in which case an implicit Command
>> object is used.
>>
>> Bob Barrows
>>
>> Ken Schaefer wrote:
>>> I think Bob means that a "connection object" is always involved.
>>>
>>> Connection objects are for connecting to database
>>> Command objects are for executing commands
>>> Recordset objects are for holding resultsets.
>>>
>>> So, you always need a connection object (or one will be created for
>>> you if required). If you are returning results, you need a
>>> recordset. Command objects can be used to specify input/output
>>> parameters to be sent to the datastore.
>>>
>>> Cheers
>>> Ken
>>>
>>> "wk6pack" <wkwan@sd61.bc.ca> wrote in message
>>> news:ONGWy0IsEHA.1644@tk2msftngp13.phx.gbl...
>>>> thanks Bob.
>>>>
>>>> Will
>>>>
>>>> "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
>>>> news:%23oh1dwIsEHA.556@tk2msftngp13.phx.gbl...
>>>>> wk6pack wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I was wondering which is better to use? I'm accessing two
>>>>>> different databases in my asp page. One thru ODBC and the other
>>>>>> MS Jet. Should I use a command and a connection object to
>>>>>> connect to the two databases?
>>>>>> Or should I use two connection objects?
>>>>>>
>>>>>> thanks,
>>>>>> Will
>>>>>
>>>>> A Command object is ALWAYS involved, even if you do not explicitly
>>>>> create one.
>>>>>
>>>>> It looks to me as if you need two Connection objects, since you
>>>>> are connecting to two databases. Unless you are not planning to be
>>>>> connected to both of them at the same time...
>>>>>
>>>>> --
>>>>> Microsoft MVP -- ASP/ASP.NET
>>>>> Please reply to the newsgroup. The email account listed in my From
>>>>> header is my spam trap, so I don't check it very often. You will
>>>>> get a quicker response by posting to the newsgroup.
>>
>> --
>> Microsoft MVP - ASP/ASP.NET
>> Please reply to the newsgroup. This email account is my spam trap so
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
- Next message: Stuart Clark: "Re: Viewing the contents of two tables using ASP and MS Access"
- Previous message: Ken Schaefer: "Re: Command Vs Connection Object"
- In reply to: Ken Schaefer: "Re: Command Vs Connection Object"
- Next in thread: Chris Hohmann: "Re: Command Vs Connection Object"
- Reply: Chris Hohmann: "Re: Command Vs Connection Object"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|