Procedure or function has too many arguments specified

Man Min Yan <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Hi,
I am getting the above error when trying to execute over 65535 statements (tested with insert, update and select) using DBD::ODBC, unixODBC and freeTDS (both 0.82 stable and 0.83 20081016) talking to SQL Server 2000 and 2005. I can consistently replicate the problem with the script below.

Please note:
- my freetds.conf is configured with 'tds version = 8.0'
- I'm running on f7, with unixODBC 2.2.12-5, DBD::ODBC 1.13
- the script runs fine if I use DBD::ODBC, unixODBC, mysql-connector (sorts of eliminates DBD::ODBC, unixODBC as the culprits)
- the script runs fine if I use DBD::Proxy (eliminates the dbms side as the culprit)
- the script only fails if there is a prepared select present (even if never used).
- it always fails on record 65536 (16-bit number somewhere??)
- I've attached an extract of the freetds dump log for the last couple of records.

Any help in solving this problem would be greatly appreciated. Thanks.
---
#!/usr/local/bin/perl -w

use strict;
use DBI;

# The table 'test_table' has the following structure
#    create table test_table (id int not null, value varchar(10))

my $dsn = 'dbi:ODBC:sqlserver'; my $user='xx'; my $pass='xx';
#my $dsn = 'dbi:ODBC:mysql'; my $user='xx'; my $pass='xx';
#my $dsn = 'dbi:Proxy:hostname=myserver;port=40000;dsn=dbi:ODBC:sqlserver'; my $user='xx'; my $pass='xx';
my $dbh = DBI->connect($dsn, $user, $pass,
    {
        PrintError => 0,
        RaiseError => 0,
        AutoCommit => 1,
    }) or die $DBI::errstr;
$dbh->do('truncate table test_table') or die $dbh->errstr;

#my $updSth = $dbh->prepare('update test_table set value=? where id=?') or die $dbh->errstr;
my $selSth = $dbh->prepare('select * from test_table where id=?') or die $dbh->errstr;
my $insSth = $dbh->prepare('insert into test_table values (?, ?)') or die $dbh->errstr;

$| = 1;
my $maxIteration = 100000;
for (my $i = 1; $i <= $maxIteration; $i++)
{
    print "$i\r";
    $insSth->execute($i, $i) or die "Fail execute with $i - ", $insSth->errstr;
    #$updSth->execute('v' . $i, $i) or die "Fail execute with $i - ", $updSth->errstr;
    #$selSth->execute($i) or die "Fail execute with $i - ", $selSth->errstr;
    #$selSth->finish();
}


Send instant messages to your online friends http://au.messenger.yahoo.com

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
dump.log.gz (application/x-gzip, 2.9 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.