<?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[Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler]]></title><description><![CDATA[<p>Also<br />
Ich habe mal wieder ein problem.<br />
Und zwar will ich bevor ich etwas in meine DB eintrage überprüfen ob schon ein Eintrag mit dieser Adresse besteht,</p>
<p>dies Dachte ich mir so:</p>
<pre><code class="language-cpp">Edit1-&gt;Text = &quot;Test if deja exist&quot;;
                Form1-&gt;Query1-&gt;Close();
                Form1-&gt;Query1-&gt;SQL-&gt;Clear();
                Form1-&gt;Query1-&gt;SQL-&gt;Add(&quot;SELECT Adress FROM DATA WHERE Adress = '&quot; + SQLi +&quot;'&quot;);
                Form1-&gt;Query1-&gt;Open();
                 if(Form1-&gt;Query1-&gt;Eof)
                {
</code></pre>
<p>das dann quasi die if schleife nur durchlaufen wird wenn nicht bereits ein Eintrag besteht.</p>
<p>inerhalb der schleife wird dann über das selbe query werte eingetragen...</p>
<p>Leider habe ich jetzt ein problem damit</p>
<p>und zwar:<br />
das ganze befindet sich in einer schleife<br />
und nach einigen durchläufen bekomme ich vom debuger den error:<br />
&quot;Project Project1.exe raised exveption class EIBClientError with message 'SQL Prase Error:</p>
<p>EOF in string detected'.Process stopped.Use Step or Run to conntinue.&quot;</p>
<p>Kann mir jemand helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/164058/firebird-tibquery-überprüfen-ob-eintrag-bereits-exsistiert-fehler</link><generator>RSS for Node</generator><lastBuildDate>Wed, 12 Aug 2026 08:40:59 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/164058.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Nov 2006 17:33:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler on Sat, 04 Nov 2006 17:33:26 GMT]]></title><description><![CDATA[<p>Also<br />
Ich habe mal wieder ein problem.<br />
Und zwar will ich bevor ich etwas in meine DB eintrage überprüfen ob schon ein Eintrag mit dieser Adresse besteht,</p>
<p>dies Dachte ich mir so:</p>
<pre><code class="language-cpp">Edit1-&gt;Text = &quot;Test if deja exist&quot;;
                Form1-&gt;Query1-&gt;Close();
                Form1-&gt;Query1-&gt;SQL-&gt;Clear();
                Form1-&gt;Query1-&gt;SQL-&gt;Add(&quot;SELECT Adress FROM DATA WHERE Adress = '&quot; + SQLi +&quot;'&quot;);
                Form1-&gt;Query1-&gt;Open();
                 if(Form1-&gt;Query1-&gt;Eof)
                {
</code></pre>
<p>das dann quasi die if schleife nur durchlaufen wird wenn nicht bereits ein Eintrag besteht.</p>
<p>inerhalb der schleife wird dann über das selbe query werte eingetragen...</p>
<p>Leider habe ich jetzt ein problem damit</p>
<p>und zwar:<br />
das ganze befindet sich in einer schleife<br />
und nach einigen durchläufen bekomme ich vom debuger den error:<br />
&quot;Project Project1.exe raised exveption class EIBClientError with message 'SQL Prase Error:</p>
<p>EOF in string detected'.Process stopped.Use Step or Run to conntinue.&quot;</p>
<p>Kann mir jemand helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1168404</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1168404</guid><dc:creator><![CDATA[download123]]></dc:creator><pubDate>Sat, 04 Nov 2006 17:33:26 GMT</pubDate></item><item><title><![CDATA[Reply to Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler on Sat, 04 Nov 2006 18:01:54 GMT]]></title><description><![CDATA[<p>Tritt das auch auf, wenn du Query-&gt;RecordCount abfragst statt auf EOF zu prüfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1168428</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1168428</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Sat, 04 Nov 2006 18:01:54 GMT</pubDate></item><item><title><![CDATA[Reply to Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler on Sat, 04 Nov 2006 18:18:23 GMT]]></title><description><![CDATA[<p>ja tritt leider auch auf...</p>
<p>habe das EOF durch Form1-&gt;Query1-&gt;RecordCount == 0 ersetzt...</p>
<p>ich weiß nicht obs von belang ist aber in der if schleife passiert mti dme Query folgendes:</p>
<pre><code class="language-cpp">Form1-&gt;Query1-&gt;SQL-&gt;Add(&quot;insert into Data(interpret,album,titel,kommentar,Adress) values(:interpret,:album,:titel,:kommentar,:Adress)&quot;);
                                        Form1-&gt;Query1-&gt;ParamByName(&quot;interpret&quot;)-&gt;Value = Data.interpret.c_str();
                                        Form1-&gt;Query1-&gt;ParamByName(&quot;album&quot;)-&gt;Value = Data.album.c_str();
                                        Form1-&gt;Query1-&gt;ParamByName(&quot;titel&quot;)-&gt;Value = Data.titel.c_str();
                                        Form1-&gt;Query1-&gt;ParamByName(&quot;kommentar&quot;)-&gt;Value = Data.kommentar.c_str();
                                        Form1-&gt;Query1-&gt;ParamByName(&quot;Adress&quot;)-&gt;Value = (*i).c_str();
                                        Form1-&gt;Query1-&gt;ExecSQL();
                                        Form1-&gt;IBTransaction1-&gt;CommitRetaining();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1168442</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1168442</guid><dc:creator><![CDATA[download123]]></dc:creator><pubDate>Sat, 04 Nov 2006 18:18:23 GMT</pubDate></item><item><title><![CDATA[Reply to Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler on Sun, 05 Nov 2006 17:06:26 GMT]]></title><description><![CDATA[<p>Hallo,<br />
in Deiner if-Anweisung steht nur ein Query1-&gt;Add. Du solltest es so wie vor Deiner if-Anweisung machen. Also, Close, Clear, Add....</p>
<p>Vielleicht hilft es ja.....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1169015</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1169015</guid><dc:creator><![CDATA[torsten_156]]></dc:creator><pubDate>Sun, 05 Nov 2006 17:06:26 GMT</pubDate></item><item><title><![CDATA[Reply to Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler on Sun, 05 Nov 2006 17:36:57 GMT]]></title><description><![CDATA[<p>ist da auch habe ich nur nicht zititert ... da ist auch query close und query-&gt;sql-&gt;clear...</p>
<p>aber es hängt sich irgendwie auf... ich habe auch schon mal versucht das ganze auszugleidern geht auch nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1169042</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1169042</guid><dc:creator><![CDATA[download123]]></dc:creator><pubDate>Sun, 05 Nov 2006 17:36:57 GMT</pubDate></item><item><title><![CDATA[Reply to Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler on Sun, 05 Nov 2006 18:39:36 GMT]]></title><description><![CDATA[<p>Wahrscheinlich enthält der Text, den du einfügen willst, irgendwelche Sonderzeichen.<br />
Möglicherweise hilft es, mit Parametern zu arbeiten, siehe TCustomSQLDataSet::Params.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1169086</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1169086</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Sun, 05 Nov 2006 18:39:36 GMT</pubDate></item><item><title><![CDATA[Reply to Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler on Sun, 05 Nov 2006 20:22:58 GMT]]></title><description><![CDATA[<p>Es hat nichts mit dem add zu tun...</p>
<p>ich habe mal die testroutine ausgegliedert :</p>
<pre><code class="language-cpp">vector&lt;std::string&gt;::const_iterator i;
        for (i = mp3.begin(); i != mp3.end(); ++i)
        {
                AnsiString SQLi = (*i).c_str();

                /*while(SQLi.Length() &lt; (Adresslenght ))//string auf feldlänge bringen
                {
                        SQLi+= ' ';
                } */

                Edit1-&gt;Text = &quot;Test if deja exist&quot;;
                Form1-&gt;Query1-&gt;Close();
                Form1-&gt;Query1-&gt;SQL-&gt;Clear();
                Form1-&gt;Query1-&gt;SQL-&gt;Add(&quot;SELECT Adress FROM DATA WHERE Adress = '&quot; + SQLi +&quot;'&quot;);
                Form1-&gt;Query1-&gt;Open();
                if(Form1-&gt;Query1-&gt;RecordCount &gt; 0)//true)
                {

                }
        }
</code></pre>
<p>hier tritt der fehler auch auf</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1169183</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1169183</guid><dc:creator><![CDATA[download123]]></dc:creator><pubDate>Sun, 05 Nov 2006 20:22:58 GMT</pubDate></item><item><title><![CDATA[Reply to Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler on Sun, 05 Nov 2006 20:38:41 GMT]]></title><description><![CDATA[<p>Vielen Dank für das Gespräch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1169201</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1169201</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Sun, 05 Nov 2006 20:38:41 GMT</pubDate></item><item><title><![CDATA[Reply to Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler on Sun, 05 Nov 2006 21:35:03 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich kann Dir zwar auf anhieb auch nicht sagen warum der Fehler auftritt, aber ich denke der Lösungsansatz an sich ist ungünstig.<br />
Falls Du TIBQuery benutzen willst, solltest Du zwei Instanzen von TIBQuery erzeugen. Eine zum Suchen und eine zum Einfügen. Beide sollten Parametrisiert sein.<br />
z.B</p>
<pre><code>FROM DATA WHERE Adress = :Adress
</code></pre>
<p>In jedem Schleifendurchlauf muss dann mit</p>
<pre><code>-&gt;ParamByName(&quot;Adress&quot;)-&gt;AsString = SQLi;
</code></pre>
<p>die gesuchte Adresse zugewiesen werden. Nach jedem Einfügen muß die äussere Abfrage noch commited werden.</p>
<p>Aber am aller besten würdest Du TIBDataset einsetzen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> und die Funktion locate benutzen, um einen bestimmten Datensatz zu finden und zu ändern.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1169255</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1169255</guid><dc:creator><![CDATA[FireBirdSQL]]></dc:creator><pubDate>Sun, 05 Nov 2006 21:35:03 GMT</pubDate></item><item><title><![CDATA[Reply to Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler on Mon, 06 Nov 2006 10:36:01 GMT]]></title><description><![CDATA[<p>Hallo,<br />
mir ist da doch noch etwas eingefallen. Und zwar unterscheidet ein Query zwischen Open und ExcecSQL!<br />
Was jetzt wann richtig ist, weis ich nicht mehr. Aber probier es doch mal mit Query1-&gt;ExcecSQL</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1169476</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1169476</guid><dc:creator><![CDATA[torsten_156]]></dc:creator><pubDate>Mon, 06 Nov 2006 10:36:01 GMT</pubDate></item><item><title><![CDATA[Reply to Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler on Mon, 06 Nov 2006 10:43:01 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Was Open und ExecSQL unterscheidet, steht in der BCB-Hilfe zu den beiden Methoden.<br />
Um es kurz zu machen : im gegebenen Fall hier ist das Open richtig.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1169482</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1169482</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Mon, 06 Nov 2006 10:43:01 GMT</pubDate></item><item><title><![CDATA[Reply to Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler on Mon, 06 Nov 2006 19:55:15 GMT]]></title><description><![CDATA[<p>Jansen schrieb:</p>
<blockquote>
<p>Wahrscheinlich enthält der Text, den du einfügen willst, irgendwelche Sonderzeichen.<br />
Möglicherweise hilft es, mit Parametern zu arbeiten, siehe TCustomSQLDataSet::Params.</p>
</blockquote>
<p>Omg... jetzt raf ich erst was du meinst</p>
<p>Sowas oder?</p>
<pre><code class="language-cpp">Edit1-&gt;Text = &quot;Test if deja exist&quot;;
                Form1-&gt;Query1-&gt;Close();
                Form1-&gt;Query1-&gt;SQL-&gt;Clear();
                Form1-&gt;Query1-&gt;SQL-&gt;Add(&quot;SELECT Adress FROM DATA WHERE Adress = 'MeineAdresse' values(:MeineAdresse)&quot;);//&quot; + SQLi +&quot;'&quot;);
                Form1-&gt;Query1-&gt;ParamByName(&quot;MeineAdresse&quot;)-&gt;Value = SQLi;
                Form1-&gt;Query1-&gt;Open();
                if(Form1-&gt;Query1-&gt;RecordCount &gt; 0)//true)
                {

                }
</code></pre>
<p>Stimmt das so soweit?</p>
<p>weil ich bekomme einen anderen Fehler, der für mich auf einen fehler hinweist</p>
<blockquote>
<p>Project Project1.exe raised exveption class EIBInterBaseError with message 'Dynamic SQL Error<br />
SQL error code= -104<br />
Token unknown -line1, char 55<br />
values'. Process stoped.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1170000</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1170000</guid><dc:creator><![CDATA[download123]]></dc:creator><pubDate>Mon, 06 Nov 2006 19:55:15 GMT</pubDate></item><item><title><![CDATA[Reply to Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler on Mon, 06 Nov 2006 21:21:59 GMT]]></title><description><![CDATA[<p>Nö, nicht so ganz.</p>
<pre><code class="language-cpp">Form1-&gt;Query1-&gt;SQL-&gt;Add(&quot;SELECT Adress FROM DATA WHERE Adress = :MeineAdresse&quot;);
</code></pre>
<p>Grüße Joe_M.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1170073</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1170073</guid><dc:creator><![CDATA[zufaulzumeinloggen]]></dc:creator><pubDate>Mon, 06 Nov 2006 21:21:59 GMT</pubDate></item><item><title><![CDATA[Reply to Firebird + TIBQuery + überprüfen ob Eintrag bereits exsistiert = Fehler on Tue, 07 Nov 2006 11:55:37 GMT]]></title><description><![CDATA[<p>vielen dank... jetzt geht alles einwandfrei <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/1170373</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1170373</guid><dc:creator><![CDATA[download123]]></dc:creator><pubDate>Tue, 07 Nov 2006 11:55:37 GMT</pubDate></item></channel></rss>