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 : I keep getting an error '[QODBC] Assignment Error' when I try to import entire tables into Excel?Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC Frequently Asked Questions

 New Topic 
 
 Post Reply 
[1]  
 I keep getting an error '[QODBC] Assignment Error' when I try to import entire tables into Excel? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-02-25 20:18:49

Check to see if the table you are importing has any long fields and exclude them from the import. Some tables in QuickBooks have fields as long as 4095 characters and they cannot fit in a single spreadsheet cell.

A good example of this is the InvoiceLine table. If you run sp_columns InvoiceLine using VB Demo, you will see that the Memo and InvoiceLineGroupDesc columns can be up to 4095 characters long, so they can't be imported into Excel.

This means that a:

select * from InvoiceLines

will not import. You must instead select all the columns of interest that you wish to use by doing something like the following:-

SELECT InvoiceLine.TxnID, InvoiceLine.TimeCreated, InvoiceLine.TimeModified, InvoiceLine.EditSequence, InvoiceLine.TxnNumber, InvoiceLine.CustomerRefListID, InvoiceLine.CustomerRefFullName, InvoiceLine.ClassRefListID, InvoiceLine.ClassRefFullName, InvoiceLine.ARAccountRefListID, InvoiceLine.ARAccountRefFullName, InvoiceLine.TemplateRefListID, InvoiceLine.TemplateRefFullName, InvoiceLine.TxnDate, InvoiceLine.TxnDateMacro, InvoiceLine.RefNumber, InvoiceLine.BillAddressAddr1, InvoiceLine.BillAddressAddr2, InvoiceLine.BillAddressAddr3, InvoiceLine.BillAddressAddr4, InvoiceLine.BillAddressCity, InvoiceLine.BillAddressState, InvoiceLine.BillAddressPostalCode, InvoiceLine.BillAddressCountry, InvoiceLine.ShipAddressAddr1, InvoiceLine.ShipAddressAddr2, InvoiceLine.ShipAddressAddr3, InvoiceLine.ShipAddressAddr4, InvoiceLine.ShipAddressCity, InvoiceLine.ShipAddressState, InvoiceLine.ShipAddressPostalCode, InvoiceLine.ShipAddressCountry, InvoiceLine.IsPending, InvoiceLine.IsFinanceCharge, InvoiceLine.PONumber, InvoiceLine.TermsRefListID, InvoiceLine.TermsRefFullName, InvoiceLine.DueDate, InvoiceLine.SalesRepRefListID, InvoiceLine.SalesRepRefFullName, InvoiceLine.FOB, InvoiceLine.ShipDate, InvoiceLine.ShipMethodRefListID, InvoiceLine.ShipMethodRefFullName, InvoiceLine.Subtotal, InvoiceLine.ItemSalesTaxRefListID, InvoiceLine.ItemSalesTaxRefFullName, InvoiceLine.SalesTaxPercentage, InvoiceLine.SalesTaxTotal, InvoiceLine.AppliedAmount, InvoiceLine.BalanceRemaining, InvoiceLine.IsPaid, InvoiceLine.CustomerMsgRefListID, InvoiceLine.CustomerMsgRefFullName, InvoiceLine.IsToBePrinted, InvoiceLine.CustomerSalesTaxCodeRefListID, InvoiceLine.CustomerSalesTaxCodeRefFullName, InvoiceLine.SuggestedDiscountAmount, InvoiceLine.SuggestedDiscountDate, InvoiceLine.InvoiceLineType, InvoiceLine.InvoiceLineSeqNo, InvoiceLine.InvoiceLineGroupTxnLineID, InvoiceLine.InvoiceLineGroupItemGroupRefListID, InvoiceLine.InvoiceLineGroupItemGroupRefFullName, InvoiceLine.InvoiceLineGroupQuantity, InvoiceLine.InvoiceLineGroupIsPrintItemsInGroup, InvoiceLine.InvoiceLineGroupTotalAmount, InvoiceLine.InvoiceLineGroupSeqNo, InvoiceLine.InvoiceLineTxnLineID, InvoiceLine.InvoiceLineItemRefListID, InvoiceLine.InvoiceLineItemRefFullName, InvoiceLine.InvoiceLineDesc, InvoiceLine.InvoiceLineQuantity, InvoiceLine.InvoiceLineRate, InvoiceLine.InvoiceLineRatePercent, InvoiceLine.InvoiceLinePriceLevelRefListID, InvoiceLine.InvoiceLinePriceLevelRefFullName, InvoiceLine.InvoiceLineClassRefListID, InvoiceLine.InvoiceLineClassRefFullName, InvoiceLine.InvoiceLineAmount, InvoiceLine.InvoiceLineServiceDate, InvoiceLine.InvoiceLineSalesTaxCodeRefListID, InvoiceLine.InvoiceLineSalesTaxCodeRefFullName, InvoiceLine.InvoiceLineOverrideItemAccountRefListID, InvoiceLine.InvoiceLineOverrideItemAccountRefFullName, InvoiceLine.FQSaveToCache, InvoiceLine.FQPrimaryKey, InvoiceLine.CustomFieldInvoiceLineOther1, InvoiceLine.CustomFieldInvoiceLineOther2, InvoiceLine.CustomFieldInvoiceLineColor, InvoiceLine.CustomFieldInvoiceLineMaterial, InvoiceLine.CustomFieldInvoiceLineGroupOther1, InvoiceLine.CustomFieldInvoiceLineGroupOther2, InvoiceLine.CustomFieldInvoiceLineGroupColor, InvoiceLine.CustomFieldInvoiceLineGroupMaterial, InvoiceLine.CustomFieldInvoiceLineGroupLineOther1, InvoiceLine.CustomFieldInvoiceLineGroupLineOther2, InvoiceLine.CustomFieldInvoiceLineGroupLineColor, InvoiceLine.CustomFieldInvoiceLineGroupLineMaterial, InvoiceLine.CustomFieldOther, InvoiceLine.CustomFieldBDay, InvoiceLine.CustomFieldContract, InvoiceLine.CustomFieldSpousesName
FROM InvoiceLine InvoiceLine
WHERE (InvoiceLine.TxnDate>{d '2006-01-01'})

Note: CustomField names will vary depending on the names you give them in QuickBooks.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-11-20 09:38:47

You can also control the length of the column being returned by QODBC by using the LEFT function, even in stored procedure reports.

For example:

An examination of the report InventoryValuationSummary shows that the RowData and RowDataType columns can return values as long as 4096 characters:

Using the LEFT function I can extract the first 30 characters of the RowData and RowDataType columns only:

sp_report InventoryValuationSummary show ItemDesc, QuantityOnHand, RowType,
{fn LEFT("RowData", 30)} AS "Row Data", {fn LEFT("RowDataType", 30)} AS "Row Data Type"
parameters DateFrom = {d '2007-11-19'}, DateTo = {d '2007-11-19'},
ItemFilterType = 'InventoryAndAssembly'

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to