472,127 Members | 1,839 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

blob into sql database

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
3 1759
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
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
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.

Similar topics

7 posts views Thread by John | last post: by
6 posts views Thread by Juergen Gerner | last post: by
3 posts views Thread by hamvil79 | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.