By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,939 Members | 1,559 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,939 IT Pros & Developers. It's quick & easy.

blob into sql database

P: n/a
How to insert a blob arraylist into database?

I know it's not good, but my customers want that, so if someone has some
simple example of how to do it...

Hrcko
Nov 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
http://msdn.microsoft.com/library/de...accessdata.asp

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Hrvoje Voda" <hr*********@luatech.com> wrote in message
news:d8**********@ss405.t-com.hr...
How to insert a blob arraylist into database?

I know it's not good, but my customers want that, so if someone has some
simple example of how to do it...

Hrcko

Nov 17 '05 #2

P: n/a
With sql 2005 this is not such a bad thing to do any longer. They also have
varbinary(max) where you can just pass a byte[] or SqlBinary(I think) to a
stored proc using the sqlclient. For large byte[] (i.e. MBs or GBs) you
can't just load them in memory to pass, so you need to chunk it up.
Chunking down is on msdn and is ~easy, but a chunking upload to the db is a
bit more work. I have an up/down sample I did using varbinary(max) and new
..Write with Update TSQL/SP few weeks ago. I will try to get it up on my
blog. Any interest?

--
William Stacey [MVP]

"Hrvoje Voda" <hr*********@luatech.com> wrote in message
news:d8**********@ss405.t-com.hr...
How to insert a blob arraylist into database?

I know it's not good, but my customers want that, so if someone has some
simple example of how to do it...

Hrcko

Nov 17 '05 #3

P: n/a
I managed to work up a sample at:
http://spaces.msn.com/members/staceyw/Blog/cns!1pnsZpX0fPvDxLKC6rAAhLsQ!404.entry
Note this is for SQL2005 using the new varbinary(max) datatype to store the
file in the DB column.
One thing missing in SQL2005 is a way to stream-UP byte[]s like you can
stream-down using sequential access. So we still need to chunk the data on
uploads of large files/byte[]s. hth

--
William Stacey [MVP]

"William Stacey [MVP]" <st***********@mvps.org> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
With sql 2005 this is not such a bad thing to do any longer. They also
have varbinary(max) where you can just pass a byte[] or SqlBinary(I think)
to a stored proc using the sqlclient. For large byte[] (i.e. MBs or GBs)
you can't just load them in memory to pass, so you need to chunk it up.
Chunking down is on msdn and is ~easy, but a chunking upload to the db is
a bit more work. I have an up/down sample I did using varbinary(max) and
new .Write with Update TSQL/SP few weeks ago. I will try to get it up on
my blog. Any interest?

--
William Stacey [MVP]

"Hrvoje Voda" <hr*********@luatech.com> wrote in message
news:d8**********@ss405.t-com.hr...
How to insert a blob arraylist into database?

I know it's not good, but my customers want that, so if someone has some
simple example of how to do it...

Hrcko


Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.