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 : ASP.NET, optimizer and Optimizer is turned off errorSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 ASP.NET, optimizer and Optimizer is turned off error 
 Author   Message 
  PaulZ 
  
 Group: Members 
 Posts: 4 
 Joined: 2008-04-29 
 Profile
 Posted : 2008-04-29 06:22:53

I am trying to connect using ASP.NET.  I set up all the permission on all the DCOM servers.  If the optimizer is turned on, then my connection just hangs.  Once I turn off the optimizer, i can connect and query the data with no problem.

I then have to insert checks.  I insert into CheckExpenseLine first and then into Check.  According to examples I have seen here I am setting FQSaveToCache equal to 1 during the insert.  WHen I do this I am getting an error back: System.Runtime.InteropServices.COMException: [QODBC] Optimizer is turned off

If I omit FQSaveToCache or I set it equal to 0 it just hangs

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-04-29 08:15:24

ASP.NET runs queries as multiple treads, and the QODBC optimizer is single user only. So you need to setup a different optimizer file for the ASP.NET application to use than the other disktop applications. To do this, set up a seperate System DSN (see: How do I create or configure a QODBC DSN? ) and specify a fixed location of the optimizer database folder for the ASP.NET application to use (like: C:\Program Files\QODBC Driver for QuickBooks) instead of the default %UserProfile% method. Finally the user or system account used (Anonymous web user IUSR_machinename, ASPNET user and INTERACTIVE) by the ASP.NET application must all have full rights to the optimizer folder.

See also: ASP.NET vs Classic ASP 

 

  Top 
  PaulZ 
  
 Group: Members 
 Posts: 4 
 Joined: 2008-04-29 
 Profile
 Posted : 2008-04-29 08:36:19

when I turn the optimizer back on my app hangs when trying to open the connection.  But when I use the DisplaySql.asp page it works fine.  I saw the thread about ASP.NET and classic ASP and I put the AspCompat="True"  in the page directive, but it made no difference.

I don't mind not using the optimizer.  Shouldn't I be able to do the inserts with the optimizer turned off and not get the error:  Optimizer is turned off?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-04-29 09:18:15
Again, you still have a permissions issue with the optimizer folder. If the optimizer is off, then "Optimize data after an Insert or Update" must be also unchecked. 

  Top 
  PaulZ 
  
 Group: Members 
 Posts: 4 
 Joined: 2008-04-29 
 Profile
 Posted : 2008-04-29 09:42:20

That did it thanks.

I was under the assumption that once I turned off the optimizer it ignored all other setting on that page since they become disabled.

 

  Top 
  PaulZ 
  
 Group: Members 
 Posts: 4 
 Joined: 2008-04-29 
 Profile
 Posted : 2008-05-02 06:18:28

Now I want to turn on the optimizer. 

I created a seperate DSN and optimizer folder for my ASP app. 

which users do I have to give permissions to the folder so that my connection won't hang?  Currently it only doesn't hang if I turn off the optimizer.

 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-05-02 07:34:52
The anonymous web user IUSR_machinename, ASPNET user and INTERACTIVE must all have full rights to the optimizer folder. 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to