Re: Is this the right method for opening recordsets in ADO ?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Oscar (oku_at_xs4all.nl)
Date: 03/21/04


Date: Sun, 21 Mar 2004 14:50:57 +0100

Hi Val,

>
> My opinion is that best way to open recordset is to get it opened on a
> client side, disconnect and work with it.

What is the best way to disconnect recordsets ?

Public Function RST(strSQL As String) As Object

        Set RST = New ADODB.Recordset
        RST.CursorLocation = adUseClient
        RST.Open strSQL, DB, adOpenForwardOnly, adLockReadOnly

End Function

dim rstQ as object
set rstQ=RST(strSQL)

Is this sufficient to have the client side recordset disconnected and work
with recordset rstQ ?

>Also it is always good
> idea to use explicit INSERT, UPDATE and DELETE SQL statement to manipulate
> records directly in a database, rather then to open recordset and
> delete/update/insert records there.
>

In what respect ? Performance, stability ?

regards,
Oscar



Relevant Pages

  • RE: Query SQL Server
    ... disconnect each time it calculates. ... What you really need to do is use an ADO disconnected recordset in VBA. ... connection while saving the recordset (and the query results). ... > The PartNo column contains values that a user has entered. ...
    (microsoft.public.excel.programming)
  • Re: Really disconnect a recordset?
    ... > I've got a recordset that comes from a query where some of the fields are ... On the client side, I want to be ... > update back to SQL Server. ... Make it client-sided, make sure locktype is not readonly, disconnect the ...
    (microsoft.public.data.ado)
  • Re: unbound continusous form?
    ... If you want to create your own disconnected recordset, ... be to take a real recordset, disconnect it and stream it to a string in ... sylvain aei ca (fill the blanks, no spam please) ...
    (microsoft.public.access.adp.sqlserver)
  • Re: disconnect recordset
    ... One of the primary requisites for a recordset to become a disconnected ... ' Create instance of connection object and then open the ... Set Conn = New ADODB.Connection ... ' Disconnect the recordset. ...
    (microsoft.public.vb.database.ado)
  • Re: Cant Disconnected a Recordset
    ... Your recordset is opened on a server side, ... When I try to disconnect I get an error: ... > used disconnected recordsets before and this is the first time I got this ...
    (microsoft.public.vb.database.ado)