Welcome to Dream.In.Code
Getting Help is Easy!

Join 105,407 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,767 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



BCP - Basic sample.. not working

 
Reply to this topicStart new topic

BCP - Basic sample.. not working, No errors, but 0 records copied....?

Nolan
post 20 Jun, 2008 - 03:20 PM
Post #1


New D.I.C Head

*
Joined: 12 Sep, 2007
Posts: 30


My Contributions


I have to figure out how to transfer a bunch of Access tables out to SQL Express. The first attempt will be to use BCP.
I tried with one of the smaller tables first.
Export to textfile --> CSV
Use BCP to import to pre-built SQL table with same schema.
No worky...

SO,
I created a simple text file with 2 rows, comma separated (4 'fields')
ie;

Bob, Smith, 33, Large
Bill, Jones, 44, Small

I have a table in SQL with 4 fields, all varchar(50)

The bcp command I am using appears to connect to sql no problem, but when all is said and done I get this:
0 rows copied.
Network packet size <bytes> 4096

Here is my cmd line code:
CODE
bcp [ImportTest].[dbo].[tbl_Import] in C:\ExpTest\test.txt -T -S n_laptop\sqlexpress


I have tried all 4 switches (-w,-c,-n,-N) as well as no switches at all

NOTHING WORKS!
Kinda grumpy... any ideas?
Thanks.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/20/08 05:18AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month