Solved

I get a syntax error trying to call an informix stored procedure.

Posted on 2010-11-30
1
593 Views
Last Modified: 2012-08-13
I keep getting this error Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Microsoft OLE DB Provider for ODBC Drivers<br/><b>Description:</b> [OpenLink][ODBC][Informix Server]A syntax error has occurred. (-201)' in  com->Open('execute procedu...', Object(com))
I am calling the stored procedure, like this
$sqlStr='execute procedure supapp_view_orders("value","value")';
$adoConn = new COM("ADODB.Connection") or die("Can't start ADO");
 $recordSet = new COM("ADODB.RecordSet") or die("Can't create record set");
$adoConn->Open("DSN=value;Database=value;UID=value;PWD=value");
$recordSet->Open($sqlStr, $adoConn);
The connection itself works and I can run a normal query though just fine.
Am I calling the stored procedure incorrectly, or would this be an underlying syntax error in the stored procedure?
0
Comment
Question by:haloexpertsexchange
1 Comment
 
LVL 13

Accepted Solution

by:
haloexpertsexchange earned 0 total points
ID: 34240265
Never mind it, I figured out the syntax error, $sqlStr="execute procedure supapp_view_orders('value','value')"; Just swap around the single, double quotes and its fine.
Now I just have to see if I can get a stored procedure to run on a read-only connection.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now