freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "ZIGLIO Frediano" <Frediano.Ziglio AT vodafoneomnitel.it>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] ODBC: { ? = CALL myproc() }
- Date: Wed, 16 Apr 2003 08:27:31 +0200
>
> I've got a problem using ODBC CALL syntax with inout bound
> parameters to get
> at a stored procedure's return value.
>
> I'm using...
>
> Linux: Gentoo 1.4
> MSSQL: 7.0sp2
> unixODBC: 2.0.6
> FreeTDS: 0.61
> Perl: 5.8.0
> DBI: 1.35
> DBD::ODBC: 1.05
>
> I've got 3 different variations on the same thing that have different
> outcomes:
> o syntax error on valid syntax
> o segmentation fault on valid syntax
> o no error, but unexpected result
>
> 1) If I create a stored procedure:
>
> create procedure odbc_call as return 1
>
> and a perl script:
>
> #!usr/bin/perl -w
> use DBI;
> my $rv = 0;
> my $dbh = DBI->connect(
> 'dbi:ODBC:ServerName=RD_Q;Driver=TDS;Database=SPCentral',
> 'sa', 'mypasswd',
> {RaiseError => 1, AutoCommit => 1}
> ) or die DBI->errstr;
> $dbh->trace(1);
> my $sth = $dbh->prepare('{ ? = call odbc_call() }');
Syntax is wrong, use {?=call odbc_call()}. Documentation say nothing about
space...
>
> 2) If I alter the prepared statement to remove all
> unnecessary whitespace:
>
> {?=call odbc_call()}
>
> I get a segmentation fault. The segfault goes away if I:
> o place a space between the opening '{' and '?'
> { ?=call odbc_call()}
> o alter the stored proc to return a result set
> create procedure odbc_call as select 1 return 1
>
...
I'll look deepeer..
freddy77
-
[freetds] ODBC: { ? = CALL myproc() },
Garrett Goebel, 04/15/2003
- <Possible follow-up(s)>
- RE: [freetds] ODBC: { ? = CALL myproc() }, ZIGLIO Frediano, 04/16/2003
-
RE: [freetds] ODBC: { ? = CALL myproc() },
Garrett Goebel, 04/16/2003
- RE: [freetds] ODBC: { ? = CALL myproc() }, Frediano Ziglio, 04/21/2003
- RE: [freetds] ODBC: { ? = CALL myproc() }, Garrett Goebel, 04/16/2003
- RE: [freetds] ODBC: { ? = CALL myproc() }, Garrett Goebel, 04/23/2003
- RE: [freetds] ODBC: { ? = CALL myproc() }, Garrett Goebel, 04/23/2003
Archive powered by MHonArc 2.6.24.