Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizing this query
Message
De
15/03/2006 15:37:16
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Optimizing this query
Divers
Thread ID:
01104684
Message ID:
01104684
Vues:
58
Using VB.Net, I am updating 122 records by replacing a field with an empty value. This is terribly long. I takes about 4 to 6 seconds while I can have this in milliseconds in VFP. How can I optimize the following code to obtain the same optimization:
            ' Reset the date on all
            loDataView = loDataProvider.oDataView
            For lnCounter = 1 To loDataProvider.nCount
                loRow = loDataView(lnCounter - 1).Row
                loDataProvider.ParameterClear()
                loDataProvider.ParameterAdd("AI", loRow("CCS_PK"))
                If loDataProvider.SQLUpdate("UPDATE MitTelLog " + _
                 "SET MitTelLog.XMLDowndt=" + Framework.DateFunction.GetEmptyDate() + " " + _
                 "WHERE MitTelLog.AI=?", Framework.App.aConnection(1)) = False Then
                    Throw New System.Exception(Framework.App.cError)
                End If
            Next
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform