<?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[Zeos und RowsAffected]]></title><description><![CDATA[<p>Hallo!<br />
Ich habe irgendwie voll das Problem mit Zeos und PostgreSQL. Wenn ich eine einfache Select Abfrage mache, sollte mir RowsAffected eigentlich 1 zurückgeben. Tut es aber nicht.</p>
<pre><code class="language-cpp">ZQuery1-&gt;SQL-&gt;Clear(); 
ZQuery1-&gt;SQL-&gt;Add( &quot;SELECT urls FROM urls where id = 1;&quot;); ZQuery1-&gt;ExecSQL(); 
ShowMessage (ZQuery1-&gt;RowsAffected()); //hier immer 0!
</code></pre>
<p>Ich weiß echt nicht was das soll. Wenn ich den selben SQL-Befehl in pgadmin ausführe, gibt er mir das richtige aus.</p>
<p>Habt ihr irgendwelche Ideen oder bin ich auf dem Holzweg, wenn ich mir RowsAffected nach einem Insert ausgeben lasse, dann zeigt er mir '1' an!</p>
<p>Gruß:</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/78355/zeos-und-rowsaffected</link><generator>RSS for Node</generator><lastBuildDate>Mon, 29 Jun 2026 21:56:58 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/78355.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 30 Jun 2004 16:31:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zeos und RowsAffected on Wed, 30 Jun 2004 16:31:38 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Ich habe irgendwie voll das Problem mit Zeos und PostgreSQL. Wenn ich eine einfache Select Abfrage mache, sollte mir RowsAffected eigentlich 1 zurückgeben. Tut es aber nicht.</p>
<pre><code class="language-cpp">ZQuery1-&gt;SQL-&gt;Clear(); 
ZQuery1-&gt;SQL-&gt;Add( &quot;SELECT urls FROM urls where id = 1;&quot;); ZQuery1-&gt;ExecSQL(); 
ShowMessage (ZQuery1-&gt;RowsAffected()); //hier immer 0!
</code></pre>
<p>Ich weiß echt nicht was das soll. Wenn ich den selben SQL-Befehl in pgadmin ausführe, gibt er mir das richtige aus.</p>
<p>Habt ihr irgendwelche Ideen oder bin ich auf dem Holzweg, wenn ich mir RowsAffected nach einem Insert ausgeben lasse, dann zeigt er mir '1' an!</p>
<p>Gruß:</p>
]]></description><link>https://www.c-plusplus.net/forum/post/550472</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/550472</guid><dc:creator><![CDATA[ratfury]]></dc:creator><pubDate>Wed, 30 Jun 2004 16:31:38 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Wed, 30 Jun 2004 20:48:56 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>beim Suchen mit Google habe ich das gefunden<br />
(scheinbar gibt es da Probleme - mit mySQl geht es mit einigen anderen nicht)</p>
<p><a href="http://www.google.de/search?q=RowsAffected+zeos&amp;ie=UTF-8&amp;hl=de&amp;btnG=Google-Suche&amp;meta=lr%3Dlang_de" rel="nofollow">http://www.google.de/search?q=RowsAffected+zeos&amp;ie=UTF-8&amp;hl=de&amp;btnG=Google-Suche&amp;meta=lr%3Dlang_de</a></p>
<p>(Google kennst du oder ) <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /><br />
MfG<br />
Klaus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/550568</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/550568</guid><dc:creator><![CDATA[KlausB]]></dc:creator><pubDate>Wed, 30 Jun 2004 20:48:56 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Thu, 01 Jul 2004 05:44:55 GMT]]></title><description><![CDATA[<p>Ja, klar google kenne ich. Ich habe auch schon irgendwo gelesen das es damit Probleme geben soll, allerdings dachte ich MIR kann sowas nicht passieren.<br />
Was soll ich denn jetzt machen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/550662</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/550662</guid><dc:creator><![CDATA[ratfury]]></dc:creator><pubDate>Thu, 01 Jul 2004 05:44:55 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Thu, 01 Jul 2004 06:15:18 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>sag doch einfach mal was du machen willst, moeglicherweise faellt<br />
dazu jemanden etwas ein</p>
<p>MfG<br />
Klaus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/550678</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/550678</guid><dc:creator><![CDATA[KlausB]]></dc:creator><pubDate>Thu, 01 Jul 2004 06:15:18 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Thu, 01 Jul 2004 10:52:03 GMT]]></title><description><![CDATA[<p>Okay, ich möchte eigentlich nur überprüfen ob ein spezieller Datensatz schon vorhanden ist oder eben nicht. Das ist eigentlich alles.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/550815</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/550815</guid><dc:creator><![CDATA[ratfury]]></dc:creator><pubDate>Thu, 01 Jul 2004 10:52:03 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Thu, 01 Jul 2004 11:06:49 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>machs doch so</p>
<pre><code class="language-cpp">ZQuery1-&gt;SQL-&gt;Clear();
ZQuery1-&gt;SQL-&gt;Add( &quot;SELECT urls FROM urls where id = 1;&quot;); 
ZQuery1-&gt;Open();
if (ZQuery1-&gt;RecordCount &gt; 0)
    {
    //Datensatz ist vorhanden
    }
</code></pre>
<p>(moeglicherweise lag es an ExecSQL - gibt nichts zurueck -)</p>
<p>MfG<br />
Klaus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/550827</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/550827</guid><dc:creator><![CDATA[KlausB]]></dc:creator><pubDate>Thu, 01 Jul 2004 11:06:49 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Thu, 01 Jul 2004 13:00:24 GMT]]></title><description><![CDATA[<p>oder besser:</p>
<p>try {<br />
ZQuery1-&gt;Active = false;<br />
ZQuery1-&gt;SQL-&gt;Clear();<br />
ZQuery1-&gt;SQL-&gt;Add( &quot;SELECT urls FROM urls where id = 1;&quot;);<br />
ZQuery1-&gt;Active = true;<br />
if (ZQuery1-&gt;RecordCount &gt; 0){<br />
//Datensatz ist vorhanden<br />
}<br />
ZQuery1-&gt;Active = false;<br />
} catch(...){<br />
//<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/550937</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/550937</guid><dc:creator><![CDATA[*keiner*]]></dc:creator><pubDate>Thu, 01 Jul 2004 13:00:24 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Thu, 01 Jul 2004 20:59:46 GMT]]></title><description><![CDATA[<p>Jetzt geht es DANKESCHÖN!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/551333</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/551333</guid><dc:creator><![CDATA[ratfury]]></dc:creator><pubDate>Thu, 01 Jul 2004 20:59:46 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Fri, 02 Jul 2004 05:40:42 GMT]]></title><description><![CDATA[<p>Dumme Frage:<br />
Sollte RowsAffected nicht die Anzahl der <em>modifizierten</em> Datensätze zurückgeben? Bei einem Select werden keine Datensätze modifiziert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/551408</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/551408</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 02 Jul 2004 05:40:42 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Fri, 02 Jul 2004 07:19:11 GMT]]></title><description><![CDATA[<p>schon möglich, aber bei dem blöden dbexpress query hat das immer so funktioniert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/551470</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/551470</guid><dc:creator><![CDATA[ratfury]]></dc:creator><pubDate>Fri, 02 Jul 2004 07:19:11 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Fri, 02 Jul 2004 08:20:55 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>ich glaube nicht das das so funktioniert hat</p>
<blockquote>
<p>ZQuery1-&gt;SQL-&gt;Add( &quot;SELECT urls FROM urls where id = 1;&quot;); ZQuery1-&gt;ExecSQL();</p>
</blockquote>
<p>Problem ist SELECT und ExecSQL (schau dirs mal in der Hilfe an)<br />
(wozu wird ExecSQL verwendet und wozu Open)</p>
<p>MfG<br />
Klaus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/551494</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/551494</guid><dc:creator><![CDATA[KlausB]]></dc:creator><pubDate>Fri, 02 Jul 2004 08:20:55 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Fri, 02 Jul 2004 08:26:01 GMT]]></title><description><![CDATA[<p>Executes the SQL statement for the query.</p>
<p>void __fastcall ExecSQL(void);</p>
<p>Description</p>
<p>Call ExecSQL to execute the SQL statement currently assigned to the SQL property. Use ExecSQL to execute queries that do not return a cursor to data (such as INSERT, UPDATE, DELETE, and CREATE TABLE).</p>
<p>Note: For SELECT statements, call Open instead of ExecSQL.</p>
<p>ExecSQL prepares the statement in SQL property for execution if it has not already been prepared. To speed performance, an application should ordinarily call Prepare before calling ExecSQL for the first time.</p>
<p>Tatsache. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /> Trotzdem!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/551497</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/551497</guid><dc:creator><![CDATA[ratfury]]></dc:creator><pubDate>Fri, 02 Jul 2004 08:26:01 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Fri, 02 Jul 2004 08:45:18 GMT]]></title><description><![CDATA[<p>Das ist doch genau das, was ich gesagt habe: RowsAffected funktioniert nicht mit SELECT.... <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/551509</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/551509</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 02 Jul 2004 08:45:18 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Fri, 02 Jul 2004 09:57:26 GMT]]></title><description><![CDATA[<p>Joe_M. schrieb:</p>
<blockquote>
<p>Dumme Frage:<br />
Sollte RowsAffected nicht die Anzahl der <em>modifizierten</em> Datensätze zurückgeben? <strong>Bei einem Select werden keine Datensätze modifiziert</strong>.</p>
</blockquote>
<p>und es geht doch</p>
<pre><code class="language-cpp">ADOQuery1-&gt;SQL-&gt;Clear();
	ADOQuery1-&gt;SQL-&gt;Add(&quot;SELECT urls FROM urls where id = 1;&quot;);
	ADOQuery1-&gt;Open();
	while (!ADOQuery1-&gt;Eof)
	{
		ADOQuery1-&gt;Edit(); //Datensatz Bearbeitungsmodus
		ADOQuery1-&gt;FieldByName(&quot;urls&quot;)-&gt;AsString = &quot;&quot;; //löschen der URL
		ADOQuery1-&gt;Post(); //Datensatz speichern
		ADOQuery1-&gt;Next(); //zum nächsten Datensatz
	}
	ADOQuery1-&gt;Close();
</code></pre>
<p>auch wenn man es nicht mehr machen sollte <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/551556</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/551556</guid><dc:creator><![CDATA[aahhjaa]]></dc:creator><pubDate>Fri, 02 Jul 2004 09:57:26 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Fri, 02 Jul 2004 10:12:23 GMT]]></title><description><![CDATA[<p>@aahhjaa:</p>
<p>Es ging darum, per ExexSQL ein reines SELECT Statment auszuführen und mir RowsAffected die Anzahl der Datensätze zu ermitteln...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/551567</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/551567</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 02 Jul 2004 10:12:23 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Fri, 02 Jul 2004 10:28:41 GMT]]></title><description><![CDATA[<p>Joe_M. schrieb:</p>
<blockquote>
<p><strong>Das ist doch genau das, was ich gesagt habe</strong>: RowsAffected funktioniert nicht mit SELECT.... <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>und wie kommst du dann auf diese Aussage?<br />
wenn du jetzt schreibts</p>
<p>Joe_M. schrieb:</p>
<blockquote>
<p>Es ging darum, per ExexSQL ein reines SELECT Statment auszuführen und mir RowsAffected die Anzahl der Datensätze zu ermitteln...</p>
</blockquote>
<p>Obwohl KlausB den Unterschied zwischen Open() und ExexSQL() begesteuert hat?<br />
und von deiner Seite kein Wort darüber geschrieben wurde?</p>
<p>Gruß<br />
Der Kniebohrer <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/551585</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/551585</guid><dc:creator><![CDATA[aahhjaa]]></dc:creator><pubDate>Fri, 02 Jul 2004 10:28:41 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Fri, 02 Jul 2004 10:53:47 GMT]]></title><description><![CDATA[<p>hä?<br />
Es ist doch jetzt klar das ExecSQL keinen Rückgabewert bei einem Select hat, oder haben sollte.<br />
Ich bin da allerdings immer noch anderer Meinung weil das meiner Meinung nach mit einem DBExpress Query funktioniert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/551597</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/551597</guid><dc:creator><![CDATA[ratfury]]></dc:creator><pubDate>Fri, 02 Jul 2004 10:53:47 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Fri, 02 Jul 2004 11:25:53 GMT]]></title><description><![CDATA[<p>Okay, ich war tatsächlich auf dem Holzweg, ich hatte das damals mit einem Update gemacht, und dachte es war mit einem Select. Hab es jetzt extra nochmal ausprobiert. Es geht tatsächlich NICHT!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/551622</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/551622</guid><dc:creator><![CDATA[ratfury]]></dc:creator><pubDate>Fri, 02 Jul 2004 11:25:53 GMT</pubDate></item><item><title><![CDATA[Reply to Zeos und RowsAffected on Fri, 02 Jul 2004 12:16:19 GMT]]></title><description><![CDATA[<p>@aahhjaa: Ehrlich gesagt, weiß ich gar nicht, was Du mir sagen willst?!?</p>
<p>Edit: Warum sollte ich erneut auf den Lösungsweg hinweisen, wenn KlausB das bereits getan hat, ich habe nur die Erklärung geliefert, warum RowsAffected in dem Fall nicht funktioniert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/551653</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/551653</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 02 Jul 2004 12:16:19 GMT</pubDate></item></channel></rss>