Copy link to clipboard
Copied
Hello:
I am running Dreamweaver CS5 with Coldfusion 9 I am trying to integrate my Quickbooks data into my website. I am using the QODBC driver to convert my Quickbooks data into a ODBC database. I am able to query the database using the give VBdemo2 supplied with the software. However when I create a query on a Dreamweaver .cfm page and run the query i keep getting the "Driver not capable" error. After reading through the forums on QODBC it seems to be a problem on the Coldfusion side. I am wondering if anyone knows why this is happening and if there is some fix to get the query to be successful. I have listed my code below.
A side not the query I am running is getting data from multiple columns from the same table, this gets the error message. Now when I set the query to retrieve only one column of data such as "TxnID" it goes through and post the data normally. Any help is much appreciated.
<cflock scope="Session" type="ReadOnly" timeout="30" throwontimeout="no">
<cfset MM_Username=Iif(IsDefined("Session.MM_Username"),"Session.MM_Username",DE(""))>
<cfset MM_UserAuthorization=Iif(IsDefined("Session.MM_UserAuthorization"),"Session.MM_UserAuthorization",DE(""))>
</cflock>
<cfif MM_Username EQ "" OR MM_UserAuthorization EQ "" OR ListFind("User,Admin",MM_UserAuthorization) EQ 0>
<cfset MM_referer=CGI.SCRIPT_NAME>
<cfif CGI.QUERY_STRING NEQ "">
<cfset MM_referer=MM_referer & "?" & CGI.QUERY_STRING>
</cfif>
<cfset MM_failureURL="sorry.cfm?accessdenied=" & URLEncodedFormat(MM_referer)>
<cflocation url="#MM_failureURL#" addtoken="no">
</cfif>
<cfparam name="PageNum_Query_Invoice" default="1">
<cfquery name="Query_Invoice" datasource="QBs">
SELECT TxnID, TimeCreated, TxnDate, DueDate, BalanceRemaining, IsPaid
FROM Invoice
WHERE CustomerRefFullName = <cfoutput>'#Session.FullName#'</cfoutput>
</cfquery>
<cfset MaxRows_Query_Invoice=10>
<cfset StartRow_Query_Invoice=Min((PageNum_Query_Invoice-1)*MaxRows_Query_Invoice+1,Max(Query_Invoice.RecordCount,1))>
<cfset EndRow_Query_Invoice=Min(StartRow_Query_Invoice+MaxRows_Query_Invoice-1,Query_Invoice.RecordCount)>
<cfset TotalPages_Query_Invoice=Ceiling(Query_Invoice.RecordCount/MaxRows_Query_Invoice)>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/customer_template.dwt.cfm" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- InstanceBeginEditable name="title" --><title>Untitled Document</title><!-- InstanceEndEditable -->
<link href="styles/Main.css" rel="stylesheet" type="text/css">
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
<!-- InstanceBeginEditable name="head" --> Head content goes here <!-- InstanceEndEditable --></head>
<body>
<div id="Container">
<div id="header"><img src="Images/Website-Image.gif" width="393" height="217" alt="TS Landscaping Logo and Name of company"></div>
<div id="menu_bar1">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a class="MenuBarItemSubmenu" href="index.cfm">Home</a>
<ul>
<li><a href="#">Item 1.1</a></li>
<li><a href="#">Item 1.2</a></li>
<li><a href="#">Item 1.3</a></li>
</ul>
</li>
<li><a href="#">About Us</a></li>
<li><a href="#">Services</a></li>
<li><a class="MenuBarItemSubmenu" href="#">User Account</a>
<ul>
<li><a href="login.cfm">Login</a></li>
<li><a href="registration_page_contact.cfm">Register</a></li>
<li><a href="members_page.cfm">Customer Page</a></li>
</ul>
</li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
<div id="Main">
<div id="side_bar"><!-- InstanceBeginEditable name="sidebar" -->Content for id "side_bar" Goes Here<!-- InstanceEndEditable --></div>
<div id="main_body"><!-- InstanceBeginEditable name="mainbody" -->
<h1><cfoutput>#Session.FullName#</cfoutput> Invoices</h1>
<p> Here you can review your past and current invoices. </p>
<table border="1">
<tr>
<td>TxnID</td>
<td>TimeCreated</td>
<td>TxnDate</td>
<td>DueDate</td>
<td>BalanceRemaining</td>
<td>IsPaid</td>
</tr>
<cfoutput query="Query_Invoice" startRow="#StartRow_Query_Invoice#" maxRows="#MaxRows_Query_Invoice#">
<tr>
<td>#Query_Invoice.TxnID#</td>
<td>#Query_Invoice.TimeCreated#</td>
<td>#Query_Invoice.TxnDate#</td>
<td>#Query_Invoice.DueDate#</td>
<td>#Query_Invoice.BalanceRemaining#</td>
<td>#Query_Invoice.IsPaid#</td>
</tr>
</cfoutput>
</table>
<!-- InstanceEndEditable --></div>
</div>
<div id="footer">
<p>Home | About Us | Site Map </p>
<p>© TS Landscaping LLC 2010</p>
</div>
</div>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
<!-- InstanceEnd --></html>
Copy link to clipboard
Copied
After messing around with this I found out that it has to do with the "Type" related to the column being pulled. That is all the columns formatted in the Varchar and Timestamp get pulled correctly and no error. As soon as I try to pull a column with the "Bit" type it throws an error. I wonder why this is? Is there any workaround to this. I haven't figured out how to change the type in my database because it was created by a third party driver.
Copy link to clipboard
Copied
Hi,
I'm not familar with Quickbooks,
Just a suggestion, we will be using CAST and CONVERT for converting one datatype to another.
try this out;
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more