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 : Still confused in ASP with QODBCSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Still confused in ASP with QODBC 
 Author   Message 
  Pete 
  
 Group: Members 
 Posts: 17 
 Joined: 2007-01-06 
 Profile
 Posted : 2008-04-24 01:59:19

Running QODBC  V8 with VS.Net 2005

I have a Intranet site on our Apps server. QODBC and quickbooks are installed on the same server.  QODBC to my knowledge is configured on the apps server to run using Dcom.

on my dev machine i can run the following code .. all be it very slowly ( about 10 mins ) and it pulls up nr last used Invoice number. If i publish the page to the Intranet site and access the page it just hangs.  Can anybody, in plain simple terms, show me how to fix this issue.

vb.net code

Imports Microsoft.VisualBasic

Partial Class Bureau_Invoicing

Inherits System.Web.UI.Page

 

Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load

Const adOpenStatic = 3

Const adLockOptimistic = 2

Dim oConnection

Dim oRecordset

Dim sMsg

Dim sConnectString

Dim sSQL

sConnectString = "DSN=Quickbooks Data;OLE DB Services=-2;OptimizerOn=No"

sSQL = "Select Max(RefNumber) From InvoiceLine"

oConnection = CreateObject("ADODB.Connection")

oRecordset = CreateObject("ADODB.Recordset")

oConnection.Open(sConnectString)

oRecordset.Open(sSQL, oConnection, adOpenStatic, adLockOptimistic)

StartInvNo.Text = oRecordset.Fields(0).value

 

oRecordset.Close()

oRecordset = Nothing

oConnection.Close()

oConnection = Nothing

End Sub

End Class

ASPX page

<%@ Page AspCompat="true" Language="VB" AutoEventWireup="false" CodeFile="Bureau Invoicing.aspx.vb" Inherits="Bureau_Invoicing" %>

<script runat="server">

Public Sub SetInvoiceDate(ByVal sender As Object, ByVal e As System.EventArgs)

txtInvDate.Text = DateAdd("d", -1, "01/" & CStr(Month(Date.Today)) & "/" & CStr(DatePart("yyyy", Date.Today)))

End Sub

Public Sub SetCollectionDate(ByVal sender As Object, ByVal e As System.EventArgs)

' Collection Date, nearest Banking day on or after 10 of the current month

Dim TempDate As String '= CStr(DateAdd("m", DatePart("m", Date.Today) - 1, "10/01" & CStr(DatePart("yyyy", Date.Today))))

TempDate = CStr(DateAdd("m", DatePart("m", Date.Today) - 1, "10/01/" & CStr(DatePart("yyyy", Date.Today))))

Select Case Weekday(TempDate)

Case 0

' Sunday so add 1 day

txtCollecDate.Text = DateAdd("d", 1, TempDate)

Case 7

' Saturday so add 2 days

txtCollecDate.Text = DateAdd("d", 2, TempDate)

Case Else

' collection date is a week day

txtCollecDate.Text = TempDate

End Select

End Sub

</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Bureau Invoicing</title>

</head>

<body>

<form id="form1" runat="server" >

<div>

&nbsp;

&nbsp;&nbsp;

Monthly Bureau Invoice Run<br />

<br />

<br />

Start Date : &nbsp; &nbsp; &nbsp; &nbsp;

<ASP:TEXTBOX ID="txtInvDate" runat="server" onload ="SetInvoiceDate" ></ASP:TEXTBOX><br />

Collection Date :

<ASP:TEXTBOX ID="txtCollecDate" runat="server" OnLoad="SetCollectionDate"></ASP:TEXTBOX><br />

<br />

Start Inv No: &nbsp; &nbsp; &nbsp;

<ASP:TEXTBOX ID="StartInvNo" runat="server" > </ASP:TEXTBOX>

&nbsp;

<br />

Finish Inv No. &nbsp; &nbsp;

<ASP:TEXTBOX ID="TextBox4" runat="server"></ASP:TEXTBOX></div>

</form>

</body>

</html>

As you can see its nothing complicated that im trying to achieve, but no matter how much reading of threads, i just can not get this to work on the Intranet site, and even running on localhost its very very slow. I think there are only about 7 - 8 thousand invoices in the system. any suggestions would be most appriciated

 

 
i really do need help, this computer stuff is like double dutch  
 
  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-04-24 09:53:47
The above is slow on your dev machine because you have forced the QODBC Optimizer off (OptimizerOn=No). Try setting up QuickBooks and QODBC with the company file on your Apps Server. Then test that qbcust.asp works using localhost on the Apps Server as in: How can I see QuickBooks data in a Internet Explorer Browser using Windows XP? first. 

  Top 
  Pete 
  
 Group: Members 
 Posts: 17 
 Joined: 2007-01-06 
 Profile
 Posted : 2008-04-25 17:53:02

Hi Tom,

Thanks for your response, i have tried all you suggested and it is still not working.

I have logged onto the Apps Server ( CBIAPPS ) , as Domain Administrator ( NOT under terminal Services )

I have created an Optimizer directory , which is in 'C:\Program Files\QODBC Driver for QuickBooks\Optimizer, and using the QODBC set up screen, reloaded all the data

To try and just get this working, i have given full read and write rights to the 'QODBC Driver for Qucikbooks Directory' to the following

ASP.Net Machine Account

Interactive

IUSER_CBIAPPS(IUSER_CBIAPPS@OurDomainName.co.uk)

I have put the testDCom.asp page in a dev site on our server, which i have to log into. when i log in as OURDOMAINNAME\Administrator, i get a success on all rows apart from XERCES-COM.DLL, which the error is ActiveX component can't create object

I have also amended the code posted earlier for the connection string to 'sConnectString = "DSN=Quickbooks Data;OLE DB Services=-2;OptimizerOn=Yes" .

I have tried acessing the intranet site both with quickbooks open on the Apps Server and not open, both attampts still hang and do not retrieve the last Invoice number. I'm at a total loss as to what the problem is ... help !!

Apps Server  - Windows 2003 R2

Asp,Net version on IIS - 2.0.50727

Quickbooks version  - Quickbooks Pro 2006

QODBC Version - QODBC Server Edition 2008 UK Version 8.00.00.242

 

 
i really do need help, this computer stuff is like double dutch  
 
  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-04-28 19:35:36
Please check that qbcust.asp works using localhost on the Apps Server first . qbcust.asp is found within the: How can I see QuickBooks data in a Internet Explorer Browser using Windows XP? forum post.  

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to