<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Accessing MySQL BLOB columns using Visual Basic 6</title>
	<atom:link href="http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vbmysql.com</link>
	<description>The Site for VB and MySQL</description>
	<lastBuildDate>Thu, 11 Mar 2010 19:37:25 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: marexblue</title>
		<link>http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/comment-page-1#comment-36065</link>
		<dc:creator>marexblue</dc:creator>
		<pubDate>Thu, 15 Oct 2009 05:43:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/#comment-36065</guid>
		<description>i forgot this one, declaration of variables...

Dim DataFile As Integer, Fl As Long, Chunks As Integer
Dim Fragment As Integer, Chunk() As Byte, i As Integer, Filename As String

Private Const ChunkSize As Integer = 16384
Private Const conChunkSize = 100</description>
		<content:encoded><![CDATA[<p>i forgot this one, declaration of variables&#8230;</p>
<p>Dim DataFile As Integer, Fl As Long, Chunks As Integer<br />
Dim Fragment As Integer, Chunk() As Byte, i As Integer, Filename As String</p>
<p>Private Const ChunkSize As Integer = 16384<br />
Private Const conChunkSize = 100</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marexblue</title>
		<link>http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/comment-page-1#comment-36064</link>
		<dc:creator>marexblue</dc:creator>
		<pubDate>Thu, 15 Oct 2009 05:40:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/#comment-36064</guid>
		<description>@jimnast

glad i came back here, well about your concern, there is always a solution for that. you must have a source code that will read the blob field and will convert the actual datafile to temporary file which can be loaded automatically using this command: 
               If ShowPic(rsFill!photo, Image1) = False Then 
                      Set Image1.Picture = LoadPicture(App.Path &amp; &quot;\pics\temp.jpg&quot;)
               End If

if the function ShowPic returns true it means that the picture from the blob field (photo) was already loaded to Image1, which is either an image or picturebox control. And if it returns false then load a picture from directory as temporary.

Well, try to look for this source as i&#039;m using this in my SQL server DB. Consider this one if it may help you.

Public Function ShowPic(ByRef fieldname As Field, ByRef cImage As Object) As Boolean
    On Error GoTo Out
    ShowPic = False
    DataFile = 1
    Open &quot;pictemp&quot; For Binary Access Write As DataFile
    Fl = fieldname.ActualSize &#039; Length of data in file
    If Fl = 0 Then Close DataFile: Exit Function
    Chunks = Fl \ ChunkSize
    Fragment = Fl Mod ChunkSize
    ReDim Chunk(Fragment)
    Chunk() = fieldname.GetChunk(Fragment)
    Put DataFile, , Chunk()
    For i = 1 To Chunks
        ReDim Buffer(ChunkSize)
        Chunk() = fieldname.GetChunk(ChunkSize)
        Put DataFile, , Chunk()
    Next i
    Close DataFile
    Filename = &quot;pictemp&quot;
    &#039;ShowPic = LoadPicture(FileName)
    cImage.Picture = LoadPicture(Filename)
    ShowPic = True
    Exit Function

Out:
    ShowPic = False
End Function</description>
		<content:encoded><![CDATA[<p>@jimnast</p>
<p>glad i came back here, well about your concern, there is always a solution for that. you must have a source code that will read the blob field and will convert the actual datafile to temporary file which can be loaded automatically using this command:<br />
               If ShowPic(rsFill!photo, Image1) = False Then<br />
                      Set Image1.Picture = LoadPicture(App.Path &amp; &#8220;\pics\temp.jpg&#8221;)<br />
               End If</p>
<p>if the function ShowPic returns true it means that the picture from the blob field (photo) was already loaded to Image1, which is either an image or picturebox control. And if it returns false then load a picture from directory as temporary.</p>
<p>Well, try to look for this source as i&#8217;m using this in my SQL server DB. Consider this one if it may help you.</p>
<p>Public Function ShowPic(ByRef fieldname As Field, ByRef cImage As Object) As Boolean<br />
    On Error GoTo Out<br />
    ShowPic = False<br />
    DataFile = 1<br />
    Open &#8220;pictemp&#8221; For Binary Access Write As DataFile<br />
    Fl = fieldname.ActualSize &#8216; Length of data in file<br />
    If Fl = 0 Then Close DataFile: Exit Function<br />
    Chunks = Fl \ ChunkSize<br />
    Fragment = Fl Mod ChunkSize<br />
    ReDim Chunk(Fragment)<br />
    Chunk() = fieldname.GetChunk(Fragment)<br />
    Put DataFile, , Chunk()<br />
    For i = 1 To Chunks<br />
        ReDim Buffer(ChunkSize)<br />
        Chunk() = fieldname.GetChunk(ChunkSize)<br />
        Put DataFile, , Chunk()<br />
    Next i<br />
    Close DataFile<br />
    Filename = &#8220;pictemp&#8221;<br />
    &#8216;ShowPic = LoadPicture(FileName)<br />
    cImage.Picture = LoadPicture(Filename)<br />
    ShowPic = True<br />
    Exit Function</p>
<p>Out:<br />
    ShowPic = False<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zheirk</title>
		<link>http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/comment-page-1#comment-32511</link>
		<dc:creator>zheirk</dc:creator>
		<pubDate>Wed, 02 Sep 2009 03:59:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/#comment-32511</guid>
		<description>&quot;Hello evryone. Is anybody know how to view/retrieve image from MySQL (blob) into picture box in visual basic 6? Because the idea given here is only to save to c:\filename.gif. I want it directly to picture box without saving/retrieving it to c:\ directory. Just to view it only to picture box..

Any solution is very much appreciated.
Thanks in advance…

More powers to everybody.&quot;
-------------------------------------------------
Loading Picture to a Picture Box

Picture1.Picture = LoadPicture (FileName)</description>
		<content:encoded><![CDATA[<p>&#8220;Hello evryone. Is anybody know how to view/retrieve image from MySQL (blob) into picture box in visual basic 6? Because the idea given here is only to save to c:\filename.gif. I want it directly to picture box without saving/retrieving it to c:\ directory. Just to view it only to picture box..</p>
<p>Any solution is very much appreciated.<br />
Thanks in advance…</p>
<p>More powers to everybody.&#8221;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Loading Picture to a Picture Box</p>
<p>Picture1.Picture = LoadPicture (FileName)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phelix</title>
		<link>http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/comment-page-1#comment-32468</link>
		<dc:creator>Phelix</dc:creator>
		<pubDate>Tue, 01 Sep 2009 11:34:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/#comment-32468</guid>
		<description>this site is very important and helpful to developers, I would like to participate fully. thank you keep it up.</description>
		<content:encoded><![CDATA[<p>this site is very important and helpful to developers, I would like to participate fully. thank you keep it up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jimnast</title>
		<link>http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/comment-page-1#comment-30240</link>
		<dc:creator>jimnast</dc:creator>
		<pubDate>Wed, 29 Jul 2009 04:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/#comment-30240</guid>
		<description>Hello evryone. Is anybody know how to view/retrieve image from MySQL (blob) into picture box in visual basic 6? Because the idea given here is only to save to c:\filename.gif. I want it directly to picture box without saving/retrieving it to c:\ directory. Just to view it only to picture box..

Any solution is very much appreciated. 
Thanks in advance...

More powers to everybody.</description>
		<content:encoded><![CDATA[<p>Hello evryone. Is anybody know how to view/retrieve image from MySQL (blob) into picture box in visual basic 6? Because the idea given here is only to save to c:\filename.gif. I want it directly to picture box without saving/retrieving it to c:\ directory. Just to view it only to picture box..</p>
<p>Any solution is very much appreciated.<br />
Thanks in advance&#8230;</p>
<p>More powers to everybody.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony</title>
		<link>http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/comment-page-1#comment-27859</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Wed, 03 Jun 2009 03:26:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/#comment-27859</guid>
		<description>hi to all! i&#039;ve tried all the steps shown on how to save images to mysql from vb6 but i get an error,an error which says that the column in my table which is of blob type cannot be null. i&#039;ve already read the image using mystream.read but still nothing. any1 can help me? tnx!</description>
		<content:encoded><![CDATA[<p>hi to all! i&#8217;ve tried all the steps shown on how to save images to mysql from vb6 but i get an error,an error which says that the column in my table which is of blob type cannot be null. i&#8217;ve already read the image using mystream.read but still nothing. any1 can help me? tnx!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: camilord</title>
		<link>http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/comment-page-1#comment-26933</link>
		<dc:creator>camilord</dc:creator>
		<pubDate>Tue, 12 May 2009 03:47:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/#comment-26933</guid>
		<description>is it possible to update images in the database with using a SELECT query? INSERT or UPDATE may do.</description>
		<content:encoded><![CDATA[<p>is it possible to update images in the database with using a SELECT query? INSERT or UPDATE may do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cassio</title>
		<link>http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/comment-page-1#comment-23426</link>
		<dc:creator>Cassio</dc:creator>
		<pubDate>Fri, 06 Feb 2009 14:17:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/#comment-23426</guid>
		<description>In vb you can use the LoadPicture method, manage to put the path of the file in the tag property of your picturebox.

I still couldn&#039;t find a way to update an existing blob (except for deleting the record to insert again), does someone have any news?</description>
		<content:encoded><![CDATA[<p>In vb you can use the LoadPicture method, manage to put the path of the file in the tag property of your picturebox.</p>
<p>I still couldn&#8217;t find a way to update an existing blob (except for deleting the record to insert again), does someone have any news?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aarl</title>
		<link>http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/comment-page-1#comment-23341</link>
		<dc:creator>aarl</dc:creator>
		<pubDate>Tue, 03 Feb 2009 21:15:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/#comment-23341</guid>
		<description>Know how to do the same but using a picturebox instead of a file (the image is first loaded into a picturebox) and a stored procedure to save the image into a table column?</description>
		<content:encoded><![CDATA[<p>Know how to do the same but using a picturebox instead of a file (the image is first loaded into a picturebox) and a stored procedure to save the image into a table column?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nimesh</title>
		<link>http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/comment-page-1#comment-22749</link>
		<dc:creator>Nimesh</dc:creator>
		<pubDate>Fri, 26 Dec 2008 08:59:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vb6-mysql/accessing-mysql-blob-columns-using-visual-basic-6/#comment-22749</guid>
		<description>how to create database and table on mysql</description>
		<content:encoded><![CDATA[<p>how to create database and table on mysql</p>
]]></content:encoded>
	</item>
</channel>
</rss>
