Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2010-11-30
1
Medium Priority
?
639 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

618 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