I think as soon as your dealing with image fields you unfortunately can't
use the update feature of the DataSet as it uses all original values in the
WHERE part of the SQL clause to locate the original record. 

Plus you tend to loose the favoured stored procedure that inserts the record
and returns the identity. (I've read the archives on this very argument
quiet enlightening)

I believe Bob Beauchemin touches on the different ways to implement
optimistic record locking in his non fictional writings.

Robert.


-----Original Message-----
From: Christoph [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 6 June 2002 2:57
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Save a Image to SQL


Sérgio,

Take a look at this article on MSDN:

HOW TO: Read and Write a File to and from a BLOB Column by Using Chunking in
ADO.NET and Visual Basic .NET (Q317034)

Save your Bitmap to a MemoryStream and insert the chunks from the
MemoryStream to the database instead of the FileStream in the example.

HTH,
Christoph Schittko
Software Architect
Mshow - a division of InterCall

----- Original Message -----
From: "Sérgio Rodelo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 05, 2002 11:12 AM
Subject: [DOTNET] Save a Image to SQL


I have the following code:
Dim timg As System.Drawing.Image = New System.Drawing.Bitmap(imgStream)

Dim tunm As System.Drawing.Image = timg.GetThumbnailImage(100, 100,
Nothing, Nothing)

Now I want to save the "tunm" in a table of SQL in a field of type I,
how can Image do this ?





You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.


**********************************************************************"
This correspondence is for the named person's use only. It may
contain confidential or legally privileged information or both. "
No confidentiality or privilege is waived or lost by any "
mistransmission.  If you receive this correspondence in error, please
immediately delete it from your system and notify the sender.  You 
must not disclose, copy or rely on any part of this correspondence 
if you are not the intended recipient. 

Any views expressed in this message are those of the individual sender,
except where the sender expressly, and with authority, states them to
be the views of Vodafone.

This email has been checked for viruses.
**********************************************************************************************

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to