[QODBC-Desktop] How to use QODBC with ColdFusion
Posted by brad waddell on 12 March 2009 05:21 PM
|
|
Note: DCOM component is deprecated. As an alternative to DCOM, you can use QRemote. Please refer to the articles for more information: How to use QRemote with ColdFusion How to use QODBC with ColdFusionInstructions about using QODBC with ColdFusionUsing ColdFusion on an internal Intranet or the World Wide Web requires the Server Edition of QODBC. The QODBC Server Edition includes DCOM servers required to allow QODBC to run as a system service to find the instance of QuickBooks running on the server console. QuickBooks must be running with the company file opened on the system console. You have two choices in setting up ColdFusion. The first is using the QODBC DCOM Servers. The second is using the Remote Connector Option. The DCOM Servers require QuickBooks to run on the Server Console, not a Terminal Services session. They are more secure and require no extra overhead but are more rigid in how it is set up, and it cannot be easy to configure the security of the DCOM servers. QODBC Basic Setup for Using the DCOM Servers MethodYou must turn on the use of the DCOM servers. You do this by running the QODBC Setup Screen and selecting the Server Edition tab page. Check the checkbox for Use DCOM Servers. If you're working with the QuickBooks sample company file, this option is available to check even if you do not have a Server Edition license. It will be ignored if you open a standard company file and do not have a QODBC Server Edition or evaluation. [Note: You may need to check the Run 2.1 ODBC Compatibility checkbox - Certain applications require ODBC 2.1 Compatibility to use QODBC.] For example, anything that uses the Java ODBC library, like ColdFusion, requires this option turned on, or recordsets will be returned with no rowsets or only one rowset.
Internet Information Server (IIS) Basic SetupEnsure the following are installed and registered on your web server or even your notebook running Windows XP Pro :
Automatic DCOM Configuration
ColdFusion Data Source Setup InstructionsRun the ColdFusion Administrator. Under DATA & SERVICES, choose Data Sources. Use "QBs" as the Data Source name to match the DisplaySQL.cfm sample script below. The Driver is ODBC Socket. Press the Add button. Under ODBC DSN, choose a QuickBooks DSN. QuickBooks Data is a DSN that is created by the QODBC installation. The username should be set to Admin. You can put any notes you want in the description field. Next, Press the Show Advanced Settings Button. Make sure the Limit Connections and Maintain Connections are unchecked. You can remove the Create, Drop, Alter, Grant and Revoke checkboxes. Add checkboxes for Select, Insert, Update, Delete, and Stored Procedures. Press Submit and your QODBC Data Source should appear on the Data Sources list. You can test your QODBC DCOM Setup by downloading: TestDCOM.CFM and test QODBC with your new Macromedia ColdFusion ODBC Socket connection using the following sample script: DisplaySQL.CFM. DisplaySQL.cfm uses dataSource="QBs," which is the QuickBooks Data DSN. For this to work, you must also configure the "QuickBooks Data" data source to auto-login your company file, as shown in How to set up QODBC for Auto-login into QuickBooks.
Keywords: PHP, IIS, ColdFusion, can it work with php, service-based application | |
|