Front page | perl.beginners |
Postings from February 2002
RE: ADO syntax
Thread Previous
From:
RArul
Date:
February 13, 2002 14:09
Subject:
RE: ADO syntax
Message ID:
78B385FB8F70D511857900B0D0D06A58781B63@mail.newenergyassoc.com
You should not expect VisualBasic behavior in Perl. You have to be
punctilious for each paranthesis and braces.
Try to create a separate scalar var for say $objParam like this (that saves
some typing):
$objParam = $objCmd->Parameters;
$objParam->Append($objCmd->CreateParameter("val", adChar,
adParamInput,25, "Dcitionnaire"));
Don't omit the direction parameter (adParamInput or adParamOutput or
adParamInputOutput etc).
-- Rex
> -----Original Message-----
> From: mb [mailto:asmab1@free.fr]
> Sent: Wednesday, February 13, 2002 5:00 PM
> To: beginners@perl.org
> Subject: ADO syntax
>
>
> Hi all,
>
> can some one tells me what is wrong with that :
>
> $Conn->Execute("create procedure textproc \@val varchar(25)
> as select AR_Ref ,AR_Design from F_Article where AR_design
> like \@val");
> $cmd->{ActiveConnection} = $Conn;
> $cmd->{CommandText} = "{call textproc (?)}";
> $cmd->Parameters->Append $cmd->CreateParameter("val",
> adChar, ,25, "Dcitionnaire");
> $rs = $cmd->Execute();
> while (! $rs->EOF) {
> $XXX = $RS->Fields(0)->value;
> $YYY = $RS->Fields(1)->value;
> print $XXX;
> print $YYY;
> $rs->MoveNext;
> }
> it seem not apreciate the append to the command text.
>
> syntax error at c:/phpweb/cgi-bin/chercherlivre.cgi line 92,
> near "->Append $cmd"
>
> thanks a lot,
> asma
>
>
>
>
Thread Previous