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: soup at ampersand dot com (Doug Campbell)
Subject: Problem with loading multiple tables with sybperl bcp
Date: Feb 20 1996 1:21AM

I've run into an odd behavior of Sybase and/or Sybperl.  I have a
program that loads 8 tables via BCP.  The basic flow is the following:

	&dblogin();
	foreach $table (@tables)
	{
	    &bcp_init ($dbproc, "$db..$table", "", "", DB_IN);
	    &bcp_meminit ($dbproc, $num_fields);
	    foreach $row (@rows)
	    {
		&bcp_sendrow ($dbproc, @row);
	    };
	    &bcp_done ($dbproc);
	};

On the 8th (and last) table, when I call &bcp_done() Sybase prints:

	Msg 925, Level 16, State 1
	Line 1
		Maximum number of used databases for each query has been exceeded. The maximum allowed is 8.

and the row does not get loaded.  The function &bcp_done() returns 1.
The program works fine for many other cases where I load fewer than 8
tables in this loop.

This is with Sybperl 2.03 and perl 5.002beta1g.

Any ideas or pointers would be much appreciated.

					Thanks,
					Doug Campbell
					soup@ampersand.com