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: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Re: BCP difficulties
Date: Oct 30 1997 5:56PM

salvatore.sferrazza@ny.ubs.com wrote:
> 
>      Greetings,
> 
>      Sybase 11.0.2, Sybase::DBlib, Perl 5.004
> 
>      I recently modified a script I wrote some time back, and the original
>      script works fine and is almost in production.  I needed to modify
>      the script for a different project, and now I am getting the following
>      errors when I try to run it:
> 
>      Server 'ERISDVLP', Line 1
>              The front end tool you are using does not support the feature
>      of bulk insert from host, please use the proper tools for this
>      command.
>      DB-Library error:
>              General SQL Server error: Check messages from the SQL Server.
>      DB-Library error:
>              bcp_init() must be called before any other bcp routines.
> 
> 
>      The last line get repeated several times until the script finally
>      dies.  Below is my main bcp routine.  This routine works in my
>      other script...any ideas/insight?  The line that bothers me the most
>      is the first one re: front-end tool.
> 
>      Thanks guys..
> 
>      -- Sal
> 
>       ################################################
> 
>      sub bcp_it {
> 
>          my $err_file = "./bcp.errors";
>          my ($dbh, $tablename, $cols, $textfile) = @_;
>          my $bcp_string = "corpdir_test" . ".dbo." . $tablename;
>          my $delimiter = "\|";
> 
>          &BCP_SETL(TRUE);

You must call BCP_SETL(TRUE) *before* opening the connection (ie
before calling new/dbopen).

Michael
-- 
Michael Peppler       -||-  Data Migrations Inc.
mpeppler@datamig.com  -||-  http://www.mbay.net/~mpeppler