Forum Moderators: open

Message Too Old, No Replies

text insertion into sql server.

text insertion into sql server.

         

shahchirag1

9:28 pm on Jan 13, 2004 (gmt 0)

10+ Year Member



I m searching for a way to insert a very big text (say 128k) in my sql server. I could find some answers on this forum but not perfect.

If someone can help me for the stored procedure and ado code in Vb, I would really appreciate.

Dreamquick

9:55 pm on Jan 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ain't text columns just the most fun! :) I've gotten around this a few ways in the past, admittedly not with that amount of text.

1) Just write the whole content into the field as you would normally via UPDATE or INSERT - I've tried this with smaller amounts of data but never with larger amounts.

2) Write your records into a text file and use BULK INSERT to load data from the text file into the table, just remember to use something other than linebreak as the end of record marker if you need to write multi-line data...

The last time I used this I think I delimited with tab and used the vertical bar as the end of record marker - I was working with similar amounts of data (if not larger) at the time so I can guarantee this will work, although it's a little sloppy for anything other than an initial data-load.

- Tony

shahchirag1

10:47 pm on Jan 13, 2004 (gmt 0)

10+ Year Member



I have already checked with insert and update. It's not gonna work. I need to use, appendchunk, getchunk kind of commands. But I don't have any code snippet to look at. Hence, still in trouble.

Dreamquick

11:51 pm on Jan 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I looked at those too ... that's why I weaseled out and used bulk insert... Best of luck!

- Tony