question

jaedah avatar image
jaedah asked

moving data values from text file to database

hi! from my text file, i would like to move its contents which are number values to my database table. i've been reading about SqlBulkCopy or streamreader but i do not know how to start. pls help with step by step procedure. thank u very much! ^__^

sql-server-2008bulk-insert
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

RickD avatar image
RickD answered
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jaedah avatar image
jaedah answered

thanks. but im still confused. sorry im new at this. will i run the codes on SQL management studio only?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Squirrel 1 avatar image
Squirrel 1 answered

BCP is a command line utility. You can run it from the command prompt.

BULK INSERT is a T-SQL command. You have to run it in a query window in the Management Studio

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jaedah avatar image
jaedah answered

how about SqlBulkCopy? isn't that used with C#? how?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.