-
how to make faster execution time for vb
Hi everyone,
I have an interface (a form using visual basic code) to execute sql statement to update the database access 2007 on sql server. The interface takes a long time to execute the sql statement. Does anyone has any idea how to speed up the run time execution for vb? Thanks in advance
-
Difficult to say without seeing your code. Please post your SQL query and the code you're using to execute it.
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
Here is my code:
Private Sub cmdResetNotSelectedCustomer_Click()
If dropdown.ItemData(dropdown.ListIndex) <> vbNullString Then
Dim selectCustomer As String
selectCustomer = CStr(dropdown.ItemData(dropdown.ListIndex))
If msgbox("Do you want to RESET all Customers except " & selectCustomer & "?", vbYesNo + vbQuestion, "Reset Customer") = vbYes Then
Dim strSQL As String
strSQL = "UPDATE Main SET Downloaded = 0, Errors_Fail = 0, Error_Code = '', Time_Updated = '' WHERE Enabled = Yes And Customer <> '" & selectCustomer & "'"
CurrentDb.Execute (strSQL)
End If
Else
msgbox "Please select a Customer", vbInformation, "Select Customer"
End If
End Sub
-
Do you have indexes on your Enabled and Customer columns? If not, try adding them; that should speed up your query execution.
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
Phil, How can I add index in Enabled and Customer? Can you show me a sample of code? Thanks
-
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Similar Threads
-
By dhaya in forum Database
Replies: 11
Last Post: 08-25-2003, 05:24 PM
-
By Michael Q. Gautier in forum Careers
Replies: 28
Last Post: 07-26-2002, 07:57 PM
-
By Phil Wright in forum .NET
Replies: 1
Last Post: 01-31-2002, 12:13 AM
-
By Tom Sell in forum authorevents.kurata
Replies: 1
Last Post: 04-20-2000, 02:28 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks