Re: Performance problem

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



Repeated executing of "inserts" in a loop is going to slow to a crawl in
many cases.

I would suggest that you use dao (or ado) in this case.

However, are you actually used a .mdb file format (jet 4), or an actually
2007 file format (ace data engine).

I would consider using a reocrdset:

Dim dbe As DAO.DBEngine
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strMdbFile As String
Dim tdefs As DAO.TableDefs
Dim i As Integer
strMdbFile = "C:\Documents and Settings\Albert\My
Documents\Access\ScriptExample\MultiSelect.mdb"

Set dbe = New DAO.DBEngine
Set db = dbe.OpenDatabase(strMdbFile)

Set rst = db.OpenRecordset("customers")

For i = 1 To 10
rst.AddNew
rst!FirstName = "first " & i
rst!Lastname = "last " & i
rst.Update
Next i

rst.close

My guess is that the above loop to insert data will run about 100, or even
200 times faster then even what you had with sql server. It should run VERY
fast indeed...

if you have ado, that likey a cleaner object model to use, but the code is
much the same as above...

Note that "jet" ships with windows xp, and vista, so you don't actualy have
to install access to read/write mdb files on a windows box.


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@xxxxxxx


.



Relevant Pages

  • Re: Splash Screens , how could something so basic still be hard?
    ... You say that there "is no message pump to allow for further GUI ... Note that by "there is no message pump", I mean that because of the way the code is written, no message pump is working while the "splash screen" is displayed. ... In a normal Forms app, there would be a message pump loop, and there's no reason to believe that in those examples, one doesn't exist. ... The same technique is possible in Windows, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Bug in win xp: Auto-detaching modeless dialog.
    ... Destroying the dialog is important whether there is a bug or not. ... >I don't think that windows API cares about design flaws. ... >> The whole loop with a sleep in it is a colossal blunder. ... My program does some time consuming calculations and from ...
    (microsoft.public.vc.mfc)
  • Re: Who is using VB6 on: W2K, XP, Vista, W7?
    ... How many are using VB6 on XP? ... Windows 7, but I'd have to buy a whole load more hardware, probably ... Issues you may expect to encounter under Vista and Win7 are the Java problem during installation, slow redraws in the Form Designer, and various issues related to UAC. ... A more serious problem under Win7 is if you use ADO in your app. ...
    (microsoft.public.vb.general.discussion)
  • Re: Who is using VB6 on: W2K, XP, Vista, W7?
    ... How many are using VB6 on XP? ... Windows 7, but I'd have to buy a whole load more hardware, probably ... Issues you may expect to encounter under Vista and Win7 are the Java problem during installation, slow redraws in the Form Designer, and various issues related to UAC. ... A more serious problem under Win7 is if you use ADO in your app. ...
    (microsoft.public.vb.general.discussion)
  • Re: Bug 1700 - Clock drifts excessively at polling levels above 256.
    ... quicker polling adjustments if they are still needed. ... but what I am advocating is a change to the Windows port only, ... The phase-lock loop parameters determine the risetime ...
    (comp.protocols.time.ntp)