Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default ADO Connection vs Recordset objects.

If I make a connection to a db via ADO, I would need to then make a reference
to a recordset that I wished to interrogate / interact with.

Using the recordset object you don't necessary need to using the Connection
object to get at the same data as in the example above.

I can see that if you wish to manipulate data in several recordsets in the
from the same source then opening a connection would make sense.

What, if any, are the real differences??

TIA.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default ADO Connection vs Recordset objects.

You do not have to create a connection object explicitly, you can called
recordset.open and send in a string for the connection. But this is slow -
you are better off creating the connection once and reusing the existing
connection (in a typical client server set up) rather than creating a
connection each time you want to open a recordset (this is not the case for
'large systems' where you need to be cute about utilising scarce resources
like connections).

Also, if you create the connection first then you can see if the connection
has worked and trap for that error nicely, rather than running an open
statement and have to trap for connection related errors and also for
database level errors.

There are a few articles on the MSDN that will help
--
www.alignment-systems.com


"DaveO" wrote:

If I make a connection to a db via ADO, I would need to then make a reference
to a recordset that I wished to interrogate / interact with.

Using the recordset object you don't necessary need to using the Connection
object to get at the same data as in the example above.

I can see that if you wish to manipulate data in several recordsets in the
from the same source then opening a connection would make sense.

What, if any, are the real differences??

TIA.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default ADO Connection vs Recordset objects.

Thanks John.

I guessed there would be timing / resource issues, but wasn't fully sure.

"John.Greenan" wrote:

You do not have to create a connection object explicitly, you can called
recordset.open and send in a string for the connection. But this is slow -
you are better off creating the connection once and reusing the existing
connection (in a typical client server set up) rather than creating a
connection each time you want to open a recordset (this is not the case for
'large systems' where you need to be cute about utilising scarce resources
like connections).

Also, if you create the connection first then you can see if the connection
has worked and trap for that error nicely, rather than running an open
statement and have to trap for connection related errors and also for
database level errors.

There are a few articles on the MSDN that will help
--
www.alignment-systems.com


"DaveO" wrote:

If I make a connection to a db via ADO, I would need to then make a reference
to a recordset that I wished to interrogate / interact with.

Using the recordset object you don't necessary need to using the Connection
object to get at the same data as in the example above.

I can see that if you wish to manipulate data in several recordsets in the
from the same source then opening a connection would make sense.

What, if any, are the real differences??

TIA.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default ADO Connection vs Recordset objects.

If my answer helped then can you mark it as helpful please?

--
www.alignment-systems.com


"DaveO" wrote:

Thanks John.

I guessed there would be timing / resource issues, but wasn't fully sure.

"John.Greenan" wrote:

You do not have to create a connection object explicitly, you can called
recordset.open and send in a string for the connection. But this is slow -
you are better off creating the connection once and reusing the existing
connection (in a typical client server set up) rather than creating a
connection each time you want to open a recordset (this is not the case for
'large systems' where you need to be cute about utilising scarce resources
like connections).

Also, if you create the connection first then you can see if the connection
has worked and trap for that error nicely, rather than running an open
statement and have to trap for connection related errors and also for
database level errors.

There are a few articles on the MSDN that will help
--
www.alignment-systems.com


"DaveO" wrote:

If I make a connection to a db via ADO, I would need to then make a reference
to a recordset that I wished to interrogate / interact with.

Using the recordset object you don't necessary need to using the Connection
object to get at the same data as in the example above.

I can see that if you wish to manipulate data in several recordsets in the
from the same source then opening a connection would make sense.

What, if any, are the real differences??

TIA.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
always recheck data connection library for latest connection strin FurmanGG Excel Discussion (Misc queries) 0 September 14th 07 04:48 PM
Disconencted recordset for DSN less connection cmpcwil2[_33_] Excel Programming 0 July 4th 06 03:19 PM
Connection Recordset Loop Problem with VBA - Help ina Excel Programming 2 May 12th 06 05:28 PM
VBA excel - problem with having clause in sql with adodb.connection/recordset ukp9999 Excel Programming 3 November 21st 05 07:48 AM
Missing: Microsoft ActiveX Data Objects Recordset 2.7 Library Debi[_2_] Excel Programming 2 March 4th 04 06:37 PM


All times are GMT +1. The time now is 12:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"