MySQL Forums
Forum List  »  Connector/ODBC

vb6 and dao
Posted by: chris_miller25
Date: June 22, 2005 12:19PM

Using DAO in vb6 the code below is very slow and the vb apps process goes to 100% cpu usage for 10 seconds, the mysql server process never leaves 0%:

Dim db As Database
Dim rs As Recordset

Set db = OpenDatabase("", True, False, "odbc;DRIVER={MySQL ODBC 3.51 Driver};SERVER=127.0.0.1;DATABASE=lab data;UID=user;PWD=user;OPTION=3;")
Set rs = db.OpenRecordset("select " & _
"SER.request_num,C.abbnam,EN.model,E1.sirname,E2.sirname,e3.sirname " & _
"from [small engine requests] SER,employees E1,employees E2,employees E3,customers C,engines EN " & _
" where SER.cust_id = C.cust" & _
" and SER.engine_id = EN.engineid" & _
" and SER.requested_by like E1.ecd_num" & _
" and SER.engineer like E2.ecd_num" & _
" and SER.account_manager like E3.ecd_num" & _
" order by C.abbnam,EN.model,E1.sirname,E2.sirname,E3.sirname,SER.request_num", dbOpenSnapshot)

rs.MoveLast


When I use an ADO connection the mysql process goes to 90% cpu usage and the vb app hardly breaks 10% usage. How can I get my dao connection to utilze the mysql server more for processing like the ado connection is doing?

Thank you

Options: ReplyQuote


Subject
Written By
Posted
vb6 and dao
June 22, 2005 12:19PM
July 01, 2005 05:44AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.