Solved

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

Posted on 2010-11-30
1
617 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

Independent Software Vendors: 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

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
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.

734 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