Skip to Content.
Sympa Menu

freetds - [freetds] Freebcp and column names with spaces

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Paul Rensing <paulrensing AT verizon.net>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Freebcp and column names with spaces
  • Date: Thu, 13 Jan 2005 14:59:28 -0500

FreeTDS people,

FreeTDS has been working very well for me. I am talking to a MS
SQLServer (version 2003, I think) with the Python drivers, and it works
well.

However, now I am trying to use freebcp to improve the throughput to
build a big table (SQL INSERT statements are just too slow). I started
testing it and immediately found a problem.

Many of my column names contain embedded spaces (please do tell me not
to do that; there is a reason). The internals of freebcp do not quote
the column names. The routine _bcp_build_bulk_insert_stmt in dblib/bcp.c
simply copies in the column name without examining it.

I did try turning the TDS version down to 4.2, and the freebcp run
succeeded, but then my normal code does not run, plus it appears that
some of the fields were mangled during the insert.

Is this a bug? Can you just add quotes around the column name? Or, am I
missing something?

Thanks very much for the help.

Paul Rensing
paulrensing AT verizon.net

--
Paul Rensing <paulrensing AT verizon.net>




Archive powered by MHonArc 2.6.24.

Top of Page