2012年2月25日星期六

bcp data to a txt file

I am trying to export data to a text file using bcp. The table that I am
trying to export has an ntext column. I keep getting this error, and
have not been able to find a way to get around it. How do I specify to
another provider, or get it around it anyway? Thanks...

C:\Program Files\Microsoft SQL Server>bcp northwind.dbo.categories out
northwind
_categories.txt -n -T -Usa -PPassword-2003
Msg 4004, Level 16, State 1:
Server 'CORPLGROULTI1', Line 1:
Unicode data in a Unicode-only collation or ntext data cannot be sent
to clients using DB-Library (such as ISQL) or ODBC version 3.7 or
earlier.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it![posted and mailed, please reply in news]

tim groulx (timgru@.verizon.net) writes:
> I am trying to export data to a text file using bcp. The table that I am
> trying to export has an ntext column. I keep getting this error, and
> have not been able to find a way to get around it. How do I specify to
> another provider, or get it around it anyway? Thanks...
>
> C:\Program Files\Microsoft SQL Server>bcp northwind.dbo.categories out
> northwind
> _categories.txt -n -T -Usa -PPassword-2003
> Msg 4004, Level 16, State 1:
> Server 'CORPLGROULTI1', Line 1:
> Unicode data in a Unicode-only collation or ntext data cannot be sent
> to clients using DB-Library (such as ISQL) or ODBC version 3.7 or
> earlier.

Apparently you are not using a version of BCP that comes with the version
of SQL Server you are connecting to. Or you are, but for some reason
the ODBC drivers on the machine have been replaced by older ones.

The most likely reason, though, is that you are running BCP from a
machine that has the 6.5 tools installed, or you are using BCP from a
Sybase installation.

Use bcp -v to find out what you are using.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

没有评论:

发表评论