Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Slow response using ADOX Catalog over thin client.

Posted on 2004-08-10
6
Medium Priority
?
523 Views
Last Modified: 2013-11-27
Hi since migrating my application from dao to ADO I am experiencing slow repsonses accessing the catalog object. In DAO I used query definations.

The reason I am using the catalog is to access quieries in an access 2000 database. There are probably about 100 queries most of which have parameters.

The main delay seems to be with the opening of the catalog. I know I could change this so that the catalog is opened at the begining of the application but what would happen if some one crashed out.

Also one of the other problems I am having is that I have to put a delay into the program otherwise no data is returned.

    Dim conn As ADODB.Connection
    ConnectToDB conn
    Set cat = New ADOX.Catalog
    'set the catalog the current connection
    cat.ActiveConnection = conn
    'set the command to the query name
    Set cmd = cat.Procedures("dp_Appoints_Qry").Command   'Killer SQL that has UNION...

    'give the parameters
    cmd.Parameters("AP CODE") = (Entity.code)
    Wait 0.2
    Set ApptRS = New ADODB.Recordset
    ApptRS.Open cmd

Thanks MrPan
0
Comment
Question by:MrPan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 11761119
Why do you pass over the ADOX ?
ADODB Command has a Parameters.Refresh function

Dim conn As ADODB.Connection
    ConnectToDB conn
    'set the command to the query name
    Set cmd = new ADODB.Command
    cmd.command = "dp_Appoints_Qry"
    cmd.parameters.refresh
    'give the parameters
    cmd.Parameters("AP CODE") = (Entity.code)
    Wait 0.2
    Set ApptRS = New ADODB.Recordset
    ApptRS.Open cmd

Please report if this works for your...

CHeers
0
 
LVL 2

Author Comment

by:MrPan
ID: 11761420
Angel

Thanks for the quick reply.

cmd.command is not acceptable. I have tried changing this to commandtext but the parameters do not get loaded.

Any suggestions

0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 11761518
Sorry for the typo.

Also, I forgot to connect the command with the connection object...

Dim conn As ADODB.Connection
    ConnectToDB conn
    'set the command to the query name
    Set cmd = new ADODB.Command
    cmd.commandtext = "dp_Appoints_Qry"
    set cmd.activeconnection = conn
    cmd.parameters.refresh
    'give the parameters
    cmd.Parameters("AP CODE") = (Entity.code)
    Wait 0.2
    Set ApptRS = New ADODB.Recordset
    ApptRS.Open cmd

Cheers
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 2

Author Comment

by:MrPan
ID: 11761519
OK

I have now got it working by adding

cmd.activeconenction = conn

and

cmd.commandtext = "Select * From dp_Appoints_Qry"

I will have to change the code in a few places to see if it is any quicker. I will let you know what I find out.
0
 
LVL 2

Author Comment

by:MrPan
ID: 11761525
Found it at the same time. Great minds.....
0
 
LVL 2

Author Comment

by:MrPan
ID: 11771366
Many Thanks

Mr Pan
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question