<?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[CADORecordset::GetFieldValue()]]></title><description><![CDATA[<p>Guten Morgen!</p>
<p>Ich habe ein Problem mit dem CADORecordset. Ich will mit GetFieldValue den Wert einlesen. Die Verbindung mit der Datenbank und Tabelle steht. Jetzt will ich mit:</p>
<pre><code class="language-cpp">CString wert = &quot;&quot;;
while ( !rec.IsEOF() ) {
rec.GetFieldValue( 2, wert ); 
// mit &quot;wert&quot; arbeiten
rec.MoveNext();
}
</code></pre>
<p>Die Werte in der 3. Spalte in wert schreiben. Allerdings bleib &quot;wert&quot; immer &quot;&quot; und es wird nie was dortrein geschrieben, obwohl in der DB Daten sind.</p>
<p>Was mache ich falsch? Wer kann helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/186860/cadorecordset-getfieldvalue</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 21:32:06 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/186860.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 13 Jul 2007 07:44:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CADORecordset::GetFieldValue() on Fri, 13 Jul 2007 07:44:30 GMT]]></title><description><![CDATA[<p>Guten Morgen!</p>
<p>Ich habe ein Problem mit dem CADORecordset. Ich will mit GetFieldValue den Wert einlesen. Die Verbindung mit der Datenbank und Tabelle steht. Jetzt will ich mit:</p>
<pre><code class="language-cpp">CString wert = &quot;&quot;;
while ( !rec.IsEOF() ) {
rec.GetFieldValue( 2, wert ); 
// mit &quot;wert&quot; arbeiten
rec.MoveNext();
}
</code></pre>
<p>Die Werte in der 3. Spalte in wert schreiben. Allerdings bleib &quot;wert&quot; immer &quot;&quot; und es wird nie was dortrein geschrieben, obwohl in der DB Daten sind.</p>
<p>Was mache ich falsch? Wer kann helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1324346</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1324346</guid><dc:creator><![CDATA[plizer]]></dc:creator><pubDate>Fri, 13 Jul 2007 07:44:30 GMT</pubDate></item><item><title><![CDATA[Reply to CADORecordset::GetFieldValue() on Fri, 13 Jul 2007 08:00:10 GMT]]></title><description><![CDATA[<p>Das ist doch verrückt. Oft wenn ich etwas poste, löse ich das Problem ein paar Minuten später selbst! Dabei hab ich schon Stunden gesucht... Statt der 2 muss da natürlich eine 0 rein und gut ist!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1324363</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1324363</guid><dc:creator><![CDATA[plizer]]></dc:creator><pubDate>Fri, 13 Jul 2007 08:00:10 GMT</pubDate></item><item><title><![CDATA[Reply to CADORecordset::GetFieldValue() on Fri, 13 Jul 2007 08:16:58 GMT]]></title><description><![CDATA[<p>plizer schrieb:</p>
<blockquote>
<p>Das ist doch verrückt. Oft wenn ich etwas poste, löse ich das Problem ein paar Minuten später selbst! Dabei hab ich schon Stunden gesucht...</p>
</blockquote>
<p>Das ist völlig normal. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /><br />
Due brauchst einfach nur jemanden, dem du alles nochmal ganz genau erklärst - damit erklärst du es auch dir selbst nochmal und findest meist etwas, was du sonst übersiehst.<br />
Ich erkläre bei besonders hartnäckigen Fehlern sowas immer erstmal dem Kollegen (obwohl der kein C++ kann) und dann fällt es entweder mir oder ihm auf, weil die Erklärung nicht so ganz schlüssig war. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1324389</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1324389</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Fri, 13 Jul 2007 08:16:58 GMT</pubDate></item><item><title><![CDATA[Reply to CADORecordset::GetFieldValue() on Fri, 13 Jul 2007 08:25:37 GMT]]></title><description><![CDATA[<p>estartu schrieb:</p>
<blockquote>
<p>plizer schrieb:</p>
<blockquote>
<p>Das ist doch verrückt. Oft wenn ich etwas poste, löse ich das Problem ein paar Minuten später selbst! Dabei hab ich schon Stunden gesucht...</p>
</blockquote>
<p>Das ist völlig normal. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /><br />
<strong>Due brauchst einfach nur jemanden, dem du alles nochmal ganz genau erklärst - damit erklärst du es auch dir selbst nochmal und findest meist etwas, was du sonst übersiehst.</strong><br />
Ich erkläre bei besonders hartnäckigen Fehlern sowas immer erstmal dem Kollegen (obwohl der kein C++ kann) und dann fällt es entweder mir oder ihm auf, weil die Erklärung nicht so ganz schlüssig war. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
</blockquote>
<p>Stimmt da ist etwas dran! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> Man verschafft sich mit einer Erklärung auch selbst nochmal einen Überblick!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1324403</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1324403</guid><dc:creator><![CDATA[plizer]]></dc:creator><pubDate>Fri, 13 Jul 2007 08:25:37 GMT</pubDate></item><item><title><![CDATA[Reply to CADORecordset::GetFieldValue() on Fri, 13 Jul 2007 08:47:10 GMT]]></title><description><![CDATA[<p>Jetzt hab ich allerdings noch ein anderes Problem, mit:</p>
<pre><code class="language-cpp">rec.Open(sqlQuery, CADORecordset::openQuery );
</code></pre>
<p>lässt sich problemlos eine SELECT Query durchführen. Nun will ich allerdings eine CREATE TABLE Anweisung durchführen. Nur stürzt er dann bei rec.Open ab! Ich habe auch noch:<br />
hr = rec.Open(sqlQuery, CADORecordset::openTable );<br />
hr = rec.Open(sqlQuery, CADORecordset::openUnknown );<br />
hr = rec.Open(sqlQuery, CADORecordset::openStoredProc );<br />
versucht. Ging allerdings auch nicht.</p>
<p>Noch jemand eine Idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1324429</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1324429</guid><dc:creator><![CDATA[plizer]]></dc:creator><pubDate>Fri, 13 Jul 2007 08:47:10 GMT</pubDate></item><item><title><![CDATA[Reply to CADORecordset::GetFieldValue() on Fri, 13 Jul 2007 09:52:17 GMT]]></title><description><![CDATA[<p>Hallo,<br />
es soll normal funktionieren.<br />
Du musst Rechte dafür haben, eine TB zu legen.</p>
<p>db-&gt;OpenEx(&quot;DSN=dsn;UID=uid;PWD=jrisch;&quot;);<br />
CString strSql=&quot;INSERT INTO tbl ....&quot;;</p>
<p>db-&gt;ExecuteSQL(strSql);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1324498</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1324498</guid><dc:creator><![CDATA[dokdok2]]></dc:creator><pubDate>Fri, 13 Jul 2007 09:52:17 GMT</pubDate></item><item><title><![CDATA[Reply to CADORecordset::GetFieldValue() on Fri, 13 Jul 2007 10:31:23 GMT]]></title><description><![CDATA[<p>Danke, habs mit Deiner Hilfe problemlos hinbekommen! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1324542</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1324542</guid><dc:creator><![CDATA[plizer]]></dc:creator><pubDate>Fri, 13 Jul 2007 10:31:23 GMT</pubDate></item><item><title><![CDATA[Reply to CADORecordset::GetFieldValue() on Thu, 19 Jul 2007 08:41:26 GMT]]></title><description><![CDATA[<p>Ich habe nochmal ein Problem mit GetFieldValue().<br />
Ich habe eine DB-Tabelle mit DATETIME und will das kleinste und größte Datum herausholen. Das mach ich mit</p>
<pre><code class="language-cpp">CADORecordset rec(&amp;m_db);
rec.Open(&quot;SELECT MIN(Zeitstempel), MAX(Zeitstempel) FROM daten&quot;, CADORecordset::openQuery );
</code></pre>
<p>Diese Abfrage funktioniert und ich bekomme in der MySQL Konsole eine Tabelle mit einer Zeile und 2 Spalten zurück. Diese les ich dann in einen CString:</p>
<pre><code class="language-cpp">CString zeitstempelMIN = &quot;&quot;;
CString zeitstempelMAX = &quot;&quot;;
rec.GetFieldValue( 0, zeitstempelMIN ); // Schreibe den Wert der Zelle in den CString
rec.GetFieldValue( 1, zeitstempelMAX );
</code></pre>
<p>Doch steht dann in den zeitstempeln garnichts drin, bzw. immer noch &quot;&quot;. Wo liegt der Fehler?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1328255</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1328255</guid><dc:creator><![CDATA[plizer]]></dc:creator><pubDate>Thu, 19 Jul 2007 08:41:26 GMT</pubDate></item><item><title><![CDATA[Reply to CADORecordset::GetFieldValue() on Thu, 19 Jul 2007 10:29:45 GMT]]></title><description><![CDATA[<p>Ok, hab das Problem gelöst und falls jemand mal das gleiche Problem hat, hier die Lösung:</p>
<pre><code class="language-cpp">//Statt
rec.Open(&quot;SELECT MIN(Zeitstempel), MAX(Zeitstempel) FROM daten&quot;, CADORecordset::openQuery );
</code></pre>
<pre><code class="language-cpp">//Muss die Abfrage so aussehen:
rec.Open(&quot;SELECT CAST(MIN(Zeitstempel) AS CHAR(19)), CAST(MAX(Zeitstempel) AS CHAR(19)) FROM daten;&quot;, CADORecordset::openQuery );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1328369</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1328369</guid><dc:creator><![CDATA[plizer]]></dc:creator><pubDate>Thu, 19 Jul 2007 10:29:45 GMT</pubDate></item></channel></rss>