![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All, OK, I'm a little bit thick I grant but…why isn't this working? $sth = $dbh->prepare("execute procedure test_proc(a = ?)"); $a = 1; $sth->execute($a); In fact it dies at the prepare with: E_US09C4 Syntax error on line 1. Last symbol read was: 'execute'. |
#3
| |||
| |||
|
|
Hi All, OK, I'm a little bit thick I grant but...why isn't this working? $sth = $dbh->prepare("execute procedure test_proc(a = ?)"); $a = 1; $sth->execute($a); In fact it dies at the prepare with: E_US09C4 Syntax error on line 1. Last symbol read was: 'execute'. |
#4
| |||
| |||
|
|
Which probably explains why prepare("...(a = 1)") also failed with *this error. Seems like I have to: $stmt = "execute procedure test_proc(a = $a)"; $dbh->do($stmt); Marty * -----Original Message----- From: Karl Schendel [mailto:schen... (AT) kbcomputer (DOT) com] Sent: 01 July 2011 13:02 To: Ingres and related product discussion forum Subject: Re: [Info-Ingres] Perl DBI ...parameter placeholders On Jul 1, 2011, at 7:44 AM, Martin Bowes wrote: Hi All, OK, I'm a little bit thick I grant but...why isn't this working? $sth = $dbh->prepare("execute procedure test_proc(a = ?)"); $a = 1; $sth->execute($a); In fact it dies at the prepare with: E_US09C4 Syntax error on line 1. *Last symbol read was: 'execute'. You can't prepare an execute. *I don't know if there is any deep dark reason, or if it's just because execute isn't one of the statements listed in the grammar for "prepare_stmt_list". Karl _______________________________________________ Info-Ingres mailing list Info-Ing... (AT) kettleriverconsulting (DOT) comhttp://ext-cando.kettleriverconsulting.com/mailman/listinfo/info-ingres |
#5
| |||
| |||
|
|
Which probably explains why prepare("...(a = 1)") also failed with *this error. Seems like I have to: $stmt = "execute procedure test_proc(a = $a)"; $dbh->do($stmt); Marty * -----Original Message----- From: Karl Schendel [mailto:schen... (AT) kbcomputer (DOT) com] Sent: 01 July 2011 13:02 To: Ingres and related product discussion forum Subject: Re: [Info-Ingres] Perl DBI ...parameter placeholders On Jul 1, 2011, at 7:44 AM, Martin Bowes wrote: Hi All, OK, I'm a little bit thick I grant but...why isn't this working? $sth = $dbh->prepare("execute procedure test_proc(a = ?)"); $a = 1; $sth->execute($a); In fact it dies at the prepare with: E_US09C4 Syntax error on line 1. *Last symbol read was: 'execute'. You can't prepare an execute. *I don't know if there is any deep dark reason, or if it's just because execute isn't one of the statements listed in the grammar for "prepare_stmt_list". Karl _______________________________________________ Info-Ingres mailing list Info-Ing... (AT) kettleriverconsulting (DOT) comhttp://ext-cando.kettleriverconsulting.com/mailman/listinfo/info-ingres |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
OK, I'm a little bit thick I grant but...why isn't this working? $sth = $dbh->prepare("execute procedure test_proc(a = ?)"); $a = 1; $sth->execute($a); In fact it dies at the prepare with: E_US09C4 Syntax error on line 1. *Last symbol read was: 'execute'. You can't prepare an execute. *I don't know if there is any deep dark reason, or if it's just because execute isn't one of the statements listed in the grammar for "prepare_stmt_list". |
#8
| |||
| |||
|
|
OK, I'm a little bit thick I grant but...why isn't this working? $sth = $dbh->prepare("execute procedure test_proc(a = ?)"); $a = 1; $sth->execute($a); In fact it dies at the prepare with: E_US09C4 Syntax error on line 1.Last symbol read was: 'execute'. You can't prepare an execute. I don't know if there is any deep dark reason, or if it's just because execute isn't one of the statements listed in the grammar for "prepare_stmt_list". Actually, if we can't prepare an execute then as a consequence, we can't get back parameters passed by reference. It also appears that there is no means in DBI to get back a return value from a procedure. Marty |

#9
| |||
| |||
|
|
it works for Oracle...(wow where did that flying keyboard come from lol ![]() maybe it is not supported by DBD::Ingres. and here is the confirmation : http://search.cpan.org/~timb/dbd-sum...red_Procedures maybe go for DBD::ODBC instead |
#10
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |