I have a problem with bcp and format files.
We changed our databases from varchar to nvarchar to support unicode. No
problems so fare with that. It is working fine.
But now I need a format file for the customer table and and it is not
working. It is working fine with the old DB with varchar, but with
nvarchar I'm not able to copy the data. The biggest problem is, that I
got no error message. BCP starts copying to table and finished without
error message.
This is my table:
CREATE TABLE [dbo].[Customer] (
[ID] [int] NOT NULL ,
[CreationTime] [datetime] NULL ,
[ModificationTim e] [datetime] NULL ,
[DiscoveryTime] [datetime] NULL ,
[Name_] [nvarchar] (255) COLLATE SQL_Latin1_Gene ral_CP1_CI_AI NULL ,
[Class] [int] NULL ,
[Subclass] [int] NULL ,
[Capabilities] [int] NULL ,
[SnapshotID] [int] NOT NULL ,
[CompanyName] [nvarchar] (255) COLLATE SQL_Latin1_Gene ral_CP1_CI_AI NOT
NULL ,
[TargetRCCountry] [nvarchar] (255) COLLATE SQL_Latin1_Gene ral_CP1_CI_AI
NOT NULL ,
[LocationID] [int] NULL ,
[MirrorID] [binary] (16) NULL ,
[DeleteFlag] [bit] NULL ,
[AdminStatus] [bit] NULL
) ON [PRIMARY]
GO
and this is the format file:
8.0
13
1 SQLINT 1 12 "#~@~#" 1 ID ""
2 SQLDATETIME 1 24 "#~@~#" 2 CreationTime ""
3 SQLDATETIME 1 24 "#~@~#" 3 ModificationTim e ""
4 SQLDATETIME 1 24 "#~@~#" 4 DiscoveryTime ""
5 SQLNCHAR 2 510 "#~@~#" 5 Name_
SQL_Latin1_Gene ral_CP1_CI_AS
6 SQLINT 1 12 "#~@~#" 6 Class ""
7 SQLINT 1 12 "#~@~#" 7 Subclass ""
8 SQLINT 1 12 "#~@~#" 8 Capabilities ""
9 SQLINT 1 12 "#~@~#" 9 SnapshotID ""
10 SQLNCHAR 2 510 "#~@~#" 10 CompanyName
SQL_Latin1_Gene ral_CP1_CI_AS
11 SQLNCHAR 2 510 "#~@~#" 11 TargetRCCountry
SQL_Latin1_Gene ral_CP1_CI_AS
12 SQLINT 1 12 "#~@~#" 12 LocationID ""
13 SQLBINARY 1 33 "#~@~# \r \r \n"13 MirrorID ""
"#~@~#" is the field terminator. We have a lot of text files with all
kind of charachers in it. So we think this is a set that will never
occur in our files.
Thanks for your help! 0 3073 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Svennglenn |
last post by:
I'm working on a program that is supposed to save
different information to text files.
Because the program is in swedish i have to use
unicode text for ÅÄÖ letters.
When I run the following testscript I get an error message.
# -*- coding: cp1252 -*-
|
by: Bernd Lambertz |
last post by:
I have a problem with bcp and format files.
We changed our databases from varchar to nvarchar to support unicode. No
problems so fare with that. It is working fine.
But now I need a format file for the customer table and and it is not
working. It is working fine with the old DB with varchar, but with
nvarchar I'm not able to copy the data. The biggest problem is, that I
got no error message. BCP starts copying to table and finished...
|
by: Dale Gerdemann |
last post by:
I'm having trouble with Unicode encoding in DOM. As a simple example,
I read in a UTF-8 encoded xml file such as:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<aText>letter 'a' with umlaut: ä</aText>
And when I serialize it, it comes out encoded as ISO-8895-1. But I
don't think the problem is with serialization. In processing my XML
files, I'm matching bits and pieces of text and attributes with some
|
by: Daman |
last post by:
Hi,
I am currently facing difficulty displaying chinese, japanese, russian
etc. characters. I am using VB 6 and ADO to query the DB2 Version 7.2
unicode database (UTF-8). The resultset that comes back contains
garbage characters for Chinese, Russian etc languages. The english
characters come back fine using ADO.
It seems that DB2 assumes that my application is NOT Unicode
compliant.
|
by: Jamie |
last post by:
I have a file that was written using Java and the file has unicode
strings. What is the best way to deal with these in C? The file
definition reads:
Data Field Description
CHAR File identifier (64 bytes corresponding to Unicode character
string padded with '0' Unicode characters.
CHAR File format version (32 bytes corresponding to Unicode
character string "x.y.z" where x, y, z are integers
corresponding to major, minor and...
| |
by: N |
last post by:
Hi,
I'm writing a small web service (using C#) which is going to receive a text
file, add a line to it and send it back.
Input is a string with each line ending with "\r\n".
The problem is in the format of the output - looks like all ends of lines
are missing, even if web service just receives and sends back the same
string.
Could it be some encoding issue?
|
by: abhi147 |
last post by:
Hi ,
I want to convert an array of bytes like :
{79,104,-37,-66,24,123,30,-26,-99,-8,80,-38,19,14,-127,-3}
into Unicode character with ISO-8859-1 standard.
Can anyone help me .. how should I go about doing it ?
Thanks
|
by: laxmikiran.bachu |
last post by:
Can we have change a unicode string Type object to a Tuple type
object.. If so how ????
|
by: Mudcat |
last post by:
In short what I'm trying to do is read a document using an xml parser
and then upload that data back into a database. I've got the code more
or less completed using xml.etree.ElementTree for the parser and dbi/
odbc for my db connection.
To fix problems with unicode I built a work-around by mapping unicode
characters to equivalent ascii characters and then encoding everything
to ascii. That allowed me to build the application and debug...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |