Re: ADODB RECORDSET Optimierung



Hallo Daniel

Daniel Leger wrote:
Hallo Henry,

danke für die Antwort.
So wie von dir beschrieben mache ich das Ganze auch.
Mich hatte nur - in der Antwort von Michael - die Passage "schreibst dann
aber die Daten "in einem Rutsch" in die DB" zur Frage "inspiriert".

Ich habe nochmals nachgesehen. Kannst Du mir erklären, wieso Du das Recordset mit einem Static Cursor öffnest? Weisst Du was das heisst? Damit zwingst Du ADO die ganze Tabelle in den Speicher einzulesen und eine Kopie aller Records anzulegen. Das ist auch der Grund, wieso Du 800MByte Speicher benötigst, sobald Du das ADO Recordset öffnest!

Aus der ADO OH (c) Microsoft:
*adOpenStatic* 3 "Uses a static cursor. A static copy of a set of records that you can use to find data or generate reports. [..]"

Verwende besser einen Dynamischen Cursor (adOpenDynamic, rsp. 2)

Dann sollte der Speicherplatz gering bleiben, also:

objADO.Open strQUERY, CurrentProject.Connection,2,3

Das Öffnen des Recordsets wird dann auch wesentlich schneller gehen, weil nun nicht mehr fast 800MBytes eingelesen und alloziert werden müssen.

Gruss
Henry






--
Microsoft MVP Office Access
Keine E-Mails auf Postings in NGs. Danke.
Access FAQ www.donkarl.com

.



Relevant Pages

  • Re: ADO Data Control Concurrency Problem
    ... >> Editing of row in table is done with the help of ADO Data Control. ... Cursor location does not bare on whether the ... Client or Server memory. ... reflected in the open recordset. ...
    (microsoft.public.vb.general.discussion)
  • Grids on form with Private Datasession and 3 tier application
    ... like to display a recordset in a grid on my form. ... am on the verge of just coding the data access straight into my grid control ... Is my best option ADO or another idea? ... will accept ADO as a recordset or do I have to convert it back to a cursor? ...
    (microsoft.public.fox.programmer.exchange)
  • Re: get multivalued data from a Recordset
    ... can you get Recordset Open() if you try opening a table or issue ... 2i) I would try a Server-sided,Forward-Only,Read-only cursor first. ... CursorType and LockType AFTERWARDS to see what ADO _really_ returned. ...
    (microsoft.public.data.ado)
  • Re: Recordset-Problem
    ... >> Bei Deiner Variante würde als ActiveConnection nicht die ... >> Ein Recordset mit clientseitigem Cursor kann kein dynamisches Recordset ... ADO biegt sich unpassende Einstellungen von Recordset-Eigenschaften ...
    (microsoft.public.de.vb.datenbank)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)