<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Dateien in Blobfeld]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich muss eine Datei (von *.exe bis *.txt ist alles dabei) in eine BLOB-Spalte einer MySQL-Datenbank schreiben.</p>
<p>So hab ich das schon versucht, scheiter aber dann aber irgendwann (nicht reproduzierbar) an einen ungültigen Statemant im SQL-Syntax.</p>
<pre><code class="language-cpp">std::auto_ptr&lt;TMemoryStream&gt; stream (new TMemoryStream);
stream-&gt;LoadFromFile(ListBox1-&gt;Items-&gt;Strings[i] + &quot;.zip&quot;);
stream-&gt;Position = 0;
ADOQuery1-&gt;Parameters-&gt;ParamByName(&quot;content&quot;)-&gt;LoadFromStream(stream.get(),ftBlob);
</code></pre>
<p>Habt ihr noch andere Ideen??</p>
<p>Gruß<br />
Dominique</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/95974/dateien-in-blobfeld</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 06:19:58 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/95974.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 26 Dec 2004 14:07:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dateien in Blobfeld on Sun, 26 Dec 2004 14:07:12 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich muss eine Datei (von *.exe bis *.txt ist alles dabei) in eine BLOB-Spalte einer MySQL-Datenbank schreiben.</p>
<p>So hab ich das schon versucht, scheiter aber dann aber irgendwann (nicht reproduzierbar) an einen ungültigen Statemant im SQL-Syntax.</p>
<pre><code class="language-cpp">std::auto_ptr&lt;TMemoryStream&gt; stream (new TMemoryStream);
stream-&gt;LoadFromFile(ListBox1-&gt;Items-&gt;Strings[i] + &quot;.zip&quot;);
stream-&gt;Position = 0;
ADOQuery1-&gt;Parameters-&gt;ParamByName(&quot;content&quot;)-&gt;LoadFromStream(stream.get(),ftBlob);
</code></pre>
<p>Habt ihr noch andere Ideen??</p>
<p>Gruß<br />
Dominique</p>
]]></description><link>https://www.c-plusplus.net/forum/post/681062</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/681062</guid><dc:creator><![CDATA[handyman]]></dc:creator><pubDate>Sun, 26 Dec 2004 14:07:12 GMT</pubDate></item><item><title><![CDATA[Reply to Dateien in Blobfeld on Mon, 27 Dec 2004 09:28:04 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>handyman schrieb:</p>
<blockquote>
<p>ich muss eine Datei (von *.exe bis *.txt ist alles dabei) in eine BLOB-Spalte einer MySQL-Datenbank schreiben</p>
</blockquote>
<p>ich verwende den CBuilder 4 und weiß daher nichts über die Basisklassen von TADOQuery. Bei mir funktioniert das so (mit MySQL erfolgreich getestet):</p>
<pre><code class="language-cpp">TBlobField* blobField = dynamic_cast &lt;TBlobField*&gt;(Table-&gt;FieldByName(&quot;PICTURE&quot;));
blobField-&gt;LoadFromFile(OpenPictureDlg-&gt;FileName); //oder LoadFromStream(...
Table-&gt;Post();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/681442</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/681442</guid><dc:creator><![CDATA[dschensky]]></dc:creator><pubDate>Mon, 27 Dec 2004 09:28:04 GMT</pubDate></item></channel></rss>