Re: Performanceproblem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Alois Mair (loisi_mair_at_hotmail.com)
Date: 03/06/05


Date: Sun, 6 Mar 2005 11:26:21 +0100

Hi Leute!

Danke für die rasche Antwort. Ich habe folgende Schritte geändert, um das
abrufen eines Recordsets zu beschleunigen:

Das Recordsetobject wird wie folgt geöffnet:
  With rsObject
    .ActiveConnection = strADOConnectionString
    .CursorLocation = adUseClient
    .CursorType = adOpenStatic
    .LockType = adLockOptimistic

    .Open strSQLStatement, , , , adAsyncFetchNonBlocking

  End With

Nach wie vor dauert das Öffnen der ArtikelDB eine ganze Zeit lang ;(
Um dieses zu Optimieren habe ich einen Global Recordset erstellt, der beim
öffnen meiner Anwendung initialisiert wird, jetzt braucht er den RS nicht
jedesmal öffnen. Funktioniert einwandfrei.

Dennoch stellen sich 2 Fragen:
=> Ist diese Lösung überhaupt sinnvoll, da das Programm sich dennoch mit
100MB in den Speicher legt, oder gibt da eine elegantere Lösung, das z.b.
"Vorbereitete" Recordsets nur mehr vom Server abgeholt werden können?

=> Da mein Datagrid dynamisch gefüllt wird, ergibt sich das Problem, das das
Grid beim laden blinkt und zuckt. Kann man das Grid irgendwie "Fließend" mit
Daten füllen?

Danke für eure bisherigen Antworten
mfg Alois

"Alois Mair" <loisi_mair@hotmail.com> schrieb im Newsbeitrag
news:4228dde9$0$25276$91cee783@newsreader02.highway.telekom.at...
> Hi ngLer!
>
> Wie folgt erstelle ich per Code folgenden Recordset in VB6 SP6 und
> Microsoft ActiveX Data Objects 2.7:
>
> Dim MyRS as new Recordset
> MyRS.Activeconnection=Activeconn
> MyRS.LockType=Optimistic
> MyRS.CursorType=Dynamic
> MyRS.Open "SELECT * FROM ArtikelDB"
>
> In der Tabelle ArtikelDB sind ca. 40000 Datensätze. Dieser Recordset wird
> beim Form Onload Event geladen wo anschließend ein Grid mit den
> Datensätzen gefüllt wird. Nun habe ich das Problem, das zum 1sten,
> - Der Prozess 100MB benötigt und das wichtigste Problem 2tens
> - das das Formular zwar geöffnet wird, das Grid allerdings erst nachdem
> der Recordset geöffnet worden ist, gefüllt wird. Und das sind 3 Minuten...
>
> Weiß hier jemand einen Lösungvorschlag, wie man das Öffnen eines
> Recordsets beschleunigen kann?
>
> mfg Alois
>



Relevant Pages

  • Re: DataGrid question
    ... So no one else uses the grid with recordsets? ... > Also the grid doesn't work really well with server cursors. ... >> Exit Sub ... >> Why is it, that after the Grid1.DataSource assignment, that the datagrid ...
    (microsoft.public.vb.controls)
  • ADO Requery Problem
    ... I'm passing 2 ADO RecordSets into a dll. ... scrolling through the master grid has no effect on the detail ...
    (borland.public.delphi.database.ado)
  • Master-Detail using disconnected recordset
    ... I need to implement a master-detail grid. ... to the grid makes use of disconnected recordsets. ...
    (borland.public.delphi.database.ado)
  • Re: 2 or more databases in one datagrid?
    ... > have to get the recordsets from each database and then iterate one ... > record at a time and add them to your grid. ...
    (microsoft.public.vb.general.discussion)
  • Re: Was ist schneller AddNew oder INSERT ???
    ... >> End With ... das ist eine ganz normale Anwendung eines Recordsets im Batchbetrieb. ... > Wie ist das eigentlich mit diesem UPDATEBATCH? ... > lokales 35.000 Datensätze RS fertig. ...
    (microsoft.public.de.vb.datenbank)