Quantcast
Channel: FLEXquarters.com Limited
Viewing all 313 articles
Browse latest View live

[QODBC-Online] Troubleshooting - How to use QODBC Online with Fil...

$
0
0

Troubleshooting - How to use QODBC Online with FileMaker

Problem Description:

I downloaded the trial version of your driver this morning and am really excited about the prospects. I’ve installed it and am able to get the fields and tables to appear in VB Demo, but I am not able to connect using Filemaker Pro.

 

Solutions:

Please follow below-mentioned steps for FileMaker connectivity using QODBC Online

1) Open FileMaker Pro & click on Browse button.

step2.png

2) Please select the ODBC data source.

 step3.png

3) Please select the ODBC data source "QuickBooks Online Data" & click on "continue" button.

step3.png

4) Please enter user name & password for ODBC data source. If you have not defined any user name & password, then just click on "OK" button.  

 step4.png

5) Select tables & columns which you want to use, then please click on "Insert into SQL Query" & "Execute" button.

step5.png


6) Save result & you can see results.


step6.png

step7.png

 

[QODBC-Online] Configure QODBC Online for use with Jitterbit Comm...

$
0
0

Configure QODBC Online for use with Jitterbit Community Edition 3.0.0 (QRemote)

To use QODBC Online with Jitterbit community edition 3.0.0, you should follow the steps below to configure your QODBC Online driver and Jitterbit connection. These steps work for QODBC with Jitterbit 3.0.0 on 32 bit Windows 7. Other platforms have not been tested.

First, you need to configure QRemote. To configure QRemote please follow below steps:

QRemote has two components “QRemote Client Driver for QODBC Online” and “QRemote Server for QODBC Online” 

QRemote Client Driver: Allows 64 Bit Applications to connect to QRemote Server and sends the Request to QRemote Server for Processing.  

QRemote Server: Processes requested instruction from QRemote Client to QuickBooks using QODBC Online DSN Driver. 

 

Start “QRemote Server for QODBC Online” from the start menu. ( If QRemoteServer is not running ) 

 

Double click the QRemote Server icon from the system tray

QRemote Server Main screen, shows the IP address and Port it allows the QRemote Client to connect to.

Make a note of IP address and Port number listed on the QRemote Server “Event Logs window”

Create a new DSN entry/or configure the existing one

Navigate to Start Menu, QODBC Drivers for Use with QuickBooks Online and click

Configure QODBC Online Data Source

QODBCStartMenu.png

"QuickBooks Online Data QRemote" is the default DSN created when installing QODBC.

 

Configure the DSN and provide the IP address and Port as listed under “QRemote Server”

Under the QRemote for QuickBooks Online– Client  DSN configuration screen, Please fill in the following information 

  • Data Source Name: Name of your DSN entry 
  • Server: IP address displayed on QRemote Server 
  • Port: Port displayed on QRemote Server 
  • Encryption Key :   

    (Keep Encryption Key empty/blank. In case you want to use encrypted data transfer between QRemote client and QRemoteServer, You can configure your encryption key on QRemoteServer and use the same on QRemote Client DSN) 

  • Remote DSN: select the QODBC Online DSN from the list. ( Make sure QRemote Server is running) 

After configuring QODBC, you need to configure Jitterbit. To configure Jitterbit please follow below steps:

1. Start the Jitterbit client

2. Right-click Sources and create a New Source

http://support.flexquarters.com/esupport/newimages/Jitterbit/Step4.png

 

3. Type QBONLINE in the Name field

4. Select Database for the type

5. Click Options

6. Ensure the box marked “Construct connection string manually” has a tick in it

7. Enter DSN=QuickBooks Online Data QRemote into the field adjacent to the checkbox.

8. Click the Save icon.

http://support.flexquarters.com/esupport/newimages/Jitterbit/Step5.png

[QODBC-Desktop] Troubleshooting - How to give refund to existing ...

$
0
0

Troubleshooting - How to give refund to existing CreditMemo using QODBC

Problem Description:

How can I apply a refund check to an existing credit memo using QODBC?

In QuickBooks, I can refund by opening the Create Credit Memos/Refunds dialogue box using the QuickBooks UI and find the credit memo for that customer. In the dialogue box icon bar, click on the "Use credit to give a refund".



Solutions:

You can use CheckApplyCheckToTxn table which is Insert Only table to create a check to pay off a credit memo. You can give refunds to an existing credit memo by using below queries:

INSERT INTO CheckExpenseLine (AccountRefListID,ExpenseLineAccountRefListID,ExpenseLineAmount, ExpenseLineMemo,ExpenseLineCustomerRefListID, ExpenseLineBillableStatus, FQSaveToCache) Values ('20000-933270541','40000-933270541',80,'Test Memo','800000E2-1513333899',null,1)



Insert into CheckApplyCheckToTxn ( AccountRefListID,PayeeEntityRefListID,TxnDate,ApplyCheckToTxnTxnID,ApplyCheckToTxnAmount) values ('20000-933270541','800000E2-1513333899',{d'2017-12-18'},'1B3C0-1513338090',80)



After executing above queries, you can see CreditMemo as Refunded in QuickBooks.



You can get ApplyCheckToTxnTxnID from TxnID field of CreditMemo table for that particular Transaction by using below query.

SELECT TxnID,RefNumber FROM CreditMemo where RefNumber='1268'



[QODBC-Desktop] How to use PowerShell with QODBC

$
0
0

How to use PowerShell with QODBC

Download Sample

Sample Code for using QODBC DSN:

$connectstring = "DSN=QuickBooks Data;"

$sql = "Select TOP 10 Name from Customer"

$conn = New-Object System.Data.Odbc.OdbcConnection($connectstring)

$conn.open()

$cmd = New-Object system.Data.Odbc.OdbcCommand($sql,$conn)

$da = New-Object system.Data.Odbc.OdbcDataAdapter($cmd)

$dt = New-Object system.Data.datatable

$null = $da.fill($dt)

$conn.close()

$dt

 

 

Script execution & Result:

Open Windows PowerShell (x86) from start menu:

Navigate to your PowerShell script folder:


Run your PowerShell script:

 


Result:

 

Sample Code for using QRemote DSN:

$connectstring = "DSN=QuickBooks Data QRemote;"

$sql = "Select TOP 10 Name from Customer"

$conn = New-Object System.Data.Odbc.OdbcConnection($connectstring)

$conn.open()

$cmd = New-Object system.Data.Odbc.OdbcCommand($sql,$conn)

$da = New-Object system.Data.Odbc.OdbcDataAdapter($cmd)

$dt = New-Object system.Data.datatable

$null = $da.fill($dt)

$conn.close()

$dt


Please refer: How to configure QRemote

Please Note: If you have 64-bit application, then you need to use QRemote 64-bit DSN "QuickBooks Data 64-Bit QRemote"

Also Refer:

QODBC Reports Architecture Mismatch Problem When connecting


[QODBC-ALL] Installation Problem with QODBC

$
0
0

Installation Problem with QODBC

Problem Description:

I am trying to install QODBC on my system installation hung (not responding) at 10 % then gave the error below:
Could not load the DLL library
C:\Windows\System32\fqqb32.dll. Invalid access to memory location.

 

 

Solution:

You might face this issue if ssleay32.dll & libeay32.dll (Open SSL files) corrupted or did not have any version or any details of the file in the file property.

The cause of the corrupted or wrong libeay32.dll file could be any other software which also uses similar technology might have replaced this. QODBC will not install this file is it already exists and is same or newer version.


To resolve this issue, You need rename libeay32.dll & ssleay32.dll file & install QODBC again.

You can find libeay32.dll & ssleay32.dll from:

If you have 32-bit machine:
C:\Windows\System32\

If you have 64-bit machine:
C:\Windows\SysWOW64\

To rename file, Right-click on file & click on "Rename"
Rename both files one by one.

Rename file:

 

Rename file:



Now install QODBC. Refer: Connecting QODBC Driver to QuickBooks for the First Time (Video)

Verify both Open SSL files after installation. You will notice that files have version other details of the file in the file property.

 

[QODBC-Desktop] Installation Steps for Windows 10

$
0
0

For windows 8 or 8.1 click here

Installation Steps for Windows 10

After you have downloaded QODBC Installer, navigate to the “Downloads” Folder or the location where you have saved QODBC Installer. Run the installer as administrator by Right clicking on the Installer and selecting "Run As Administrator".  Don't forget to read the "Readme" file during installation for the latest information on QODBC setup, new features, and other driver information.

 

 

 

Please close all the applications, it is better to reboot the machine before starting the Installation.  During the installation You will be asked to select the Region of QuickBooks you are using, this should match the version of the driver you purchased. Next select the destination directory to install the QODBC support files. Click "OK" to continue.

 

 

 

 

 

The FLEXquarters QODBC Driver for QuickBooks® has been successfully installed on your computer. You can begin to use it immediately because it will run as a free 30-day evaluation edition, serving as all editions of QODBC depending on how it is configured.

 

QODBC installed on Machine                        

 

 

To install a full purchase QODBC registration code to an evaluation copy from a previous download, see the Icons that have been added to your Start Menu on your Windows 10. i.e. “Purchase QODBC Now”

 

 

 

The first step in configuring the driver is to click on the QODBC Setup Screen icon and the setup screen will become available.

 

 

 

Also refer:

Connecting QODBC Driver to QuickBooks for the First Time (Video)

How to setup QODBC Driver to auto-connect to QuickBooks. (Video)

How to setup QODBC to run without QuickBooks

 

[QODBC-ALL] Function/Purpose/Features included in QODBC Server Ed...

$
0
0

There is no performance difference between QODBC Server Edition license and QODBC Read/Write license.

There is no difference in the commands, queries, data or schema between QODBC Server Edition license and QODBC Read/Write license.

QODBC is a client-side driver that would normally reside on the workstations/client machine(s).

QODBC Server edition license is required when you have any service-based application like SQL Server, WebServer, Windows Service connecting to QODBC or if you are installing QODBC on Terminal Service/Remote Desktop Service enabled machine.

QODBC license depends on the application you want to use. When the machine using the services likes a webserver, PHP MS SQL Server, windows task scheduler and connecting to QRemote/QODBC need a server license.

So If you are using any service-based application, then you need QODBC Server Edition.

If you want to use a desktop based application like MS Access, MS Excel and you want to Read Only access, then you need QODBC Read Only license.

If you want to use a desktop based application like MS Access, MS Excel and you want to Read Write access, then you need QODBC Read Write license.

QODBC licensing is machine wise. if you have QODBC Server Edition license activated on your Server, your workstations if using QODBC/QRemote driver(s) directly will still need a QODBC License. You need to buy a license of QODBC/QRemote for each of your workstations in which you want to use QODBC/QRemote driver(s).

Also, refer:
QODBC Licensing Information
QODBC with QRemote Licensing Information

 

 

[QODBC-Online] QODBC Online Menu Items

$
0
0

QODBC Online Menu Items

When you install QODBC Online below menu items are created under QODBC Driver for use with QuickBooks Online folder in start menu.



 

1. Configure QODBC Online Data Source 64-Bit

Configure QODBC Online Data Source 64-Bit option will help you to create/configure QRemote 64-bit DSN which is used in the 64-bit application.

 

2. Configure QODBC Online Data Source

Configure QODBC Online Data Source option will help you to create/configure QODBC & QRemote 32-bit DSN which is used in the 32-bit application.

 

3. Purchase QODBC Online Now

Purchase QODBC Online Now option will navigate you to QODBC website for purchasing a QODBC Online license.

 

4. QODBC Online Quick Start Guide

QODBC Online Quick Start Guide option will open a start guide which will guide you to how to use QODBC Online.

 

5. QODBC Online Setup Screen

QODBC Online Setup Screen option will help you to configure different setup option in QODBC Online.

 

6. QRemote Server for QODBC Online

QRemote Server for QODBC Online option will help you to start QRemote Server if it is not running.

 

7. QuickBooks Online Table Schema

QuickBooks Online Table Schema option will navigate you to QuickBooks Online table Schema/Data Layout page.

 

8. README File

README File option will open a readme file which contains information about instructions on how to install the QODBC Online, how to use the basic functions of the QODBC Online, and what the QODBC Online does. It also includes a list of recent updates made to the QODBC Online.

 

9. Uninstall QODBC Online

Uninstall QODBC Online option will uninstall QODBC Online from System. If you are updating QODBC Online version, then you need to uninstall older QODBC Online version & install newer QODBC version at that time Uninstall QODBC Online option will help you.

 

10. VB Demo

VB Demo is testing tool is available with QODBC Online which useful in testing connection with QuickBooks Online. VB Demo also useful query table data. VB Demo also can perform insert/update/delete operation using standard SQL language.


[QODBC-POS] QODBC POS Menu Items

$
0
0

QODBC POS Menu Items

When you install QODBC POS below menu items are created under QODBC Driver for use with QuickBooks POS folder in start menu.



 

1. Configure QODBC POS Data Source 64-Bit

Configure QODBC POS Data Source 64-Bit option will help you to create/configure QRemote 64-bit DSN which is used in the 64-bit application.

 

2. Configure QODBC POS Data Source

Configure QODBC POS Data Source option will help you to create/configure QODBC & QRemote 32-bit DSN which is used in the 32-bit application.

 

3. Purchase QODBC Driver For QuickBooks POS

Purchase QODBC POS Now option will navigate you to QODBC website for purchasing a QODBC POS license.

 

4. QODBC Driver for QuickBooks POS Quick Start Guide

QODBC Driver for QuickBooks POS Quick Start Guide option will open a start guide which will guide you to how to use QODBC POS.

 

5. QODBC POS Setup Screen

QODBC POS Setup Screen option will help you to configure different setup option in QODBC POS.

 

6. QRemote Server for QODBC POS

QRemote Server for QODBC POS option will help you to start QRemote Server if it is not running. Note: QRemote Server has started automatically on system startup.

 

7. README File

README File option will open a readme file which contains information about instructions on how to install the QODBC POS, how to use the basic functions of the QODBC, and what the QODBC POS does. It also includes a list of recent updates made to the QODBC POS.

 

8. Uninstall QODBC POS

Uninstall QODBC POS option will uninstall QODBC POS from System. If you are updating QODBC POS version, then you need to uninstall older QODBC POS version & install newer QODBC POS version at that time Uninstall QODBC option will help you.

 

9. VB Demo

VB Demo is testing tool is available with QODBC POS which useful in testing connection with QuickBooks POS. VB Demo also useful query table data. VB Demo also can perform insert/update/delete operation using standard SQL language.

[QODBC-Desktop] QODBC Menu Items

$
0
0

QODBC Menu Items

When you install QODBC below menu items are created under QODBC Driver for use with QuickBooks folder in start menu.



 

1. Configure QODBC Data Source 64-Bit

Configure QODBC Data Source 64-Bit will help you to view/create/configure 64-bit DSNs like "QuickBooks Data 64-Bit QRemote" or "QRemote Data 64-bit". 64-Bit DSNs are used by the 64-bit application(s). You can run the 64 bit ODBC admin utility to see data source from:
C:\Windows\System32\odbcad32.exe

 

2. Configure QODBC Data Source

Configure QODBC Data Source will help you to create/configure QuickBooks Data & QRemote 32-bit DSN which is used in the 32-bit application. You can run the 32 bit ODBC admin utility to see data source from:
C:\Windows\SysWOW64\odbcad32.exe

 

3. Purchase QODBC Now

Purchase QODBC Now will navigate you to QODBC website for purchasing a QODBC license.

 

4. QODBC Quick Start Guide

QODBC Quick Start Guide will open "QODBC Quick Start Guide.Pdf". Quick Guide document should help you get started and use QODBC. You can find information regarding how to use QODBC for the first time, samples, FAQ & support information. Link location:
For 32-bit System:
C:\Program Files\QODBC Driver for QuickBooks\QODBC Quick Start Guide.Pdf

For 64-bit System:
C:\Program Files (x86)\QODBC Driver for QuickBooks\QODBC Quick Start Guide.Pdf

 

5. QODBC Setup Screen

QODBC Setup Screen will help you to configure different setup option in QODBC. You can perform different configuration from QODBC Setup Screen like: setup auto login to QuickBooks, check QODBC & QuickBooks SDK logs, setup Optimizer option, configure other Advanced Setup options.

 

6. QRemote Server for QODBC

QRemote Server for QODBC will help you to start QRemote Server if it is not running. Note: QRemote Server has started automatically on system startup.Link location:
For 32-bit System:
C:\Program Files\QODBC Driver for QuickBooks\QRemote\Server\QRemoteServer.exe

For 64-bit System:
C:\Program Files (x86)\QODBC Driver for QuickBooks\QRemote\Server\QRemoteServer.exe

 

7. QuickBooks Table Schema

QuickBooks Table Schema will navigate you to QuickBooks table Schema/Data Layout page using that link you can get details about the QODBC table & report schema. You will get details about each table relation with other tables ,table/report column, report parameters which are supported.

 

8. README File

README File will open a readme file which contains information about instructions on how to install the QODBC, how to use the basic functions of the QODBC, and what the QODBC does. It also includes a list of recent updates made to the QODBC. Link location:
For 32-bit System:
C:\Program Files\QODBC Driver for QuickBooks\readme.rtf

For 64-bit System:
C:\Program Files (x86)\QODBC Driver for QuickBooks\readme.rtf

 

9. Uninstall QODBC

Uninstall QODBC will uninstall QODBC from System. If you are updating QODBC version, then you need to uninstall older QODBC version & install newer QODBC version at that time Uninstall QODBC option will help you. Link location:
For 32-bit System:
C:\Program Files\QODBC Driver for QuickBooks\UNWISE32.EXE

For 64-bit System:
C:\Program Files (x86)\QODBC Driver for QuickBooks\UNWISE32.EXE

 

10. VB Demo

VB Demo is testing tool is available with QODBC which useful in testing connection with QuickBooks. VB Demo also useful query table data. VB Demo also can perform insert/update/delete operation using standard SQL language.Link location:
For 32-bit System:
C:\Program Files\QODBC Driver for QuickBooks\VBDEMO32.EXE

For 64-bit System:
C:\Program Files (x86)\QODBC Driver for QuickBooks\VBDEMO32.EXE

[QODBC-Desktop] Troubleshooting - QB Begin Session Failed. Error ...

$
0
0

Troubleshooting - QB Begin Session Failed. Error = 80040438

Problem Description:

I am testing connection of QODBC & I am getting QODBC test connection failed error:



Can you advise what is error and solution for it?

 

Solution:

The above error says there are multiple instances of QuickBooks is running. Please close all instance of QuickBooks (Please verify no instances are running of QBW32 under task manager --processes -- view all user processes).

Please run only one instance of QuickBooks as context user, login to company file as Admin & try to connect using VB Demo.

Please refer Connecting QODBC Driver to QuickBooks for the First Time (Video)

[QODBC-ALL] Troubleshooting - Update from a select statement not ...

$
0
0

Troubleshooting - Update from a select statement not working

Problem Description:

I am trying update records through select statement. But it is not working.

UPDATE Customer SET CustomFieldProjectNumber = i.JobNumber FROM ( SELECT ListID, {fn SUBSTRING("Name", 1, 5)} AS JobNumber FROM Customer WHERE TimeCreated > {ts '2016-01-01 00:00:00.000'} ) i WHERE i.ListID = Customer.ListID

I am getting "Unexpected extra token: (" error in VB Demo.

Any Assistance Is Appreciated.

 

Solution:

You can execute below query in MS Access linked table without any issue.

Please refer <a "_blank"="" href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2470/57/using-quickbooks-data-with-access-2013-linked-tables-32-bit">How to Use QODBC with MS Access 2016 / 365 / 2013 32-bit You need to link Customer table in MS Access & execute the query in access query editor.

MS Access>> create tab >> Query Design >> Paste query >> Execute query using Run button

update Customer qe inner join Customer de on qe.ListID = de.ListID set qe.CustomFieldProjectNumber = MID (de.Name,1,5) WHERE qe.TimeCreated >#2016-01-01 00:00:01#

[QODBC-Desktop] Troubleshooting - Getting incomplete data when ru...

$
0
0

Troubleshooting - Getting incomplete data when running ProfitAndLossBudgetVsActual report

Problem Description:

Good Day To You. Using This Sp_report And Having Some Problem With The Column Layout. Command Text Is As Follows : Sp_report Profitandlossbudgetvsactual Show Accountname, Accountnumber, Amount, Budget Parameters Fiscalyear=2015, Classfilterfullnames ='health Center', 'administrative'

I'm Getting 12 Columns As One Would Expect, But The 12th Column Is The Sum Of Previous 11 Columns, Not The 12th Month. This Is True For Both The Amount And Budget Segments. Also, The Budget Amount For The 11th Month Is Exactly One Half Of The Actual Budgeted Amount. I Have Run The Actual Report And The Totals For Each Month Are Correct For Both Amount And Budget Until The Last Two Months In The Sp_report.

Also, if I replace the FiscalYear=2015, with DateMacro=’ThisYear’ I get this



Any Assistance Is Appreciated.

 

Solution:

Please make sure that you are passing the same parameter in report query which you have passed in QuickBooks UI.

Also, For budget report FiscalYear parameter is required without it report will not execute. So you need to keep FiscalYear parameter & add other date parameters.

For Example:

sp_report ProfitAndLossBudgetVsActual show Amount_Title, Budget_Title, Difference_Title, Percent_Title, Text, Label, Amount, Budget, Difference, Percent parameters FiscalYear = 2015,DateFrom={d'2015-10-01'},DateTo={d'2016-09-30'}, BudgetCriterion = 'Accounts', SummarizeBudgetColumnsBy = 'Date', SummarizeBudgetRowsBy = 'Account'

[QODBC-ALL] System Requirements for using QODBC

$
0
0

System Requirements for using QODBC

 

Minimum CPU required: Pentium II processor 450 MHz or better

Minimum memory required: 64 MB

Minimum hard disk space required: 15 MB

Operating system version: QODBC supports Microsoft Windows 95, Windows 98, Windows NT, Windows ME, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10, Windows Server 2000/2003/2008/2012/2016

[QODBC-Desktop] Accessing QuickBooks Data remotely via SQL Server

$
0
0

Accessing QuickBooks Data remotely via SQL Server

First, you need to create Linked Server in SQL Server.

For 32-Bit SQL Server. Please refer How to create Link Server with MS SQL 2005/2008/2012 32-Bit Using QODBC/QRemote

For 64-Bit SQL Server. Please refer How to create Link Server with MS SQL 2005/2008/2012 64-Bit Using QODBC/QRemote

 

I have already created linked server "QRemote".

After creating Linked Server, You need to create a new database in SQL Server for creating stored procedure which accepts SQL query, the store procedure will call linked server and execute the query.

To create a database, You need to right-click on "Database" & click on "New Database".

Enter database name & click "OK". In this example,I am creating database "QODBC".

Database created.

Now, We will create a stored procedure which accepts SQL query, the store procedure will call linked server and execute the query.

In Object Explorer, connect to an instance of Database Engine and then expand that instance.

Expand Databases, expand Your database, and then expand Programmability.

Right-click Stored Procedures, and then click New Stored Procedure.

 

We will create two stored procedure first one will give us a list of all customers & second procedure will accept SQL query through parameter & execute on linked server & provide the query result.

We will create stored procedure named GetCustomer which will query Customer table through linked table in SQL Server & provide a list of the customers.

Stored Procedure Created.

Stored Procedure Code:

================================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE GetCustomer

AS
BEGIN
SET NOCOUNT ON;

SELECT * from QRemote...customer

END
GO
================================================================

Note: The above stored procedure code is for example. You can change it as per your requirement.

By executing this stored procedure we will get a list of the Customers.

We will create a second stored procedure named QODBCQuery which will accept SQL query through parameter & execute on linked server & provide the query result.

Stored Procedure Created.

Stored Procedure Code:

================================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

Create PROCEDURE QODBCQuery

@sqlQuery nvarchar( 4000)

AS
BEGIN
SET NOCOUNT ON;

DECLARE @TSQL varchar(8000)
SELECT @TSQL = 'SELECT * FROM OPENQUERY(QRemote,''' + @sqlQuery + ''')'
EXEC (@TSQL)

END
GO
================================================================

Note: The above stored procedure code is for example. You can change it as per your requirement.

To execute this stored procedure we need to pass query as parameter value.

Query result through stored procedure.



Now, We will create SQL Server DSN on the non-SQL Server machine to access QuickBooks Data remotely via SQL Server.

Locate the QODBC Driver for QuickBooks program group on your desktop. Click on the Configure QODBC Data Source icon to create SQL Server DSN.

Click on the System DSN tab to create a DSN that can be called by both Windows applications and services. Click on the Add button to create a new DSN.

Select SQL Server & click "Finish".

Enter DSN name, SQL Server machine IP address & click "Next".

Select authenticity of SQL Server & click "Next".

Select SQL Server database in which we have created stored procedure & click "Next".

Click on "Finish".

Click on "Test Data Source.." to test the connection.

Test connection success.



Now we will call this stored procedure from QDemo application. We will use connection string "DSN=SQL;Uid=sa;Pwd=sa;" & click on Test Connection.
Note: You need to change DSN Name & User ID & Password as per your configuration.

Note: I have used QDemo application for testing purpose only. You can use your application (i.e. MS Access, Excel, VBA etc..) as per your requirement.

Now we will call stored procedure GetCustomer from QDemo application. Write stored procedure name (i.e. GetCustomer) & click on "Run Query".

By executing this stored procedure we will get a list of the Customers.

Now we will call second stored procedure QODBCQuery from QDemo application. To execute this stored procedure we need to pass query as the parameter value.

Write stored procedure name & query as parameter(i.e. QODBCQuery 'select * from account where name like ''''te%'''' ') & click on "Run Query".

Note: You need to pass four single quotes around string value after where condition.

Query result through stored procedure.

 


[QODBC-Desktop] How to Import QuickBooks data to SQL Server Datab...

$
0
0

How to Import QuickBooks data to SQL Server Database (Local Table)

First, you need to create Linked Server in SQL Server.

For 32-Bit SQL Server. Please refer How to create Link Server with MS SQL 2005/2008/2012 32-Bit Using QODBC/QRemote

For 64-Bit SQL Server. Please refer How to create Link Server with MS SQL 2005/2008/2012 64-Bit Using QODBC/QRemote

 

I have already created linked server "QRemote".

After creating Linked Server, You need to create stored procedure which will read data from Linked Server table & write into SQL Server local table.

For storing Linked Server data in the local database. You need to use INSERT INTO SELECT query as below.

For Example:

SELECT * INTO SQL_Local_TableName FROM YourLinkedServerName...TableName;

First, We will add the single table in the local database. After that, We will create stored procedure for all tables

We will add Account table in the local database with table name as Tbl_Account.

SELECT * INTO Tbl_Account FROM QRemote...Account

Tbl_Account table is created to the local database with 105 records.

Now we will query in local table Tbl_Account.
Select * from Tbl_Account
Data is available in the local database table.

Now, We will create a stored procedure which will read data from Linked Server table & write into SQL Server local table.

In Object Explorer, connect to an instance of Database Engine and then expand that instance.

Expand Databases, expand Your database, and then expand Programmability.

Right-click Stored Procedures and then click New Stored Procedure.

 

We will create stored procedure named Import_QODBC_Tables which will check in local database if the table exists it will drop table & recreate table & read all the linked server table & create the new table in a local database.



After writing stored procedure click on execute to create stored procedure.

Stored Procedure Created.

Stored Procedure Code:

================================================================

USE [QODBC]
GO
/****** Object:  StoredProcedure [dbo].[Import_QODBC_Tables]    Script Date: 07/29/2016 00:28:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


Create PROCEDURE [dbo].[Import_QODBC_Tables]


AS
begin

IF OBJECT_ID (N'Tbl_Account', N'U') IS NOT NULL
 
Drop table Tbl_Account
   
SELECT * INTO Tbl_Account    FROM QRemote...Account

IF OBJECT_ID (N'Tbl_AccountTaxLineInfo', N'U') IS NOT NULL
 
Drop table Tbl_AccountTaxLineInfo

SELECT * INTO    Tbl_AccountTaxLineInfo    FROM    QRemote...AccountTaxLineInfo

IF OBJECT_ID (N'Tbl_ARRefundCreditCard', N'U') IS NOT NULL
 
Drop table ARRefundCreditCard

SELECT * INTO    ARRefundCreditCard    FROM    QRemote...ARRefundCreditCard

IF OBJECT_ID (N'Tbl_ARRefundCreditCardRefundAppliedTo', N'U') IS NOT NULL
 
Drop table Tbl_ARRefundCreditCardRefundAppliedTo

SELECT * INTO    Tbl_ARRefundCreditCardRefundAppliedTo    FROM    QRemote...ARRefundCreditCardRefundAppliedTo

IF OBJECT_ID (N'Tbl_BarCode', N'U') IS NOT NULL
 
Drop table Tbl_BarCode

SELECT * INTO    Tbl_BarCode    FROM    QRemote...BarCode

IF OBJECT_ID (N'Tbl_Bill', N'U') IS NOT NULL
 
Drop table Tbl_Bill

SELECT * INTO    Tbl_Bill    FROM    QRemote...Bill

IF OBJECT_ID (N'Tbl_BillExpenseLine', N'U') IS NOT NULL
 
Drop table Tbl_BillExpenseLine

SELECT * INTO    Tbl_BillExpenseLine    FROM    QRemote...BillExpenseLine

IF OBJECT_ID (N'Tbl_BillItemLine', N'U') IS NOT NULL
 
Drop table Tbl_BillItemLine

SELECT * INTO    Tbl_BillItemLine    FROM    QRemote...BillItemLine

IF OBJECT_ID (N'Tbl_BillLinkedTxn', N'U') IS NOT NULL
 
Drop table Tbl_BillLinkedTxn

SELECT * INTO    Tbl_BillLinkedTxn    FROM    QRemote...BillLinkedTxn

IF OBJECT_ID (N'Tbl_BillingRate', N'U') IS NOT NULL
 
Drop table Tbl_BillingRate

SELECT * INTO    Tbl_BillingRate    FROM    QRemote...BillingRate

IF OBJECT_ID (N'Tbl_BillingRateLine', N'U') IS NOT NULL
 
Drop table Tbl_BillingRateLine

SELECT * INTO    Tbl_BillingRateLine    FROM    QRemote...BillingRateLine

IF OBJECT_ID (N'Tbl_BillPaymentCheck', N'U') IS NOT NULL
 
Drop table Tbl_BillPaymentCheck

SELECT * INTO    Tbl_BillPaymentCheck    FROM    QRemote...BillPaymentCheck

IF OBJECT_ID (N'Tbl_BillPaymentCheckLine', N'U') IS NOT NULL
 
Drop table Tbl_BillPaymentCheckLine

SELECT * INTO    Tbl_BillPaymentCheckLine    FROM    QRemote...BillPaymentCheckLine

IF OBJECT_ID (N'Tbl_BillPaymentCheckLineLinkedTxn', N'U') IS NOT NULL
 
Drop table Tbl_BillPaymentCheckLineLinkedTxn

SELECT * INTO    Tbl_BillPaymentCheckLineLinkedTxn    FROM    QRemote...BillPaymentCheckLineLinkedTxn

IF OBJECT_ID (N'Tbl_BillPaymentCreditCard', N'U') IS NOT NULL
 
Drop table Tbl_BillPaymentCreditCard

SELECT * INTO    Tbl_BillPaymentCreditCard    FROM    QRemote...BillPaymentCreditCard

IF OBJECT_ID (N'Tbl_BillPaymentCreditCardLine', N'U') IS NOT NULL
 
Drop table Tbl_BillPaymentCreditCardLine

SELECT * INTO    Tbl_BillPaymentCreditCardLine    FROM    QRemote...BillPaymentCreditCardLine

IF OBJECT_ID (N'Tbl_BillPaymentCreditCardLineLinkedTxn', N'U') IS NOT NULL
 
Drop table Tbl_BillPaymentCreditCardLineLinkedTxn

SELECT * INTO    Tbl_BillPaymentCreditCardLineLinkedTxn    FROM    QRemote...BillPaymentCreditCardLineLinkedTxn

IF OBJECT_ID (N'Tbl_BillToPay', N'U') IS NOT NULL
 
Drop table Tbl_BillToPay

SELECT * INTO    Tbl_BillToPay    FROM    QRemote...BillToPay

IF OBJECT_ID (N'Tbl_BuildAssembly', N'U') IS NOT NULL
 
Drop table Tbl_BuildAssembly

SELECT * INTO    Tbl_BuildAssembly    FROM    QRemote...BuildAssembly

IF OBJECT_ID (N'Tbl_BuildAssemblyComponentItemLine', N'U') IS NOT NULL
 
Drop table Tbl_BuildAssemblyComponentItemLine

SELECT * INTO    Tbl_BuildAssemblyComponentItemLine    FROM    QRemote...BuildAssemblyComponentItemLine

IF OBJECT_ID (N'Tbl_Charge', N'U') IS NOT NULL
 
Drop table Tbl_Charge

SELECT * INTO    Tbl_Charge    FROM    QRemote...Charge

IF OBJECT_ID (N'Tbl_ChargeLinkedTxn', N'U') IS NOT NULL
 
Drop table Tbl_ChargeLinkedTxn

SELECT * INTO    Tbl_ChargeLinkedTxn    FROM    QRemote...ChargeLinkedTxn

IF OBJECT_ID (N'Tbl_Check', N'U') IS NOT NULL
 
Drop table Tbl_Check

SELECT * INTO    Tbl_Check    FROM    QRemote..."Check"

IF OBJECT_ID (N'Tbl_CheckApplyCheckToTxn', N'U') IS NOT NULL
 
Drop table Tbl_CheckApplyCheckToTxn

SELECT * INTO    Tbl_CheckApplyCheckToTxn    FROM    QRemote...CheckApplyCheckToTxn

IF OBJECT_ID (N'Tbl_CheckExpenseLine', N'U') IS NOT NULL
 
Drop table Tbl_CheckExpenseLine

SELECT * INTO    Tbl_CheckExpenseLine    FROM    QRemote...CheckExpenseLine

IF OBJECT_ID (N'Tbl_CheckItemLine', N'U') IS NOT NULL
 
Drop table Tbl_CheckItemLine

SELECT * INTO    Tbl_CheckItemLine    FROM    QRemote...CheckItemLine

IF OBJECT_ID (N'Tbl_Class', N'U') IS NOT NULL
 
Drop table Tbl_Class

SELECT * INTO    Tbl_Class    FROM    QRemote...Class

IF OBJECT_ID (N'Tbl_ClearedStatus', N'U') IS NOT NULL
 
Drop table Tbl_ClearedStatus

SELECT * INTO    Tbl_ClearedStatus    FROM    QRemote...ClearedStatus

IF OBJECT_ID (N'Tbl_Company', N'U') IS NOT NULL
 
Drop table Tbl_Company

SELECT * INTO    Tbl_Company    FROM    QRemote...Company

IF OBJECT_ID (N'Tbl_CompanyActivity', N'U') IS NOT NULL
 
Drop table Tbl_CompanyActivity

SELECT * INTO    Tbl_CompanyActivity    FROM    QRemote...CompanyActivity

IF OBJECT_ID (N'Tbl_CreditCardCharge', N'U') IS NOT NULL
 
Drop table Tbl_CreditCardCharge

SELECT * INTO    Tbl_CreditCardCharge    FROM    QRemote...CreditCardCharge

IF OBJECT_ID (N'Tbl_CreditCardChargeExpenseLine', N'U') IS NOT NULL
 
Drop table Tbl_CreditCardChargeExpenseLine

SELECT * INTO    Tbl_CreditCardChargeExpenseLine    FROM    QRemote...CreditCardChargeExpenseLine

IF OBJECT_ID (N'Tbl_CreditCardChargeItemLine', N'U') IS NOT NULL
 
Drop table Tbl_CreditCardChargeItemLine

SELECT * INTO    Tbl_CreditCardChargeItemLine    FROM    QRemote...CreditCardChargeItemLine

IF OBJECT_ID (N'Tbl_CreditCardCredit', N'U') IS NOT NULL
 
Drop table Tbl_CreditCardCredit

SELECT * INTO    Tbl_CreditCardCredit    FROM    QRemote...CreditCardCredit

IF OBJECT_ID (N'Tbl_CreditCardCreditExpenseLine', N'U') IS NOT NULL
 
Drop table Tbl_CreditCardCreditExpenseLine

SELECT * INTO    Tbl_CreditCardCreditExpenseLine    FROM    QRemote...CreditCardCreditExpenseLine

IF OBJECT_ID (N'Tbl_CreditCardCreditItemLine', N'U') IS NOT NULL
 
Drop table Tbl_CreditCardCreditItemLine

SELECT * INTO    Tbl_CreditCardCreditItemLine    FROM    QRemote...CreditCardCreditItemLine

IF OBJECT_ID (N'Tbl_CreditMemo', N'U') IS NOT NULL
 
Drop table Tbl_CreditMemo

SELECT * INTO    Tbl_CreditMemo    FROM    QRemote...CreditMemo

IF OBJECT_ID (N'Tbl_CreditMemoLine', N'U') IS NOT NULL
 
Drop table Tbl_CreditMemoLine

SELECT * INTO    Tbl_CreditMemoLine    FROM    QRemote...CreditMemoLine

IF OBJECT_ID (N'Tbl_CreditMemoLinkedTxn', N'U') IS NOT NULL
 
Drop table Tbl_CreditMemoLinkedTxn

SELECT * INTO    Tbl_CreditMemoLinkedTxn    FROM    QRemote...CreditMemoLinkedTxn

IF OBJECT_ID (N'Tbl_Currency', N'U') IS NOT NULL
 
Drop table Tbl_Currency

SELECT * INTO    Tbl_Currency    FROM    QRemote...Currency

IF OBJECT_ID (N'Tbl_Customer', N'U') IS NOT NULL
 
Drop table Tbl_Customer

SELECT * INTO    Tbl_Customer    FROM    QRemote...Customer

IF OBJECT_ID (N'Tbl_CustomerAddtionalNote', N'U') IS NOT NULL
 
Drop table Tbl_CustomerAddtionalNote

SELECT * INTO    Tbl_CustomerAddtionalNote    FROM    QRemote...CustomerAddtionalNote

IF OBJECT_ID (N'Tbl_CustomerContacts', N'U') IS NOT NULL
 
Drop table Tbl_CustomerContacts

SELECT * INTO    Tbl_CustomerContacts    FROM    QRemote...CustomerContacts

IF OBJECT_ID (N'Tbl_CustomerShipToAddress', N'U') IS NOT NULL
 
Drop table Tbl_CustomerShipToAddress

SELECT * INTO    Tbl_CustomerShipToAddress    FROM    QRemote...CustomerShipToAddress

IF OBJECT_ID (N'Tbl_CustomerMsg', N'U') IS NOT NULL
 
Drop table Tbl_CustomerMsg

SELECT * INTO    Tbl_CustomerMsg    FROM    QRemote...CustomerMsg

IF OBJECT_ID (N'Tbl_CustomerType', N'U') IS NOT NULL
 
Drop table Tbl_CustomerType

SELECT * INTO    Tbl_CustomerType    FROM    QRemote...CustomerType

IF OBJECT_ID (N'Tbl_CustomField', N'U') IS NOT NULL
 
Drop table Tbl_CustomField

SELECT * INTO    Tbl_CustomField    FROM    QRemote...CustomField

IF OBJECT_ID (N'Tbl_DateDrivenTerms', N'U') IS NOT NULL
 
Drop table Tbl_DateDrivenTerms

SELECT * INTO    Tbl_DateDrivenTerms    FROM    QRemote...DateDrivenTerms

IF OBJECT_ID (N'Tbl_Deposit', N'U') IS NOT NULL
 
Drop table Tbl_Deposit

SELECT * INTO    Tbl_Deposit    FROM    QRemote...Deposit

IF OBJECT_ID (N'Tbl_DepositLine', N'U') IS NOT NULL
 
Drop table Tbl_DepositLine

SELECT * INTO    Tbl_DepositLine    FROM    QRemote...DepositLine

IF OBJECT_ID (N'Tbl_Employee', N'U') IS NOT NULL
 
Drop table Tbl_Employee

SELECT * INTO    Tbl_Employee    FROM    QRemote...Employee

IF OBJECT_ID (N'Tbl_EmployeeAddtionalNote', N'U') IS NOT NULL
 
Drop table Tbl_EmployeeAddtionalNote

SELECT * INTO    Tbl_EmployeeAddtionalNote    FROM    QRemote...EmployeeAddtionalNote

IF OBJECT_ID (N'Tbl_EmployeeEarning', N'U') IS NOT NULL
 
Drop table Tbl_EmployeeEarning

SELECT * INTO    Tbl_EmployeeEarning    FROM    QRemote...EmployeeEarning

IF OBJECT_ID (N'Tbl_Entity', N'U') IS NOT NULL
 
Drop table Tbl_Entity

SELECT * INTO    Tbl_Entity    FROM    QRemote...Entity

IF OBJECT_ID (N'Tbl_EntityAdditionalNote', N'U') IS NOT NULL
 
Drop table Tbl_EntityAdditionalNote

SELECT * INTO    Tbl_EntityAdditionalNote    FROM    QRemote...EntityAdditionalNote

IF OBJECT_ID (N'Tbl_EntityContacts', N'U') IS NOT NULL
 
Drop table Tbl_EntityContacts

SELECT * INTO    Tbl_EntityContacts    FROM    QRemote...EntityContacts

IF OBJECT_ID (N'Tbl_EntityShipToAddress', N'U') IS NOT NULL
 
Drop table Tbl_EntityShipToAddress

SELECT * INTO    Tbl_EntityShipToAddress    FROM    QRemote...EntityShipToAddress

IF OBJECT_ID (N'Tbl_Estimate', N'U') IS NOT NULL
 
Drop table Tbl_Estimate

SELECT * INTO    Tbl_Estimate    FROM    QRemote...Estimate

IF OBJECT_ID (N'Tbl_EstimateLine', N'U') IS NOT NULL
 
Drop table Tbl_EstimateLine

SELECT * INTO    Tbl_EstimateLine    FROM    QRemote...EstimateLine

IF OBJECT_ID (N'Tbl_EstimateLinkedTxn', N'U') IS NOT NULL
Drop table Tbl_EstimateLinkedTxn
SELECT * INTO    Tbl_EstimateLinkedTxn    FROM    QRemote...EstimateLinkedTxn

IF OBJECT_ID (N'Tbl_Host', N'U') IS NOT NULL
Drop table Tbl_Host
SELECT * INTO    Tbl_Host    FROM    QRemote...Host

IF OBJECT_ID (N'Tbl_HostMetaData', N'U') IS NOT NULL
Drop table Tbl_HostMetaData
SELECT * INTO    Tbl_HostMetaData    FROM    QRemote...HostMetaData

IF OBJECT_ID (N'Tbl_HostSupportedVersions', N'U') IS NOT NULL
Drop table Tbl_HostSupportedVersions
SELECT * INTO    Tbl_HostSupportedVersions    FROM    QRemote...HostSupportedVersions

IF OBJECT_ID (N'Tbl_InventoryAdjustment', N'U') IS NOT NULL
Drop table Tbl_InventoryAdjustment
SELECT * INTO    Tbl_InventoryAdjustment    FROM    QRemote...InventoryAdjustment

IF OBJECT_ID (N'Tbl_InventoryAdjustmentLine', N'U') IS NOT NULL
Drop table Tbl_InventoryAdjustmentLine
SELECT * INTO    Tbl_InventoryAdjustmentLine    FROM    QRemote...InventoryAdjustmentLine

IF OBJECT_ID (N'Tbl_InventorySite', N'U') IS NOT NULL
Drop table Tbl_InventorySite
SELECT * INTO    Tbl_InventorySite    FROM    QRemote...InventorySite

IF OBJECT_ID (N'Tbl_Invoice', N'U') IS NOT NULL
Drop table Tbl_Invoice
SELECT * INTO    Tbl_Invoice    FROM    QRemote...Invoice

IF OBJECT_ID (N'Tbl_InvoiceLine', N'U') IS NOT NULL
Drop table Tbl_InvoiceLine
SELECT * INTO    Tbl_InvoiceLine    FROM    QRemote...InvoiceLine

IF OBJECT_ID (N'Tbl_InvoiceLinkedTxn', N'U') IS NOT NULL
Drop table Tbl_InvoiceLinkedTxn
SELECT * INTO    Tbl_InvoiceLinkedTxn    FROM    QRemote...InvoiceLinkedTxn

IF OBJECT_ID (N'Tbl_Item', N'U') IS NOT NULL
Drop table Tbl_Item
SELECT * INTO    Tbl_Item    FROM    QRemote...Item

IF OBJECT_ID (N'Tbl_ItemAssembliesCanBuild', N'U') IS NOT NULL
Drop table Tbl_ItemAssembliesCanBuild
SELECT * INTO    Tbl_ItemAssembliesCanBuild    FROM    QRemote...ItemAssembliesCanBuild where ItemInventoryAssemblyRefFullName='assembly item' and TxnDate={d'2018-01-01'}

IF OBJECT_ID (N'Tbl_ItemDiscount', N'U') IS NOT NULL
Drop table Tbl_ItemDiscount
SELECT * INTO    Tbl_ItemDiscount    FROM    QRemote...ItemDiscount

IF OBJECT_ID (N'Tbl_ItemFixedAsset', N'U') IS NOT NULL
Drop table Tbl_ItemFixedAsset
SELECT * INTO    Tbl_ItemFixedAsset    FROM    QRemote...ItemFixedAsset

IF OBJECT_ID (N'Tbl_ItemGroup', N'U') IS NOT NULL
Drop table Tbl_ItemGroup
SELECT * INTO    Tbl_ItemGroup    FROM    QRemote...ItemGroup

IF OBJECT_ID (N'Tbl_ItemGroupLine', N'U') IS NOT NULL
Drop table Tbl_ItemGroupLine
SELECT * INTO    Tbl_ItemGroupLine    FROM    QRemote...ItemGroupLine

IF OBJECT_ID (N'Tbl_ItemInventory', N'U') IS NOT NULL
Drop table Tbl_ItemInventory
SELECT * INTO    Tbl_ItemInventory    FROM    QRemote...ItemInventory

IF OBJECT_ID (N'Tbl_ItemInventoryAssembly', N'U') IS NOT NULL
Drop table Tbl_ItemInventoryAssembly
SELECT * INTO    Tbl_ItemInventoryAssembly    FROM    QRemote...ItemInventoryAssembly

IF OBJECT_ID (N'Tbl_ItemInventoryAssemblyLine', N'U') IS NOT NULL
Drop table Tbl_ItemInventoryAssemblyLine
SELECT * INTO    Tbl_ItemInventoryAssemblyLine    FROM    QRemote...ItemInventoryAssemblyLine

IF OBJECT_ID (N'Tbl_ItemNonInventory', N'U') IS NOT NULL
Drop table Tbl_ItemNonInventory
SELECT * INTO    Tbl_ItemNonInventory    FROM    QRemote...ItemNonInventory

IF OBJECT_ID (N'Tbl_ItemOtherCharge', N'U') IS NOT NULL
Drop table Tbl_ItemOtherCharge
SELECT * INTO    Tbl_ItemOtherCharge    FROM    QRemote...ItemOtherCharge

IF OBJECT_ID (N'Tbl_ItemPayment', N'U') IS NOT NULL
Drop table Tbl_ItemPayment
SELECT * INTO    Tbl_ItemPayment    FROM    QRemote...ItemPayment

IF OBJECT_ID (N'Tbl_ItemReceipt', N'U') IS NOT NULL
Drop table Tbl_ItemReceipt
SELECT * INTO    Tbl_ItemReceipt    FROM    QRemote...ItemReceipt

IF OBJECT_ID (N'Tbl_ItemReceiptExpenseLine', N'U') IS NOT NULL
Drop table Tbl_ItemReceiptExpenseLine
SELECT * INTO    Tbl_ItemReceiptExpenseLine    FROM    QRemote...ItemReceiptExpenseLine

IF OBJECT_ID (N'Tbl_ItemReceiptItemLine', N'U') IS NOT NULL
Drop table Tbl_ItemReceiptItemLine
SELECT * INTO    Tbl_ItemReceiptItemLine    FROM    QRemote...ItemReceiptItemLine

IF OBJECT_ID (N'Tbl_ItemReceiptLinkedTxn', N'U') IS NOT NULL
Drop table Tbl_ItemReceiptLinkedTxn
SELECT * INTO    Tbl_ItemReceiptLinkedTxn    FROM    QRemote...ItemReceiptLinkedTxn

IF OBJECT_ID (N'Tbl_ItemSalesTax', N'U') IS NOT NULL
Drop table Tbl_ItemSalesTax
SELECT * INTO    Tbl_ItemSalesTax    FROM    QRemote...ItemSalesTax

IF OBJECT_ID (N'Tbl_ItemSalesTaxGroup', N'U') IS NOT NULL
Drop table Tbl_ItemSalesTaxGroup
SELECT * INTO    Tbl_ItemSalesTaxGroup    FROM    QRemote...ItemSalesTaxGroup

IF OBJECT_ID (N'Tbl_ItemSalesTaxGroupLine', N'U') IS NOT NULL
Drop table Tbl_ItemSalesTaxGroupLine
SELECT * INTO    Tbl_ItemSalesTaxGroupLine    FROM    QRemote...ItemSalesTaxGroupLine

IF OBJECT_ID (N'Tbl_ItemSites', N'U') IS NOT NULL
Drop table Tbl_ItemSites
SELECT * INTO    Tbl_ItemSites    FROM    QRemote...ItemSites

IF OBJECT_ID (N'Tbl_ItemService', N'U') IS NOT NULL
Drop table Tbl_ItemService
SELECT * INTO    Tbl_ItemService    FROM    QRemote...ItemService

IF OBJECT_ID (N'Tbl_ItemSubtotal', N'U') IS NOT NULL
Drop table Tbl_ItemSubtotal
SELECT * INTO    Tbl_ItemSubtotal    FROM    QRemote...ItemSubtotal

IF OBJECT_ID (N'Tbl_JobType', N'U') IS NOT NULL
Drop table Tbl_JobType
SELECT * INTO    Tbl_JobType    FROM    QRemote...JobType

IF OBJECT_ID (N'Tbl_JournalEntry', N'U') IS NOT NULL
Drop table Tbl_JournalEntry
SELECT * INTO    Tbl_JournalEntry    FROM    QRemote...JournalEntry

IF OBJECT_ID (N'Tbl_JournalEntryCreditLine', N'U') IS NOT NULL
Drop table Tbl_JournalEntryCreditLine
SELECT * INTO    Tbl_JournalEntryCreditLine    FROM    QRemote...JournalEntryCreditLine

IF OBJECT_ID (N'Tbl_JournalEntryDebitLine', N'U') IS NOT NULL
Drop table Tbl_JournalEntryDebitLine
SELECT * INTO    Tbl_JournalEntryDebitLine    FROM    QRemote...JournalEntryDebitLine

IF OBJECT_ID (N'Tbl_JournalEntryLine', N'U') IS NOT NULL
Drop table Tbl_JournalEntryLine
SELECT * INTO    Tbl_JournalEntryLine    FROM    QRemote...JournalEntryLine

IF OBJECT_ID (N'Tbl_ListDeleted', N'U') IS NOT NULL
Drop table Tbl_ListDeleted
SELECT * INTO    Tbl_ListDeleted    FROM    QRemote...ListDeleted

IF OBJECT_ID (N'Tbl_OtherName', N'U') IS NOT NULL
Drop table Tbl_OtherName
SELECT * INTO    Tbl_OtherName    FROM    QRemote...OtherName

IF OBJECT_ID (N'Tbl_PaymentMethod', N'U') IS NOT NULL
Drop table Tbl_PaymentMethod
SELECT * INTO    Tbl_PaymentMethod    FROM    QRemote...PaymentMethod

IF OBJECT_ID (N'Tbl_PayrollItemNonWage', N'U') IS NOT NULL
Drop table Tbl_PayrollItemNonWage
SELECT * INTO    Tbl_PayrollItemNonWage    FROM    QRemote...PayrollItemNonWage

IF OBJECT_ID (N'Tbl_PayrollItemWage', N'U') IS NOT NULL
Drop table Tbl_PayrollItemWage
SELECT * INTO    Tbl_PayrollItemWage    FROM    QRemote...PayrollItemWage

IF OBJECT_ID (N'Tbl_Preferences', N'U') IS NOT NULL
Drop table Tbl_Preferences
SELECT * INTO    Tbl_Preferences    FROM    QRemote...Preferences

IF OBJECT_ID (N'Tbl_PriceLevel', N'U') IS NOT NULL
Drop table Tbl_PriceLevel
SELECT * INTO    Tbl_PriceLevel    FROM    QRemote...PriceLevel

IF OBJECT_ID (N'Tbl_PriceLevelPerItem', N'U') IS NOT NULL
Drop table Tbl_PriceLevelPerItem
SELECT * INTO    Tbl_PriceLevelPerItem    FROM    QRemote...PriceLevelPerItem

IF OBJECT_ID (N'Tbl_PurchaseOrder', N'U') IS NOT NULL
Drop table Tbl_PurchaseOrder
SELECT * INTO    Tbl_PurchaseOrder    FROM    QRemote...PurchaseOrder

IF OBJECT_ID (N'Tbl_PurchaseOrderLine', N'U') IS NOT NULL
Drop table Tbl_PurchaseOrderLine
SELECT * INTO    Tbl_PurchaseOrderLine    FROM    QRemote...PurchaseOrderLine

IF OBJECT_ID (N'Tbl_PurchaseOrderLinkedTxn', N'U') IS NOT NULL
Drop table Tbl_PurchaseOrderLinkedTxn
SELECT * INTO    Tbl_PurchaseOrderLinkedTxn    FROM    QRemote...PurchaseOrderLinkedTxn

IF OBJECT_ID (N'Tbl_ReceivePayment', N'U') IS NOT NULL
Drop table Tbl_ReceivePayment
SELECT * INTO    Tbl_ReceivePayment    FROM    QRemote...ReceivePayment

IF OBJECT_ID (N'Tbl_ReceivePaymentLine', N'U') IS NOT NULL
Drop table Tbl_ReceivePaymentLine
SELECT * INTO    Tbl_ReceivePaymentLine    FROM    QRemote...ReceivePaymentLine

IF OBJECT_ID (N'Tbl_ReceivePaymentLineLinkedTxn', N'U') IS NOT NULL
Drop table Tbl_ReceivePaymentLineLinkedTxn
SELECT * INTO    Tbl_ReceivePaymentLineLinkedTxn    FROM    QRemote...ReceivePaymentLineLinkedTxn

IF OBJECT_ID (N'Tbl_ReceivePaymentToDeposit', N'U') IS NOT NULL
Drop table Tbl_ReceivePaymentToDeposit
SELECT * INTO    Tbl_ReceivePaymentToDeposit    FROM    QRemote...ReceivePaymentToDeposit

IF OBJECT_ID (N'Tbl_Sales', N'U') IS NOT NULL
Drop table Tbl_Sales
SELECT * INTO    Tbl_Sales    FROM    QRemote...Sales

IF OBJECT_ID (N'Tbl_SalesLine', N'U') IS NOT NULL
Drop table Tbl_SalesLine
SELECT * INTO    Tbl_SalesLine    FROM    QRemote...SalesLine

IF OBJECT_ID (N'Tbl_SalesOrder', N'U') IS NOT NULL
Drop table Tbl_SalesOrder
SELECT * INTO    Tbl_SalesOrder    FROM    QRemote...SalesOrder

IF OBJECT_ID (N'Tbl_SalesOrderLine', N'U') IS NOT NULL
Drop table Tbl_SalesOrderLine
SELECT * INTO    Tbl_SalesOrderLine    FROM    QRemote...SalesOrderLine

IF OBJECT_ID (N'Tbl_SalesOrderLinkedTxn', N'U') IS NOT NULL
Drop table Tbl_SalesOrderLinkedTxn
SELECT * INTO    Tbl_SalesOrderLinkedTxn    FROM    QRemote...SalesOrderLinkedTxn

IF OBJECT_ID (N'Tbl_SalesReceipt', N'U') IS NOT NULL
Drop table Tbl_SalesReceipt
SELECT * INTO    Tbl_SalesReceipt    FROM    QRemote...SalesReceipt

IF OBJECT_ID (N'Tbl_SalesReceiptLine', N'U') IS NOT NULL
Drop table Tbl_SalesReceiptLine
SELECT * INTO    Tbl_SalesReceiptLine    FROM    QRemote...SalesReceiptLine

IF OBJECT_ID (N'Tbl_SalesRep', N'U') IS NOT NULL
Drop table Tbl_SalesRep
SELECT * INTO    Tbl_SalesRep    FROM    QRemote...SalesRep

IF OBJECT_ID (N'Tbl_SalesTaxCode', N'U') IS NOT NULL
Drop table Tbl_SalesTaxCode
SELECT * INTO    Tbl_SalesTaxCode    FROM    QRemote...SalesTaxCode

IF OBJECT_ID (N'Tbl_SalesTaxPaymentCheck', N'U') IS NOT NULL
Drop table Tbl_SalesTaxPaymentCheck
SELECT * INTO    Tbl_SalesTaxPaymentCheck    FROM    QRemote...SalesTaxPaymentCheck

IF OBJECT_ID (N'Tbl_SalesTaxPaymentCheckLine', N'U') IS NOT NULL
Drop table Tbl_SalesTaxPaymentCheckLine
SELECT * INTO    Tbl_SalesTaxPaymentCheckLine    FROM    QRemote...SalesTaxPaymentCheckLine

IF OBJECT_ID (N'Tbl_ShipMethod', N'U') IS NOT NULL
Drop table Tbl_ShipMethod
SELECT * INTO    Tbl_ShipMethod    FROM    QRemote...ShipMethod

IF OBJECT_ID (N'Tbl_SpecialAccount', N'U') IS NOT NULL
Drop table Tbl_SpecialAccount
SELECT * INTO    Tbl_SpecialAccount    FROM    QRemote...SpecialAccount

IF OBJECT_ID (N'Tbl_SpecialItem', N'U') IS NOT NULL
Drop table Tbl_SpecialItem
SELECT * INTO    Tbl_SpecialItem    FROM    QRemote...SpecialItem

IF OBJECT_ID (N'Tbl_StandardTerms', N'U') IS NOT NULL
Drop table Tbl_StandardTerms
SELECT * INTO    Tbl_StandardTerms    FROM    QRemote...StandardTerms

IF OBJECT_ID (N'Tbl_TaxCode', N'U') IS NOT NULL
Drop table Tbl_TaxCode
SELECT * INTO    Tbl_TaxCode    FROM    QRemote...TaxCode

IF OBJECT_ID (N'Tbl_Template', N'U') IS NOT NULL
Drop table Tbl_Template
SELECT * INTO    Tbl_Template    FROM    QRemote...Template

IF OBJECT_ID (N'Tbl_Terms', N'U') IS NOT NULL
Drop table Tbl_Terms
SELECT * INTO    Tbl_Terms    FROM    QRemote...Terms

IF OBJECT_ID (N'Tbl_TimeTracking', N'U') IS NOT NULL
Drop table Tbl_TimeTracking
SELECT * INTO    Tbl_TimeTracking    FROM    QRemote...TimeTracking

IF OBJECT_ID (N'Tbl_ToDo', N'U') IS NOT NULL
Drop table Tbl_ToDo
SELECT * INTO    Tbl_ToDo    FROM    QRemote...ToDo

IF OBJECT_ID (N'Tbl_Transaction', N'U') IS NOT NULL
Drop table Tbl_Transaction
SELECT * INTO    Tbl_Transaction    FROM    QRemote..."Transaction"

IF OBJECT_ID (N'Tbl_Transfer', N'U') IS NOT NULL
Drop table Tbl_Transfer
SELECT * INTO    Tbl_Transfer    FROM    QRemote...Transfer

IF OBJECT_ID (N'Tbl_TransferInventory', N'U') IS NOT NULL
Drop table Tbl_TransferInventory
SELECT * INTO    Tbl_TransferInventory    FROM    QRemote...TransferInventory

IF OBJECT_ID (N'Tbl_TransferInventoryLine', N'U') IS NOT NULL
Drop table Tbl_TransferInventoryLine
SELECT * INTO    Tbl_TransferInventoryLine    FROM    QRemote...TransferInventoryLine

IF OBJECT_ID (N'Tbl_TxnDeleted', N'U') IS NOT NULL
Drop table Tbl_TxnDeleted
SELECT * INTO    Tbl_TxnDeleted    FROM    QRemote...TxnDeleted

IF OBJECT_ID (N'Tbl_UnitOfMeasureSet', N'U') IS NOT NULL
Drop table Tbl_UnitOfMeasureSet
SELECT * INTO    Tbl_UnitOfMeasureSet    FROM    QRemote...UnitOfMeasureSet

IF OBJECT_ID (N'Tbl_UnitOfMeasureSetRelatedUnit', N'U') IS NOT NULL
Drop table Tbl_UnitOfMeasureSetRelatedUnit
SELECT * INTO    Tbl_UnitOfMeasureSetRelatedUnit    FROM    QRemote...UnitOfMeasureSetRelatedUnit

IF OBJECT_ID (N'Tbl_UnitOfMeasureSetDefaultUnit', N'U') IS NOT NULL
Drop table Tbl_UnitOfMeasureSetDefaultUnit
SELECT * INTO    Tbl_UnitOfMeasureSetDefaultUnit    FROM    QRemote...UnitOfMeasureSetDefaultUnit

IF OBJECT_ID (N'Tbl_Vehicle', N'U') IS NOT NULL
Drop table Tbl_Vehicle
SELECT * INTO    Tbl_Vehicle    FROM    QRemote...Vehicle

IF OBJECT_ID (N'Tbl_VehicleMileage', N'U') IS NOT NULL
Drop table Tbl_VehicleMileage
SELECT * INTO    Tbl_VehicleMileage    FROM    QRemote...VehicleMileage

IF OBJECT_ID (N'Tbl_Vendor', N'U') IS NOT NULL
Drop table Tbl_Vendor
SELECT * INTO    Tbl_Vendor    FROM    QRemote...Vendor

IF OBJECT_ID (N'Tbl_VendorContacts', N'U') IS NOT NULL
Drop table Tbl_VendorContacts
SELECT * INTO    Tbl_VendorContacts    FROM    QRemote...VendorContacts

IF OBJECT_ID (N'Tbl_VendorCredit', N'U') IS NOT NULL
Drop table Tbl_VendorCredit
SELECT * INTO    Tbl_VendorCredit    FROM    QRemote...VendorCredit

IF OBJECT_ID (N'Tbl_VendorCreditExpenseLine', N'U') IS NOT NULL
Drop table Tbl_VendorCreditExpenseLine
SELECT * INTO    Tbl_VendorCreditExpenseLine    FROM    QRemote...VendorCreditExpenseLine

IF OBJECT_ID (N'Tbl_VendorCreditItemLine', N'U') IS NOT NULL
Drop table Tbl_VendorCreditItemLine
SELECT * INTO    Tbl_VendorCreditItemLine    FROM    QRemote...VendorCreditItemLine

IF OBJECT_ID (N'Tbl_VendorCreditLinkedTxn', N'U') IS NOT NULL
Drop table Tbl_VendorCreditLinkedTxn
SELECT * INTO    Tbl_VendorCreditLinkedTxn    FROM    QRemote...VendorCreditLinkedTxn

IF OBJECT_ID (N'Tbl_VendorType', N'U') IS NOT NULL
Drop table Tbl_VendorType
SELECT * INTO    Tbl_VendorType    FROM    QRemote...VendorType

IF OBJECT_ID (N'Tbl_WorkersCompCode', N'U') IS NOT NULL
Drop table Tbl_WorkersCompCode
SELECT * INTO    Tbl_WorkersCompCode    FROM    QRemote...WorkersCompCode

IF OBJECT_ID (N'Tbl_WorkersCompCodeRateHistory', N'U') IS NOT NULL
Drop table Tbl_WorkersCompCodeRateHistory
SELECT * INTO    Tbl_WorkersCompCodeRateHistory    FROM    QRemote...WorkersCompCodeRateHistory

end

 

================================================================

By executing this stored procedure all tables are imported to SQL Server Database.

You can see that all tables are imported to SQL Server Database.

You can add this stored procedure to SQL Agent & schedule it. So it will automatically add all tables to SQL Server Database.

Now we will add this stored procedure to SQL Agent.

Right-click on SQL Server Agent & click on New >> Job to create a new Job.

A New Job popup will appear. Specify the name of the job.

Click next on the "Steps" in the left menu. An SQL job can contain one or more steps. A step might be simply an SQL statement or a stored procedure call. Add you step here.

Enter step name, type. Select database, write stored procedure execution command "exec Import_QODBC_Tables" & click ok.

Job step added.

The job is added in SQL Server Agent.

You can run a Job by right-click on Job name & click on Start Job at Step..

The job is executing.

[QODBC-ALL] Excel Automation - How to open, refresh and close a c...

$
0
0

Excel Automation - How to open, refresh and close a company file

Download Sample

Before using MS Excel application, please make sure you have installed MS Office Component named "Microsoft Query". About MS Query, please refer to Microsoft Office with MS Query and QODBC for more.

You need to open QuickBooks & load company file in QuickBooks.

Open MS Excel & create a new spreadsheet.
First, please select the "Data" tab, Navigate to "From Other Sources"->" From Microsoft Query"

And then in the "Choose Data Source" Window, please select a DSN to continue. (Here I choose the default data source with a sample company file opened. And check Use the Query Wizard to create/edit queries.).

 

'QuickBooks Data' as an example:

The first time uses MS Excel to access QuickBooks, you will be asked to grant access permission for QODBC. After you grant permission for QODBC, you will be guided by Query Wizard. Choose any table click on next until you reach to Query Wizard.

Select View data or edit query in Microsoft Query & click Finish:

Write query & click OK. In this example, I am writing Trial Balance report query.
sp_report TrialBalance show Debit_Title, Credit_Title, Label, Debit, Credit parameters DateMacro = 'LastMonth', ReportBasis = 'Cash'

You will get below message box about SQL Query, Click OK.

Report data is available in Microsoft Query:

Click on File & Return Data to Microsoft Excel to save the export report in Excel spreadsheet.

When you finish the query, choose to save it so that the next time you can directly use it. Leaving MS Query, MS Excel will ask you to import the query result into MS Excel:

Report Data is exported in Excel spreadsheet.

Now we will disable auto refresh of data from Data-->Connection-->Properties-->Uncheck Enable Background Refresh & Click OK:

Now we will add button & we will write code for button click event. On button click, it will open connection, refresh report data & close connection.

You can add button from Developer tab in MS Excel. If the Developer tab is not available, display it.

Display the Developer tab
Click the File tab, click Options, and then click the Customize Ribbon category.
In the Main Tabs list, select the Developer check box, and then click OK.

On the Developer tab, in the Controls group, click Insert, and then under ActiveX Controls, click Command Button.

Command Button is added. I have renamed it to Refresh Data. Double click on the command button to write code.

Write below code to open connection, refresh report data & close connection.

Private Sub CommandButton1_Click()
ActiveWorkbook.Connections("Query from QuickBooks Data").Refresh
End Sub

Note: Query from QuickBooks Data is the name of the connection. You can get it from the Data--> Connections

 

Report Data will be refreshed on clicking Refresh Data button.

[QODBC-ALL] Troubleshooting - CD Key has invalid checksum

$
0
0

Troubleshooting - CD Key has invalid checksum

Problem Description:

I am moving to a new server.

I have everything setup, but can't get the license to transfer. On the old machine when I go to the 'deactivate' using my cd-key I get:

"CD Key has invalid Checksum"



Please help me to resolve this error.

 

Solution:

You will get the error "CD Key has invalid Checksum" when you tried to activate CD KEY of the wrong product.

For Example:

You are trying to activate QODBC Desktop driver using QODBC POS CD KEY or using QODBC Online CD KEY.

So you need to make sure that you are using correct CD Key.

You can't use QODBC Desktop CD KEY with QODBC Online or QODBC POS vice-versa.

[QODBC-Online] Troubleshooting - QB Begin Session Failed. Unable ...

$
0
0

Troubleshooting - QB Begin Session Failed. Unable to load component

Problem Description:

I am trying to connect to QuickBooks Online using QODBC Online. But I am getting below error at the time of connection.



Please help me to resolve this error.

 

Solution:

QODBC Online is using default port 8383. You will get above error message when you have changed the port number in QODBC Online.

So, If you have changed the port number from QODBC Online Setup Screen, then Please close all the applications wait for 5 to 10 minutes and try to connect again.

If above does not resolve the issue, then please make sure that there is no other application is using this port.

If any other application is not using the port which you have specified on QODBC Online Setup Screen, then you need to restart windows & test again.

If any other application is using the port which you have specified on QODBC Online Setup Screen, then you need to change the port from QODBC Online Setup Screen.

You can change the port from:

Start >> All Programs >> QODBC Driver for use with QuickBooks Online >> Configure QODBC Online Data Source >> Go To "System DSN" Tab>> select QuickBooks Online Data >> click "configure" >> switch to General tab



Just write the port number which you want to use in "Port:" textbox & click "OK". In this example, I am changing it to default port 8383.



After changing port, Please close all the applications wait for 5 to 10 minutes and try to connect again. If it does not work, then you need to restart windows & test again.

If you are still facing issue, then please raise a support ticket to the QODBC Technical Support department by click here

[QODBC-Desktop] How to insert Invoice using Excel - VBA

$
0
0

How to insert Invoice using Excel - VBA

Download Sample

In this example, We will show you that How to insert Invoice in QuickBooks using the data available in Excel spreadsheet.

We have an excel spreadsheet which contains Invoice related information. Excel spreadsheet have a CustomerRefFullName, RefNumber, TxnDate, InvoiceLineItemRefFullName, InvoiceLineDesc, InvoiceLineRate, InvoiceLineQuantity, InvoiceLineSalesTaxCodeRefFullName, FQSaveToCache information.

Using this information we will create Invoice in QuickBooks which has 4 line items.

Now we will add button & we will write code for button click event. On button click, it inserts Invoice in QuickBooks.

You can add button from Developer tab in MS Excel. If the Developer tab is not available, display it.

Display the Developer tab
Click the File tab, click Options, and then click the Customize Ribbon category.
In the Main Tabs list, select the Developer check box, and then click OK.

On the Developer tab, in the Controls group, click Insert, and then under ActiveX Controls, click Command Button.

Command Button is added. I have renamed it to ADD Invoice. Double click on the command button to write code.

Write below code for Inserting Invoice in QuickBooks from excel spreadsheet.



Private Sub CommandButton1_Click()

Dim sh As Worksheet
Dim rw As Range
Dim RowCount As Integer
Dim CustomerRefFullName As String
Dim RefNumber As String
Dim TxnDate As Date
Dim InvoiceLineItemRefFullName As String
Dim InvoiceLineDesc As String
Dim InvoiceLineRate As Single
Dim InvoiceLineQuantity As Single
Dim InvoiceLineSalesTaxCodeRefFullName As String
Dim FQSaveToCache As Boolean
Dim oConnection As New ADODB.Connection
Dim sConnectString
Dim sSQL As String
Dim rs
Dim sMsg

RowCount = 0
sConnectString = "DSN=Quickbooks Data;OLE DB Services=-2;"

'' For 64-BIT use this one-->sConnectString = "DSN=QuickBooks Data 64-Bit QRemote;"
sSQL = "SELECT * FROM InvoiceLine"
Set rs = New ADODB.Recordset
oConnection.Open (sConnectString)
rs.Open sSQL, oConnection, adOpenDynamic, adLockOptimistic
Set sh = ActiveSheet
For Each rw In sh.Rows

If (RowCount > 0) Then
CustomerRefFullName = sh.Cells(rw.Row, 1).Value
If (CustomerRefFullName = "") Then
Exit For

End If

RefNumber = sh.Cells(rw.Row, 2).Value
TxnDate = sh.Cells(rw.Row, 3).Value
InvoiceLineItemRefFullName = sh.Cells(rw.Row, 4).Value
InvoiceLineDesc = sh.Cells(rw.Row, 5).Value
InvoiceLineRate = sh.Cells(rw.Row, 6).Value
InvoiceLineQuantity = sh.Cells(rw.Row, 7).Value
InvoiceLineSalesTaxCodeRefFullName = sh.Cells(rw.Row, 8).Value
FQSaveToCache = sh.Cells(rw.Row, 9).Value

rs.AddNew
rs("CustomerRefFullName") = CustomerRefFullName
rs("RefNumber") = RefNumber
rs("TxnDate") = TxnDate
rs("InvoiceLineItemRefFullName") = InvoiceLineItemRefFullName
rs("InvoiceLineDesc") = InvoiceLineDesc
rs("InvoiceLineRate") = InvoiceLineRate
rs("InvoiceLineQuantity") = InvoiceLineQuantity
rs("InvoiceLineSalesTaxCodeRefFullName") = InvoiceLineSalesTaxCodeRefFullName
rs("FQSaveToCache") = FQSaveToCache
rs.Update

End If

RowCount = RowCount + 1
Next rw
sMsg = sMsg & "Invoice Added!!!"
MsgBox sMsg

rs.Close
oConnection.Close

End Sub

 

 

 

On clicking on ADD Invoice button, Invoice will be added into QuickBooks.

Invoice Added.

 

You can see the same in QuickBooks Invoice is added.

Viewing all 313 articles
Browse latest View live


Latest Images