Skip to Content.
Sympa Menu

freetds - Re: [freetds] bcp problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: TDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] bcp problem
  • Date: Thu, 18 Nov 2010 20:54:38 -0500

Panos Stavroulis wrote:
> I have hit a small snag now with the bcp command.
....
> Attempt to initiate a new Adaptive Server operation with results pending

Is this using freebcp, or another application?

If freebcp, please post a TDSDUMP log, because it's a bug. If your own
application, the message means exactly what it says: a command was sent
to the server before previous results were exhausted.

> Also the insert bulk is a command I've never seen before but reading
> from the freetds archive is a normal operation.

True. You can read more about it in Microsoft's TDS description,
[MS-TDS].pdf:

"2.2.1.4 SQL Command with Binary Data The Bulk Insert operation is a
case of a SQL command that consists of an UNICODE string followed by
binary data. The client sends the Bulk Insert request, and then a
COLMETADATA token, that describes the raw data, is sent. Multiple rows of
binary data are then sent to the server. The data is not formatted in
storage row format but the format described by the COLMETADATA token. The
stream is the same as if the data was being selected from the server
rather than being sent to the server. See section 2.2.6.1 for additional
details."

(You'll have to look for it on microsoft.com. We don't publish it on
freetds.org because Page says it's not freely redistributable:

"... you may make copies of it in order to develop implementations of
the
protocols, and may distribute portions of it in your implementations of
the protocols or your documentation as necessary to properly document the
implementation."

HTH.

--jkl

P.S. In future, it's best not start new topics as replies to old ones.
It confuses people who use thread email clients, and might cause your
message to be missed by someone who could answer you. :-)



  • Re: [freetds] bcp problem, James K. Lowden, 11/18/2010

Archive powered by MHonArc 2.6.24.

Top of Page