<?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[INSERT Befehl und AUTO_INCREMENT (ADO)]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich greife mit der ADO Connection auf eine von mir erstellte Access Datenbank zu. Jetzt will ich mit den normalen SQL Befehlen einen neuen Eintrag hinzufügen, das Problem ist das die erste Spalte den Wert AUTO_INCREMENT hat. Wie muss da jetzt der INSERT Befehl aussehen? Habe es schon so probiert, aber da bekomme ich einen Syntax Fehler.</p>
<p>ADOQuery1-&gt;SQL-&gt;Add(&quot;INSERT INTO emails VALUES(,,'Mark')&quot;);</p>
<p>Lasse ich die ersten beiden Kommas komplett wege, sagt er mir das Abfrage- und Zielfelder nicht übereinstimmen.</p>
<p>Cya</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/74313/insert-befehl-und-auto_increment-ado</link><generator>RSS for Node</generator><lastBuildDate>Sun, 28 Jun 2026 01:28:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/74313.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 May 2004 10:23:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 10:23:45 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich greife mit der ADO Connection auf eine von mir erstellte Access Datenbank zu. Jetzt will ich mit den normalen SQL Befehlen einen neuen Eintrag hinzufügen, das Problem ist das die erste Spalte den Wert AUTO_INCREMENT hat. Wie muss da jetzt der INSERT Befehl aussehen? Habe es schon so probiert, aber da bekomme ich einen Syntax Fehler.</p>
<p>ADOQuery1-&gt;SQL-&gt;Add(&quot;INSERT INTO emails VALUES(,,'Mark')&quot;);</p>
<p>Lasse ich die ersten beiden Kommas komplett wege, sagt er mir das Abfrage- und Zielfelder nicht übereinstimmen.</p>
<p>Cya</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523306</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523306</guid><dc:creator><![CDATA[Andre1234]]></dc:creator><pubDate>Wed, 19 May 2004 10:23:45 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 10:31:46 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>unter mySQl mache ich es so</p>
<p>ADOQuery1-&gt;SQL-&gt;Add(&quot;INSERT INTO emails VALUES('0','Mark')&quot;);</p>
<p>sollte unter Access auch gehen</p>
<p>MfG<br />
Klaus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523314</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523314</guid><dc:creator><![CDATA[KlausB]]></dc:creator><pubDate>Wed, 19 May 2004 10:31:46 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 10:45:51 GMT]]></title><description><![CDATA[<p>Danke, jetzt kommt nur leider eine andere Fehlermeldung.... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
<p>&quot;Fehlendes Semikolon(;) am Ende der SQL Anweisung&quot;</p>
<p>füge ich es aber hinzu kommt dieser Fehler:</p>
<p>&quot;Zeichen nach Ende von SQL Anweisung gefunden.&quot;</p>
<p>Was soll das denn?? Es hat doch vorher geklappt!!</p>
<p>Cya</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523326</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523326</guid><dc:creator><![CDATA[Andre1234]]></dc:creator><pubDate>Wed, 19 May 2004 10:45:51 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 11:05:16 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>scheinbar ist es unter Access doch etwas anderst</p>
<p>versuchs mal so</p>
<p>ADOQuery1-&gt;SQL-&gt;Add(&quot;INSERT INTO emails VALUES('0','Mark');&quot;);</p>
<p>MfG<br />
Klaus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523339</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523339</guid><dc:creator><![CDATA[KlausB]]></dc:creator><pubDate>Wed, 19 May 2004 11:05:16 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 11:12:17 GMT]]></title><description><![CDATA[<p>genauso habe ich es ja gemacht, dann meckert er wegen dem überflüssigen Zeichen.</p>
<p>Cya</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523346</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523346</guid><dc:creator><![CDATA[Andre1234]]></dc:creator><pubDate>Wed, 19 May 2004 11:12:17 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 11:27:23 GMT]]></title><description><![CDATA[<p>Versuch mal:</p>
<p>ADOQuery1-&gt;SQL-&gt;Add(&quot;INSERT INTO emails VALUES(NULL,'Mark')&quot;);</p>
<p>Dashier ist auf jeden Fall das korrekte AutoIncrement-Statement für SQL(Ohne Anführungszeichen):</p>
<p>&quot;INSERT INTO emails VALUES(NULL,'Mark');&quot;</p>
<p>Hilfe von Borland sagt das:</p>
<pre><code class="language-cpp">ADOQuery1-&gt;Close();

ADOQuery1-&gt;SQL-&gt;Clear();
ADOQuery1-&gt;SQL-&gt;Add(&quot;SELECT EmpNo, LastName, FirstName, HireDate&quot;);
ADOQuery1-&gt;SQL-&gt;Add(&quot;FROM Employee&quot;);

ADOQuery1-&gt;Open();
</code></pre>
<p>Also ohne abschließendes Semikolon.</p>
<p>Zahlenwerte werden in SQL ohne einfaches Anführungszeichen &quot; ' &quot; geschrieben. Das wird nur bei Strings und Date/Time werten benötigt.<br />
Von MySQL weiß ich aber, das es Zahlen die als String übergeben werden &quot; '0' &quot; automatisch als Zahl umwandelt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523360</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523360</guid><dc:creator><![CDATA[-**xXx**-]]></dc:creator><pubDate>Wed, 19 May 2004 11:27:23 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 11:40:18 GMT]]></title><description><![CDATA[<p>danke für den Tip, aber jetzt erscheint eine andere Fehlermeldung:</p>
<p>&quot;Sie wollen den NULL-Wert einer Variablen zuweisen, die nicht den Datentyp Variant hat&quot;</p>
<p>Das kann doch alles nicht sein...ein Fehhler in der Datenbank kann ja eigentlich nicht vorliegen, das ist ein ganz normales Feld.</p>
<p>Cya</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523375</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523375</guid><dc:creator><![CDATA[Andre1234]]></dc:creator><pubDate>Wed, 19 May 2004 11:40:18 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 11:59:58 GMT]]></title><description><![CDATA[<p>Hast Du schon mal versucht das Insert-Statement so zu schreiben:</p>
<pre><code>INSERT INTO emails (feldname1, feldname2,...) VALUES(feldwert1, feldwert2,...)
</code></pre>
<p>Und dann einfach in beiden Klammerausdrücken den Autoincrement-Wert weglassen.<br />
Weiß nicht, ob das funktioniert, aber einen Versuch ist es wert.</p>
<p>Gruß,</p>
<p>Alexander</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523382</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523382</guid><dc:creator><![CDATA[Alexander Kempf]]></dc:creator><pubDate>Wed, 19 May 2004 11:59:58 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 12:11:05 GMT]]></title><description><![CDATA[<p>jepp, habe ich auch schon, klappt nicht.</p>
<p>Cya</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523389</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523389</guid><dc:creator><![CDATA[Andre1234]]></dc:creator><pubDate>Wed, 19 May 2004 12:11:05 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 12:29:03 GMT]]></title><description><![CDATA[<p>Hast Du denn schon mal einen solchen Insert-Befehl direkt auf der Datenbank<br />
ausgeführt?</p>
<p>Gruß,</p>
<p>Alexander</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523402</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523402</guid><dc:creator><![CDATA[Alexander Kempf]]></dc:creator><pubDate>Wed, 19 May 2004 12:29:03 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 12:44:57 GMT]]></title><description><![CDATA[<p>könnte ich machen, nur wie? Habe jetzt nicht so den Plan von Access</p>
<p>Cya</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523413</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523413</guid><dc:creator><![CDATA[Andre1234]]></dc:creator><pubDate>Wed, 19 May 2004 12:44:57 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 12:49:58 GMT]]></title><description><![CDATA[<p>Oder mal mit dem SQL-Explorer, der ja zum BCB dazugeliefert (zumindest in der<br />
Enterprise-Version).</p>
<p>Gruß,</p>
<p>Alexander</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523419</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523419</guid><dc:creator><![CDATA[Alexander Kempf]]></dc:creator><pubDate>Wed, 19 May 2004 12:49:58 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 17:04:04 GMT]]></title><description><![CDATA[<p>hmm, habe ich leider nicht, also den SQL Explorer. Habe die 5.0 Enterprise.</p>
<p>Nur so einen SQL Monitor oder so.</p>
<p>Cya</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523592</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523592</guid><dc:creator><![CDATA[Andre1234]]></dc:creator><pubDate>Wed, 19 May 2004 17:04:04 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 17:58:01 GMT]]></title><description><![CDATA[<p>Andre1234 schrieb:</p>
<blockquote>
<p>hmm, habe ich leider nicht, also den SQL Explorer. Habe die 5.0 Enterprise.</p>
</blockquote>
<p>Das ist seltsam. Auf der <a href="http://info.borland.com/techpubs/bcppbuilder/v5/qs/environ.html#123667" rel="nofollow">Borland-Seite</a> habe ich<br />
gelesen, daß der SQL-Explorer (oder Database-Explorer) im BCB5 enthalten ist.<br />
Vielleicht hast Du ihn nicht installiert?</p>
<p>Gruß,</p>
<p>Alexander</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523621</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523621</guid><dc:creator><![CDATA[Alexander Kempf]]></dc:creator><pubDate>Wed, 19 May 2004 17:58:01 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT Befehl und AUTO_INCREMENT (ADO) on Wed, 19 May 2004 19:16:30 GMT]]></title><description><![CDATA[<p>hmm, muss ich am Montag gucken, habe den nur @Work.</p>
<p>wenn jemand anders ne Lösung parat hat bitte melden,</p>
<p>Cya</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523650</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523650</guid><dc:creator><![CDATA[Andre1234]]></dc:creator><pubDate>Wed, 19 May 2004 19:16:30 GMT</pubDate></item></channel></rss>