<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6744092714423800129</id><updated>2011-04-21T14:45:14.158-07:00</updated><title type='text'>MySQL sending data</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mysqlsendingdata.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6744092714423800129/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mysqlsendingdata.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>vbnetcode</name><uri>http://www.blogger.com/profile/04926504053784281645</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6744092714423800129.post-8346438661622159779</id><published>2009-02-04T02:52:00.001-08:00</published><updated>2009-02-04T02:52:44.279-08:00</updated><title type='text'></title><content type='html'>MySQL and BLOBs - Sending Data Into the BLOB Column&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's start by loading an image into the database. In addition to our connection object, we will need a RecordSet object and a Stream object. Let's begin by declaring these two objects.&lt;br /&gt;&lt;br /&gt;Dim rs As ADODB.Recordset&lt;br /&gt;Set rs = New ADODB.Recordset&lt;br /&gt;Dim mystream As ADODB.Stream&lt;br /&gt;Set mystream = New ADODB.Stream&lt;br /&gt;mystream.Type = adTypeBinary&lt;br /&gt;&lt;br /&gt;An ADO Stream object can handle both text and binary data (and can therefore be used to get large text fields as well as BLOB fields). We have to specify which type of data we will be dealing with using the adTypeBinary value in the Type parameter.&lt;br /&gt;&lt;br /&gt;The first thing we need to do is open a blank recordset and add a new record to it.&lt;br /&gt;&lt;br /&gt;rs.Open "SELECT * FROM files WHERE 1=0", conn, adOpenStatic, adLockOptimistic &lt;br /&gt;rs.AddNew&lt;br /&gt;&lt;br /&gt;We now have an empty recordset (thanks to the WHERE clause) to work with, to which we have added a new row. Next we load a file to add to this recordset using the stream object.&lt;br /&gt;&lt;br /&gt;mystream.Open&lt;br /&gt;mystream.LoadFromFile "c:myimage.gif" &lt;br /&gt;&lt;br /&gt;Once we have a file loaded into the stream, we can populate the recordset and update it back to MySQL:&lt;br /&gt;&lt;br /&gt;rs!file_name = "myimage.gif"&lt;br /&gt;rs!file_size = mystream.size&lt;br /&gt;rs!file = mystream.read&lt;br /&gt;rs.Update&lt;br /&gt;mystream.Close&lt;br /&gt;rs.Close&lt;br /&gt;conn.Close&lt;br /&gt;&lt;br /&gt;We have assigned the details of the file into the recordset, then proceeded to "read" the data out of the stream and into the file field of the recordset. Running a select statement on your MySQL server should show the row to now be present in your database. It is important to note that data will only pass to the server during the update statement of the recordset object; the stream object methods do not cause data transfers to and from the server.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;source :http://www.devarticles.com&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://membuat-halmannext.blogspot.com"&gt;Trik Membuat-halman next&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://membuat-security-code.blogspot.com"&gt;Trik membuat-security-code&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://mengecek-karakter.blogspot.com"&gt;Trik mengecek-karakter&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://merubah-pswdroot.blogspot.com"&gt;Trik merubah-pswd root&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://noise-dimouse.blogspot.com"&gt;Trik Noise-dimouse&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://penerapanbug.blogspot.com"&gt;Trik penerapan BUG&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://penggabungan-2web.blogspot.com"&gt;Trik penggabungan-2web&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://perkenalan-dengan-php.blogspot.com"&gt;Trik perkenalan-dengan-php&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://php-login-script.blogspot.com"&gt;Trik PHP-Login-script&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=woodworkin09c-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=B000FI73MA&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt; &lt;iframe src="http://rcm.amazon.com/e/cm?t=woodworkin09c-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=B000P9ZBFA&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6744092714423800129-8346438661622159779?l=mysqlsendingdata.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mysqlsendingdata.blogspot.com/feeds/8346438661622159779/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://mysqlsendingdata.blogspot.com/2009/02/mysql-and-blobs-sending-data-into-blob.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6744092714423800129/posts/default/8346438661622159779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6744092714423800129/posts/default/8346438661622159779'/><link rel='alternate' type='text/html' href='http://mysqlsendingdata.blogspot.com/2009/02/mysql-and-blobs-sending-data-into-blob.html' title=''/><author><name>vbnetcode</name><uri>http://www.blogger.com/profile/04926504053784281645</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
