Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : Problem with query speedSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v7 Forum

 New Topic 
 
 Post Reply 
[1]  
 Problem with query speed 
 Author   Message 
  MP 
  
 Group: Members 
 Posts: 4 
 Joined: 2007-01-11 
 Profile
 Posted : 2007-01-11 02:31:14

I am using QODBC v.7 with QB Pro 2005.  I am trying to use asp.net with qodbc and I am having a problem with a query taking two and a halp minutes to run and only return seven rows.  If I run the query in VB Demo, using the same dsn that I use in asp it takes only 7 seconds.

I have tried several suggestions that I found in the forums but have yet to find a solution.

This is the query I am running.
select invoice.customerRefListID,invoice.customerreffullname,invoice.shipaddressaddr2,invoice.memo,invoice.refnumber, invoiceline.invoicelinedesc from {oj invoice left outer join invoiceline on (invoice.refnumber=invoiceline.refnumber)}UNOPTIMIZED where invoice.shipdate = {d '2006-12-16'}

If I remove the invoiceline table and just run off of invoice the query takes about 30 seconds, which is still long for only 7 records.  Optimizer suggestions are for QB 2006 and above, so I couldn't use any of those.

Any help would be greatly appreciated.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-01-11 08:56:11

Using QODBC on ASP.NET is slow when retrieving field values. "SELECT * FROM Vendor" took ASP.NET to retrieve 3 to 5 second avg per record or row. But switching to AspCompat="true" will yield 45 to 60 records per second. Retrieval using classic ASP is fine too.

ASPCompat is a configuration setting at the start of your code. For example:

<%@ Page AspCompat="true" Language="VB" %>

<script runat="server">
    ' The components is created at construction time.
    Dim comObj As MyComObject = New MyComObject()
   
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        ' The object is first used here.
        comObj.DoSomething()
    End Sub
</script>

<html  >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
   
    </div>
    </form>
</body>
</html>

 

  Top 
  MP 
  
 Group: Members 
 Posts: 4 
 Joined: 2007-01-11 
 Profile
 Posted : 2007-01-11 09:12:43

I already have that in my page directive, and it still takes two and a half minutes to return the query.  Do I need to use classic asp for this to work?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-01-11 10:39:31
I would remove the UNOPTIMIZED tag first. 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to