PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: mpeppler at itf dot ch (Michael Peppler)
Subject: Re: BCP tests failing for Sybperl 2.04, perl5.002, SunOS 4.1.3
Date: Mar 11 1996 11:28AM

> From: jander@lehman.com (Jim Anderson)
> PERL_DL_NONLAZY=1 /home/scopusad/s4/bin/perl -I../blib/arch -I../blib/lib -I/home/scopusad/s4/lib/perl5/sun4-sunos/5.002 -I/home/scopusad/s4/lib/perl5 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
> t/bcp...............Argument "SYBESMSG" isn't numeric in ne at ../blib/lib/sybutil.pl line 56.
> Sybase error: Attempt to use Bulk Copy with a non-existent Server table.
> bcp_init failed. at t/bcp.t line 58
> FAILED tests 5-9
> 	Failed 5/9 tests, 44.44% okay
> 	Test returned status 255 (wstat 65280)


That's a bug that I only found recently, and is due to a different
internal behavoir between DBlib 4.x and 10.x when calling bcp_init().
Because the bcp test program createsa temp table (#bcp) I call
bcp_init(#bcp,....) which fails because internally, DBlib tries to
extract table structure information from the *current* database, not
from tempdb. This can be corrected by adding a

     $dbh->dbuse('tempdb');

in BCP.pm in _gettabinfo() when $table starts with #.

If you have a (non-tempdb) database where you can create a temporary
table for testing you can modify the bcp.t test script to make sure
that it works for you.

Michael