Advanced VB.Net

Moderators: None (Apply to moderate this forum)
Number of threads: 260
Number of posts: 394

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
SQL Bulk Insert - CSV Problem Posted by AxelT on 4 Jul 2008 at 3:35 AM
I write a comma delimited text file composed from info from another text file. When I try to import this file into SQLEXPRESS/SQL 2005 using 'BULK INSERT' it appears that the first field of the first row is prefixed with 3 characters (ASCII 139,175, 168). This stops the first row from being imported and generates an error message. The extra characters do not show using WordPad, Excel, 'Debug <filename>' or 'Peek'. I actually found them when opening the file with OpenOffice Calc! When I remove the 3 characters in Calc and save, the file will import with BULK INSERT without any problems. How can I get rid of these characters?
Thread Tree
AxelT SQL Bulk Insert - CSV Problem on 4 Jul 2008 at 3:35 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.