473,625 Members | 3,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1839
http://msdn.microsoft.com/library/de...accessdata.asp

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Hrvoje Voda" <hr*********@lu atech.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*********@lu atech.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!1pnsZpX0fPv DxLKC6rAAhLsQ!4 04.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******** ********@TK2MSF TNGP12.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*********@lu atech.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
7084
by: John | last post by:
I have over 5000 thumbnail pictures of size 5kb each. I would like to able to load all 5000 pictures and view 50 per page using mysql_data_seek(). I would like to know what are the advantages and disadvantages of using a MySQL blob field rather than reading the images directly from the file? How does one insert an image into a blob field? Can it be done dynamically? Thank you John
3
3135
by: NotGiven | last post by:
I am researching the best place to put pictures. I have heard form both sides and I'd like to know why one is better than the other. Many thanks!
6
5680
by: Juergen Gerner | last post by:
Hello Python fans, I'm trying and searching for many days for an acceptable solution... without success. I want to store files in a database using BLOB fields. The database table has an ID field (INT, auto_increment), an ORDER field (INT, for knowing the right order) and a "normal" BLOB field. It is planned to split large files in 64k-parts and sort these parts by the ORDER field. Here's some pseudo code how I wanted to implement this...
3
4714
by: hamvil79 | last post by:
I'm implementig a java web application using MySQL as database. The main function of the application is basically to redistribuite documents. Those documents (PDF, DOC with an average size around 2Mb) are stored in BLOB column. The amount of documents for the first year should not exceed 5/6 Giga, but I cannot make prevision for the next years. Those documents are mainly just accessed (update and delete are not so
55
24727
ADezii
by: ADezii | last post by:
Of all the questions asked here at TheScripts, the one which appears with the most frequency relates to the storing of Graphic Images within Access. There are basically three techniques available to manipulate Image Files in Access and they are: Store the Image in an OLE Object Field and display it in a Bound Object Frame. The Image can either be Linked or Embedded. Store the Path to the Image in a Text Field and use an Image Control...
0
8192
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8696
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8358
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7188
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4195
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1504
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.