Inserting and Updating Invoices with ASP.NET |
Author |
Message |
|
Posted : 2006-12-21 04:05:25 |
I purchased the server edition of QODBC but when I try to insert or update invoices the page just hangs and does nothing. Here is my code:
Dim sConnectStringInvoiceAdd As String Dim sSQLInvoiceAdd As String Const adOpenStatic = 3 Const adLockOptimistic = 3 Const adUseClient = 3
sSQLInvoiceAdd = "" & _ "INSERT INTO Invoice (CustomerRefFullName, ClassRefFullName, ARAccountRefFullName, TxnDate, TermsRefFullName, DueDate, SalesRepRefFullName, IsToBePrinted) " & _ "VALUES ('" & CustomerNameQB & "', '" & ClassRefFullName & "','Accounts Receivable', {d'" & ConvertInvoiceDateQB & "'}, 'Due on receipt', {d '" & ConvertDueDateQB & "'},'" & SalesRepQB & "',FALSE)"
Response.Write(sSQLInvoiceAdd & "<br><br>") 'Response.End()
sConnectStringInvoiceAdd = "DSN=QuickBooks Data;OLE DB Services=-2;" Dim oConnectionInvoiceAdd As New ADODB.Connection Dim oRecordsetInvoiceAdd As New ADODB.Recordset oConnectionInvoiceAdd.Open(sConnectStringInvoiceAdd) oRecordsetInvoiceAdd.CursorLocation = adUseClient
oRecordsetInvoiceAdd.Open(sSQLInvoiceAdd, oConnectionInvoiceAdd, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic)
oRecordsetInvoiceAdd.Close() oRecordsetInvoiceAdd = Nothing oConnectionInvoiceAdd.Close() oConnectionInvoiceAdd = Nothing
The sql statement is correct when I run it in the VBDemo. Any help would be appreviated. My client cannot do their job without this working.
|
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-12-21 08:23:53 |
You cannot insert records into the Invoice table without inserting FQSaveToCache InvoiceLine transactions immediately prior to the Invoice insert as per: How do I create Invoices? |
|
|
|
|
Posted : 2006-12-21 08:33:55 |
I tried that. It still hangs and does nothing. |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-12-21 08:47:03 |
|
|
|
|
Posted : 2006-12-21 09:09:10 |
I have version 7.00.00.199
How do I go about getting v7.00.00.204 ? I do not see an upgrade anywhere on the site. DO I have to pay again to get the latest version? |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-12-21 10:23:49 |
|
|
|
|
Posted : 2006-12-22 01:58:20 |
I installed the latest version but now my lookup queries will not work.
In version 7.00.199 I could run this query: SELECT MAX(FullName) As FullName, MAX(ListID) As ListID FROM Class WHERE FullName LIKE 'PETROLEUM TANKLINES DIVISION:WEST FLORIDA TERMINAL:13%'
In the latest version this gives me an "internal error" |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-12-22 10:14:51 |
I have just ran:
SELECT MAX(FullName) As FullName, MAX(ListID) As ListID FROM Class WHERE FullName LIKE 'PETROLEUM TANKLINES DIVISION:WEST FLORIDA TERMINAL:13%'
and:
SELECT MAX(FullName) As FullName, MAX(ListID) As ListID FROM Class WHERE FullName LIKE 'New Construction%'
because I don't have a 'PETROLEUM TANKLINES DIVISION' class, and both statements ran without error for me. |
|
|
|