sql server 2000 and stored proc returning cursor to perl

From: Ozgur Demirtas (Ozgur.Demirtas_at_stramit.com.au)
Date: 10/14/03


Date: Tue, 14 Oct 2003 19:28:31 +1000
To: "DBI users" <dbi-users@perl.org>


hi,
I am trying to run a stored procedure in Microsoft SQL 2000. The stored
procedure is supposed to return a cursor back to perl. In the code
below I am unable to find the codes I have marked with "?". I assume,
the "?" represent the DBIC cursor data type and I can not seem to find the code
for it. Do you think it might be sql server 2000 specific or there is a DBI code
for it?

use DBI;
use DBD::ODBC;

my $db = DBI->connect ....
my $retValue1;

my $sth = $db->prepare("{call proc_Main (?)}");
$sth->bind_param_inout(1,\$retValue1, ?);
$sth->execute or die "Error executing the statement: $DBI::errstr";

When I run this code I get:

Error executing the statement: [Microsoft][ODBC SQL Server Driver][SQL Server]Operand type clash: int is incompatible with cursor (SQL-22018)(DBD: st_execute/SQLExecute err=-1)

If you have done a similar job, I appreciate an input.

Thanks,
Ozgur



Relevant Pages

  • Re: noise words, @@ERROR, and stop and resume indexing
    ... these words at the beginning before sending them to the cursor. ... Looking for a FAQ on Indexing Services/SQL FTS ... >>Create table Noise ... >>> 1) check noise words inside stored procedure ...
    (microsoft.public.sqlserver.fulltext)
  • Re: SQL stored procedure not working.
    ... If I do not use that, how can I get the total record count? ... >> I create a stored procedure and a asp page. ... Even if you could specify the cursor type there, ... > interested in the RETURN value, you do not need to use a Command object. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Case statement issue
    ... except with a cursor other than the default ... > I have taken the sample of paging using a stored procedure from the ... > case statement, then the error message. ... > The for loop also seems to be a problem. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Case statement issue
    ... except with a cursor other than the default ... > I have taken the sample of paging using a stored procedure from the ... > case statement, then the error message. ... > The for loop also seems to be a problem. ...
    (microsoft.public.inetserver.asp.general)
  • RE: how to call a stored procedure that returns cursor??
    ... | Content-Class: urn:content-classes:message ... | i have a stored procedure that returns a cursor. ... JDBC directly. ...
    (microsoft.public.sqlserver.jdbcdriver)