If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > Exporting data from SQL Server to another using BCP (character conversion problems)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-15-11, 04:44
roto roto is offline
Registered User
 
Join Date: Feb 2011
Posts: 2
Exporting data from SQL Server to another using BCP (character conversion problems)

Hi! We have software products which use SQL Express 2008 R1 (MSDE in previous versions) to store the application data (in local PC). User has possibility (in application) to export the data and then import the exported file in another PC.

Currently the data is exported in a way that the database files are just copied and zipped. That works basically fine in our case, but the problem is that SQL Express R1 databases aren't compatible with MSDE, so the import/export can be only done between computers which have same SQL Server version (or target computer has newer version).

One logical solution would be to use BCP to export/import the data. The problem in this case are the character conversion. I haven't been able to figure out how could we use BCP in way that the character information would always be retained during export/import. Application doesn't restrict in any way what characters are stored in database and our application is used all around the world.

Our application is developed using .NET and ADO. Is there any way we could use BCP to handle the export/import process?
Reply With Quote
  #2 (permalink)  
Old 02-15-11, 10:13
Gagnon Gagnon is offline
Registered User
 
Join Date: Jun 2005
Posts: 319
are you using nvarchar? use either -N or -w with bcp
Reply With Quote
  #3 (permalink)  
Old 02-16-11, 08:51
roto roto is offline
Registered User
 
Join Date: Feb 2011
Posts: 2
We're using nvarchar. I need to try out those flags. Thanks.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On