Thanks Bill,
Your suggestion seems to work. I do no know why that line should be
needed since this was a small test database to see if I can call a
stored procedure from PHP. This was the only stored procedure in the
database. The most important thing is the stored procedure works....at
least form R:Base.
Next question:
In my PHP code I tried to call up the stored procedure below using the
PHP code:
$connect = odbc_connect ( "phptest.RB1" , '' , '' );
$query= "call(doit())";
$exec = odbc_exec( $connect ,$query );
When trying to run the third line the PHP program spit out the following
error message.
*Warning*: odbc_exec() [function.odbc-exec
<http://localhost:3569/function.odbc-exec>]: SQL error: [RBTI][R:BASE 7.6 ODBC
ODBC Driver][phptest.RB1]-ERROR- Driver not capable. (2682),
SQL state HYC00 in SQLExecDirect in *C:\wamp\www\doit.php* on line *14**Warning*:
odbc_exec() [function.odbc-exec <http://localhost:3569/function.odbc-exec>]:
SQL error: [RBTI][R:BASE 7.6
ODBC ODBC Driver][phptest.RB1]-ERROR- Driver not capable. (2682), SQL state
HYC00 in SQLExecDirect in *C:\wamp\www\doit.php* on line *14
Does Oterro allow the developer to access stored procedures in an R:Base
database from PHP? If so, what am I doing wrong?
I just finished a 5 day "Boot Camp" in ***PHP so I am very new to this stuff
and am very much in the learning mode.
Thanks,
**
*Stuart J. Cohen, Ph.D.
Major, Medical Service Corps
Research Specialist
Walter Reed Army Medical Center
National Disaster Medical System Federal Coordinating Center
Phone: 202-782-3636
Cell: 301-514-3975
Fax: 202-782-4360
E-mail: [EMAIL PROTECTED]
*
Bill Downall wrote:
Stuart,
Try a CLEAR VAR STP_RETURN at the top of your stored procedure. Maybe
some other SP returned a different data type, and left it hanging around.
Bill
On Feb 9, 2008 1:59 PM, Stuart Cohen <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
I traced the following stored procedure:
SET VAR vcountnum INTEGER = NULL
SELECT COUNT(*) INTO vcountnum INDIC ivcountnum FROM login
RETURN .vcountnum
After running the third line I get the following error message:
--ERROR- (STP_RETURN) is a reserved word or contains illegal
characters
(3065).
Does anybody see what I am doing wrong?
Stuart J. Cohen, Ph.D.
Major, Medical Service Corps
Research Specialist
Walter Reed Army Medical Center
National Disaster Medical System Federal Coordinating Center
Phone: 202-782-3636
Cell: 301-514-3975
Fax: 202-782-4360
E-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>