Re: Linking to Access in VB

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

From: onedaywhen (onedaywhen_at_fmail.co.uk)
Date: 02/25/04


Date: 25 Feb 2004 01:43:02 -0800


"Bob Boran" <mcsdsmurf@hotmail.com> wrote in message news:<OZ3OSmy#DHA.684@tk2msftngp13.phx.gbl>...

> One of the biggest changes from ADO to ADO.net is the disconnected model
> that ADO.Net employs. This means that where in ADO, when you added or
> altered a row, it wrote to the database.

Not so. I've always used ADO classic in a disconnected fashion and
only 'write to the database' when the connection has been
re-established e.g.

  ' Open connection
  Connect True
    
  ' Set recordset properties
  With m_rsMain
        
    ' Client-side cursor crucial for disconnected recordset
    .CursorLocation = adUseClient
    .CursorType = adOpenStatic
    .LockType = adLockBatchOptimistic
    .Source = strSql
    .ActiveConnection = m_oConn
    .Open
    .ActiveConnection = Nothing ' << disconnect
  End With
    
  ' Close connection
  Connect False

  ' Do something with disconnected recordset
  ...

--


Relevant Pages

  • Re: ADO - delete/ update recordsets
    ... whether any of the records IN the disconnected recordset has been ... not ADO) is tied to the database which is... ... And even if you resynch, ...
    (microsoft.public.access.modulesdaovba)
  • Re: ADO - delete/ update recordsets
    ... whether any of the records IN the disconnected recordset has been ... not ADO) is tied to the database which is... ... And even if you resynch, ...
    (microsoft.public.access.modulesdaovba)
  • Re: ADO - delete/ update recordsets
    ... whether any of the records IN the disconnected recordset has been modified. ... not ADO) is tied to the database which is... ... And even if you resynch, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Row cannot be located for updating
    ... Should I use a server side cursor? ... > When you use clientside cursors and make changes or delete a record in the ... > client ADO needs to Generate SQL to update the Record in your ... To do this it must be able to find the record in your database ...
    (borland.public.delphi.database.ado)
  • Cant Disconnected a Recordset
    ... I'm trying to Setup a Disconnected recordset from a SQL Server 2000 database. ... ado is an active connection, the first line has no problem at all. ... I have used disconnected recordsets before and this is the first time I got this error. ...
    (microsoft.public.vb.database.ado)