<?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[Zahl von Datenbank in integer speichern]]></title><description><![CDATA[<p>Hi. Ich mach folgende SQL-Abfrage:</p>
<pre><code class="language-cpp">Form1-&gt;ADOQuery1-&gt;Close();
	    Form1-&gt;ADOQuery1-&gt;SQL-&gt;Clear();
        Form1-&gt;ADOQuery1-&gt;SQL-&gt;Add(&quot;SELECT MAX(Indexnummer) FROM musik&quot;);
        Form1-&gt;ADOQuery1-&gt;Open();
</code></pre>
<p>Dies liefert mir einen Zahlenwert zurück. Jetzt hab ich allerdings keinen Schimmer wie ich den in einer int-Variable speichern soll. Folgendes hab ich schon probiert:</p>
<pre><code class="language-cpp">int Anzahl = Form1-&gt;ADOQuery1-&gt;FieldValues(&quot;Indexnummer&quot;);
</code></pre>
<p>Da bekomme ich aber die Fehlermeldung das er das Feld Indexnummer nicht kennt. Ich denke das liegt daran das die ADOQuery1 nicht auf einen Eintrag zeigt sondern nur eine Zahl zurückliefert.</p>
<p>Wie mach ich das denn jetzt?</p>
<p>Gruß Alex</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/185528/zahl-von-datenbank-in-integer-speichern</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 10:30:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/185528.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 Jun 2007 15:56:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zahl von Datenbank in integer speichern on Tue, 26 Jun 2007 15:56:29 GMT]]></title><description><![CDATA[<p>Hi. Ich mach folgende SQL-Abfrage:</p>
<pre><code class="language-cpp">Form1-&gt;ADOQuery1-&gt;Close();
	    Form1-&gt;ADOQuery1-&gt;SQL-&gt;Clear();
        Form1-&gt;ADOQuery1-&gt;SQL-&gt;Add(&quot;SELECT MAX(Indexnummer) FROM musik&quot;);
        Form1-&gt;ADOQuery1-&gt;Open();
</code></pre>
<p>Dies liefert mir einen Zahlenwert zurück. Jetzt hab ich allerdings keinen Schimmer wie ich den in einer int-Variable speichern soll. Folgendes hab ich schon probiert:</p>
<pre><code class="language-cpp">int Anzahl = Form1-&gt;ADOQuery1-&gt;FieldValues(&quot;Indexnummer&quot;);
</code></pre>
<p>Da bekomme ich aber die Fehlermeldung das er das Feld Indexnummer nicht kennt. Ich denke das liegt daran das die ADOQuery1 nicht auf einen Eintrag zeigt sondern nur eine Zahl zurückliefert.</p>
<p>Wie mach ich das denn jetzt?</p>
<p>Gruß Alex</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314137</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314137</guid><dc:creator><![CDATA[AlexDozer]]></dc:creator><pubDate>Tue, 26 Jun 2007 15:56:29 GMT</pubDate></item><item><title><![CDATA[Reply to Zahl von Datenbank in integer speichern on Tue, 26 Jun 2007 16:09:13 GMT]]></title><description><![CDATA[<p>Hallo</p>
<pre><code class="language-cpp">Form1-&gt;ADOQuery1-&gt;Close();
Form1-&gt;ADOQuery1-&gt;SQL-&gt;Clear();
Form1-&gt;ADOQuery1-&gt;SQL-&gt;Add(&quot;SELECT MAX(Indexnummer) AS zahl FROM musik&quot;);
Form1-&gt;ADOQuery1-&gt;Open();
int Zahl = Form1-&gt;ADOQuery1-&gt;FieldByName(&quot;zahl&quot;)-&gt;AsInteger;
</code></pre>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314145</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314145</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 26 Jun 2007 16:09:13 GMT</pubDate></item><item><title><![CDATA[Reply to Zahl von Datenbank in integer speichern on Tue, 26 Jun 2007 16:17:51 GMT]]></title><description><![CDATA[<p>Funktioniert perfekt! Vielen Dank!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314153</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314153</guid><dc:creator><![CDATA[AlexDozer]]></dc:creator><pubDate>Tue, 26 Jun 2007 16:17:51 GMT</pubDate></item><item><title><![CDATA[Reply to Zahl von Datenbank in integer speichern on Tue, 26 Jun 2007 17:23:07 GMT]]></title><description><![CDATA[<p>Und nächstes Mal zuerst in der <a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39305" rel="nofollow">FAQ</a> nachschlagen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314200</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314200</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Tue, 26 Jun 2007 17:23:07 GMT</pubDate></item></channel></rss>