Skip to Content.
Sympa Menu

freetds - [freetds] bcp problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Panos Stavroulis <pstavroulis AT yahoo.co.uk>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] bcp problem
  • Date: Thu, 18 Nov 2010 09:41:18 +0000 (GMT)

Hi,

Thank you for your help, I’ve managed to complile a rather large system under
freetds with no major problems, didn’t take more than 2-3 days. I have hit
a small snag now with the bcp command. I get the following :

00000008 2010/11/17 14:00:03.075 TEMP 16139 SERI
DATABASE ERROR:: Attempt to initiate a new Adaptive Ser
ver operation with results pending
00000009 2010/11/17 14:00:03.075 TEMP 16139 SERI
DATABASE ERROR:: Error 0
00000010 2010/11/17 14:00:03.080 TEMP 16139 SERI
DATABASE ERROR:: Requested data conversion does not exi
st
00000011 2010/11/17 14:00:03.080 TEMP 16139 SERI
DATABASE ERROR:: Error 0
Assertion failed: converted_data_size > 0, file bcp.c, line 3485
00000012 2010/11/17 14:00:03.088 C -6 SERI SERVER
Found system error (6)

I can see that when I enter the command it does the following sequence of SQL
events. The failure is at the SET FMTONLY ON select * from #format_val SET
FMTONLY OFF. Then the delete user_logn command is because of the error with
the bcp command I think. Basically when I debug as soon as it executes
"select * from #format_val" then it fails.

Also the insert bulk is a command I’ve never seen before but reading from
the freetds archive is a normal operation. Is anyone aware what’s wrong? I’ve
tried to clear the channel before the bcp command is issued but maybe the
select * from #format_val where 1=2 is what causing the problem?

That's the sql from profiler:
select * from #format_val where 1=2
go
SET FMTONLY ON select * from #format_val SET FMTONLY OFF
go
begin transaction
go
delete user_login where login_no = 1356415
go
commit transaction
go
SELECT output_wil, action, text_wil FROM glsperf_tst1_c..message WHERE
database_type = 'C' AND message_no = 1
go
insert bulk #format_val (format_val_code char(4), descr varchar(30),
uniqueness char(1), mandatory char(1), max_length int, min_length int,
digit_allowed char(1), upper_allowed char(1), lower_allowed char(1),
space_allowed char(1), punct_allowed char(1))
go


Thanks very much.

Panos.









Archive powered by MHonArc 2.6.24.

Top of Page