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 : DisplaySQL.php problemSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v7 Forum

 New Topic 
 
 Post Reply 
[1]  
 DisplaySQL.php problem 
 Author   Message 
  gwardell 
  
 Group: Members 
 Posts: 6 
 Joined: 2006-10-30 
 Profile
 Posted : 2006-10-30 12:22:26

Hi,

When I run "DisplaySQL.php" it seems to be hanging on this statement:

$oConnect = odbc_connect("QuickBooks Data", "", "");

But I can't figure out why it's doing this.

VBDEMO32.EXE runs with no problems so I know the DNS and Remote Connector are working.

When I put Echo and die statements in the PHP file they display so I know the PHP is working.

BTW, I don't really know that much about PHP so it could be a PHP configuration issue.

Gary

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-10-30 13:49:39

Because you are using the Remote Connector, you need configure the DSN with all the correct options. See: I do not want to install QuickBooks on every machine. How do I setup QODBC Remote? 

Often we specify these parameters in the connection string, for example:

strConnect = "ODBC;DSN=QuickBooks Data;DFQ=C:\QUICKBOOKS\baselineNov17th.QBW;" & _
    "OpenMode=M;SERVER=QODBC;IBizRemoteConnect=Yes;" & _
    "IBizRemoteURL=http://localhost:2080;IBizRemotePWD=reporting;" & _
    "IBizRemoteConnTimeOut=1000;"

 

  Top 
  gwardell 
  
 Group: Members 
 Posts: 6 
 Joined: 2006-10-30 
 Profile
 Posted : 2006-10-30 14:03:49

Hi,

Ok, now I'm confused. The article you list doesn't mention PHP at all.

If the DSN was not setup correctly why does the VB program that uses the DSN, work?

What needs to be different about the DSN for PHP to work?

Gary

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-10-30 20:47:56

Well you didn't say much on how you setup QODBC Remote, so I sent you there first to see the setup options. VB Demo works because it's an application, while your PHP script is running through a Windows Service.

I'm guessing that you're using the Remote Connector instead of the QODBC DCOMs. This means that the full path of the company file will need to specified in the DSN setup for QODBC (see: How do I setup QODBC to auto-login into QuickBooks and start it if it's not running? ) and the IBiz Remote Connector needs to be running in your System Tray and QuickBooks must be closed. Then try VB Demo, and then try qbcust.asp (see:How can I see QuickBooks data in a Internet Explorer Browser using Windows XP? for the file) and if they work, try testing your PHP files.

 

  Top 
  gwardell 
  
 Group: Members 
 Posts: 6 
 Joined: 2006-10-30 
 Profile
 Posted : 2006-11-01 04:43:16

Hi,
Ok, I went through both articles and found a couple things that needed changing.

Now the VB Demo works and the qbcust.asp works.

But the DisplaySQL.asp doesn't and DisplaySQL.php doesn't. It doesn't even write the ibizqbcon.txt log file for these.
I even modified the DisplaySQL.asp to use the same connection string as qbcust.asp and added the same debug statements. It's hanging on:

oConnection.Open "QuickBooks Data"

I don't understand why one asp file works and the other doesn't, especially when using the same connection string.

Gary

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-11-01 08:30:02

Actually they are not the same:

DisplaySQL.asp does:
oConnection.Open "DSN=QuickBooks Data;OLE DB Services=-2" ''This is the name of your System DSN
oRecordset.CursorLocation = adUseClient
oRecordset.Open sSQL , oConnection, adOpenStatic, adLockOptimistic

while qbcust.asp does:
oConnection.Open "QuickBooks Data"
response.write "QODBC DSN QuickBooks Data Open<BR>" & vbCrLf
response.flush

oRecordset.CursorLocation = adUseClient
oRecordset.Open "SELECT * FROM Customer" , oConnection, adOpenStatic, adLockOptimistic

qbcust.asp is one of my scripts.

 

  Top 
  gwardell 
  
 Group: Members 
 Posts: 6 
 Joined: 2006-10-30 
 Profile
 Posted : 2006-11-02 01:25:00

Maybe I didn't make myself clear.

Aren't DisplaySQL.asp and DisplaySQL.php basically the same page in different languages?

I put:

<% Response.buffer = true %>

and

oConnection.Open "QuickBooks Data"
response.write "QODBC DSN QuickBooks Data Open<BR>" & vbCrLf
response.flush

In DisplaySQL.asp,. but I never got the response write.

So where does that leave me?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-11-02 10:25:07
Because you are using the Remote Connector, try running QuickBooks first with the company file open, and then try qbcust.asp, DisplaySQL.asp and DisplaySQL.php. 

  Top 
  gwardell 
  
 Group: Members 
 Posts: 6 
 Joined: 2006-10-30 
 Profile
 Posted : 2006-11-06 05:40:47

That didn't seem to make any difference. I can't get qbcust.asp to work now no matter what I do.

 

We've given up on the web server approach. Really what they need is to run some PHP programs to manipulate the QB data, they don't need a web interface.

 

How do I go about setting it up so they can use PHP in CLI mode (Already installed) on the same machine as Quick Books 6.0 Enterprise.

 

QODBC Version 7.0.0.194 is of course installed on that machine and currently setup with the remote connector.

 

The VB Demo currently runs on that machine and retrieves data.

 

What I'd like is for them to work on a Terminal Services session. Can QB run there or does it have to run on the console? I'm sort of confused on that point as the documentation seems be ambiguous on that unless using DCom servers. I don't know if I need the DCom option now or not.

 

I appreciate your help with this. It seems like a good product, just we've had trouble getting it going.

 

Gary

 

The current setup is:

 

Windows 2000, SP4 with terminal services
Quick Books Enterprise Solutins 6.0
QODBC Version 7.0.0.194 with the remote connector still configured
PHP 5.1.6 (cli) (built: Aug 23 2006 16:35:53)

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-11-06 11:27:46
Please have at look at the topic: W2K3 Terminal Server / QB2006 Ent. + QODBC  to better understand how QODBC can only run on the server console (local session) on the Terminal Server and how all connections must connect via the QODBC Remote Connector to the iBiz Remote Connector that needs to running in the System Tray on the server console. 

  Top 
  gwardell 
  
 Group: Members 
 Posts: 6 
 Joined: 2006-10-30 
 Profile
 Posted : 2006-11-06 23:52:35

>QODBC doesn't support Terminal Services

Ok, so that is not supported.

So how how do I configure it so that everything is runnng on the consol desktop?

Thanks,

Gary

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-11-07 10:22:16

Login to your sever as the Admin user, start the iBiz Remote Connector and then connect to QODBC if you are still using the Remote Connector. Otherwise you can setup the QODBC DCOMs, but that will only work on the server console, not from any terminal sessions.

If you decide to use the QODBC DCOM Servers for server access instead of the Remote Connector and are using Remote Desktop (Terminal Services) to setup DCOMs, it will look correct but will not work. If you must use your remote Desktop, use this line to connect to the Foreground console:

mstsc /v:servername /console

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to