Application Running Very slow


I am using VB6.0 and ADO 2.1 for my application. I developed the application on WindowsNT 4.0. But my users some have Windows 95 and some have Windows 98. I installed the application on both 95 and 98 machines.
When i tested on one 98machine (which does not have VB on it) the performance was very slow event though it is Pentium II with 450Mhz. That is when accessing the data it is very slow. But when i tested on Windows95 which is Pentium with 90Mhz (it has VB on it) it was OK.

Iam using ADO 2.1 for my application. And i am using connection pooling for my application
My connection string is as follows
gConnStr$ = "Provider=MSDASQL;SERVER=" & Server & ";DATABASE=" & dbname & ";UID=" & Userid_db & ";PWD=" & PassWD & ";OLE DBServices=-2;DSN=" & DB_DSN

I am using the ODBC driver. And most of the time i am running Asynchronus queries becuase i am querying large number of records. When i tried with SQLOLEDB with Asynchronus i was not able to use the datacontrol recordset formy spread control.

And i am explictly enabling the connection pooling for my application like below

'here enableing the ODBC connection pooling
rc = SQLSetEnvAttr(0&, _
SQL_ATTR_CONNECTION_POOLING, _
SQL_CP_ONE_PER_DRIVER, _
SQL_IS_INTEGER)
If rc <> 0 Then
MsgBox "SQLSetEnvAttr Error " & rc
End If

And in my mainform unload event i am closing it like this

'here setting off the ODBC connection pooling
rc = SQLSetEnvAttr(0&, _
SQL_ATTR_CONNECTION_POOLING, _
SQL_CP_OFF, _
SQL_IS_INTEGER)
If rc <> 0 Then
MsgBox Err.Description
End If

And I ran the latest Mdac_type.exe and Dcom98.exe on client's machines beforei install my application.
I do not know why it is very slow on Windows95 which does not have VB. I do not know exactly what is the reason.

If you explain me where i am doing wrong, or anyohter suggestion i really appreciate it.

Thanks
 

svenkatapuramAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jon_RaymondCommented:
Did you use the setup program to install all referenced libraries?
0
phiroCommented:
I agree, the long wait is probably caused by an ambigious reference in the libraries that takes windows a long time to resolve.
Check for double references of you components in the registry.
Best is to create a setup application. Before running that remove "all" references to your components from the registry.
0
svenkatapuramAuthor Commented:
Jon Raymond,

Yes i used setup program to install all referenced libraries.

Phiro,

can you please elaborate your comment. I do not understand what do you mean by removing "all" references from the registry

Thanks both of you  for your help
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

svenkatapuramAuthor Commented:
I forgot to mention that i am using both DAO and ADO but the order of reference in my application is ADO 2.1 is first and then DAO.

Phiro, as you mentioned becuase of both the references causing the problem.
0
AndySulzCommented:
ReCompile the program
0
phiroCommented:
Ambigues references do come into being after a number of recompiles with different components with the same name. They are both installed in the registry and the OS gets confused as to which component is the correct one. The remedy is to go into the registry and remove all references to your components, then install the application anew.  

I have never tried a combination of DAO and ADO, so you might to consider to upgrade the DAO to ADO.

If you were able to install a VB IDE on a win98 client you would be able to use the debugger to figure out what command takes so long to compile.
Also, since ODBC drivers kan be pretty sensible to side effects, try to install other (newer) drivers for your ODBC datasources...

Hope this helps a little.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
svenkatapuramAuthor Commented:
phiro,

i removed the DAO reference from my application and recompiled the program and ran the set up again. This time it is little bit faster. But not as fast as in development environment. What i understood from your explanation that some components reference is registered twice in the registry. So remove the duplicate ones from registry and load VB again or my application ( i do not understand here)

And I do not know anything about VBIDE where can i get the information?

Thanks for your help
0
Jon_RaymondCommented:
VB IDE is just the VB interface (developement environment) that you see when you open VB.  i think Phiro is saying that when you step through the code, see which command(s) seem to hang up.  Those are the references causing the problem.

Also, have you installed the latest MDAC from microsoft.com.  This has helped me in similar situations.
0
phiroCommented:
Jon Raymond:
You are right, that was what I ment.
0
svenkatapuramAuthor Commented:
Jon Raymond,

Yes i installed the lates MDAC
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.