Skip to Content.
Sympa Menu

freetds - Re: [freetds] Attempt to convert data stopped by syntax error in sourcefield

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Attempt to convert data stopped by syntax error in sourcefield
  • Date: Tue, 25 Jul 2006 09:16:38 +0100

Hi Chiang,

I don't think that we have much (if any) experience with Sybase::BCP,
although any faults should be fairly easy to diagnose.

What we would need to help solve the problem is a freetds log dump.
This produces a low level trace of the freetds activity that is going on
under the covers.

to get a log dump, you need to:

a) set the environment variable TDSDUMP to a filename. for example:
setenv TDSDUMP mytdsdump.txt (csh) or:
export TDSDUMP=mytdsdump.txt (ksh) or:
TDSDUMP=mytdsdump.txt; export TDSDUMP (sh)

b) run the process that is causing the problem

c) send us the dump file for us to have a look at.

If you can create a small input file that reproduces the problem, along
with the definition of the table you are trying to bcp into, that would
also help.

Given the error message the most likely cause is a data/column type
mismatch. For example, trying to put non-numeric data into a numeric
column. Another possible cause would be a date format that freetds is
unable to convert to an internal date representation.

Hope this helps,

Bill

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of
chiang.tan AT truenergy.com.au
Sent: 25 July 2006 07:35
To: freetds AT lists.ibiblio.org
Subject: [freetds] Attempt to convert data stopped by syntax error in
sourcefield


Hi,
I'm trying to use Sybase::BCP with freeTDS 0.63 to bcp to MS SQL 2000,
and
it kept on coming back with
"Attempt to convert data stopped by syntax error in source
field"

However, I have no problem using the same script (with Sybase client) to

bcp to Sybase database.

Does anyone know what causes the syntax error when BCP-ing?

Cheers,
Chiang Tan
--
We're excited by gas & electricity.NOTICEThis email and any files
transmitted with it may be confidential and are intended solely for the
use of the individual or entity to whom they are addressed. Any
confidentiality is not waived or lost because this email has been sent
to you by mistake. This email may contain personal information of
individuals, and be subject to Commonwealth and/or State privacy laws in
Australia.This email is also subject to copyright. If you are not the
intended recipient, you must not read, print, store, copy, forward or
use this email for any reason, in accordance with privacy and copyright
laws. If you have received this email in error, please notify the sender
by return email, and delete this email from your inbox.The recipient
should check this email and any attachments for the presence of viruses.
We do not accept liability for any computer virus, data corruption,
delay, interruption, unauthorized access or unauthorised
amendment.TRUenergy Austra
lia Pty Ltd ABN 96 071 611 017

Message protected by MailGuard: e-mail anti-virus, anti-spam and
content filtering.
http://www.mailguard.com.au/mg


_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
--------------------------------------------------------

If you are not an intended recipient of this e-mail, please notify the
sender, delete it and do not read, act upon, print, disclose, copy, retain or
redistribute it. Click here for important additional terms relating to this
e-mail. http://www.ml.com/email_terms/
--------------------------------------------------------




Archive powered by MHonArc 2.6.24.

Top of Page