[freetds] Attempt to convert data stopped by syntax error in sourcefield
Thompson, Bill D (London)
bill_d_thompson at ml.com
Tue Jul 25 04:16:38 EDT 2006
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
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,
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
I'm trying to use Sybase::BCP with freeTDS 0.63 to bcp to MS SQL 2000,
it kept on coming back with
"Attempt to convert data stopped by syntax error in source
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?
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
lia Pty Ltd ABN 96 071 611 017
Message protected by MailGuard: e-mail anti-virus, anti-spam and
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
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/
More information about the FreeTDS