<?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[Eintrage in eine Access-Datenbank]]></title><description><![CDATA[<p>Huhu zusammen!<br />
Ich habe da ein problem mit meinem kleinen proggi.<br />
Ich will einen Eintrage in eine Access-Datenbank machen.<br />
Geht aber nicht, bei der Insert anweisung bekomme ich dann einen Error!<br />
Debug Assertion Failed!</p>
<pre><code>CString anweisung;
	UpdateData(TRUE);

	CRecordset rs( &amp;db );
	anweisung = &quot;INSERT INTO Kontaktverwaltung (name,vorname,tel_priv) VALUES (' &quot;;
	anweisung += m_name;
	anweisung += &quot; ',' &quot;;
	anweisung += m_vorname;
	anweisung += &quot; ',' &quot;;
	anweisung += m_tele;
	anweisung += &quot; '); &quot;;
	MessageBox(&quot; &quot;+m_name+&quot; , &quot;+m_vorname+&quot; , &quot;+m_tele+&quot; &quot;);
	if (rs.Open( CRecordset::forwardOnly, 
		_T(&quot; INSERT INTO Kontaktverwaltung (name,vorname,tel_priv) VALUES ('&quot;+m_name+&quot;','&quot;+m_vorname+&quot;','&quot;+m_tele+&quot;'); &quot;) ) == 0)
		MessageBox(&quot;Fehler in der  SQL - Abfrage&quot;);
	UpdateData(FALSE);
</code></pre>
<p>Das ist meine Funktion.<br />
Hab schon gesucht im Netz, aber nix wirkliches gefunden.<br />
Kann mir da einer helfen?<br />
Danke schonmal im Vorraus</p>
<p>Greetz GabberMoron</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/73619/eintrage-in-eine-access-datenbank</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 22:10:44 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/73619.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 12 May 2004 08:59:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Eintrage in eine Access-Datenbank on Wed, 12 May 2004 08:59:20 GMT]]></title><description><![CDATA[<p>Huhu zusammen!<br />
Ich habe da ein problem mit meinem kleinen proggi.<br />
Ich will einen Eintrage in eine Access-Datenbank machen.<br />
Geht aber nicht, bei der Insert anweisung bekomme ich dann einen Error!<br />
Debug Assertion Failed!</p>
<pre><code>CString anweisung;
	UpdateData(TRUE);

	CRecordset rs( &amp;db );
	anweisung = &quot;INSERT INTO Kontaktverwaltung (name,vorname,tel_priv) VALUES (' &quot;;
	anweisung += m_name;
	anweisung += &quot; ',' &quot;;
	anweisung += m_vorname;
	anweisung += &quot; ',' &quot;;
	anweisung += m_tele;
	anweisung += &quot; '); &quot;;
	MessageBox(&quot; &quot;+m_name+&quot; , &quot;+m_vorname+&quot; , &quot;+m_tele+&quot; &quot;);
	if (rs.Open( CRecordset::forwardOnly, 
		_T(&quot; INSERT INTO Kontaktverwaltung (name,vorname,tel_priv) VALUES ('&quot;+m_name+&quot;','&quot;+m_vorname+&quot;','&quot;+m_tele+&quot;'); &quot;) ) == 0)
		MessageBox(&quot;Fehler in der  SQL - Abfrage&quot;);
	UpdateData(FALSE);
</code></pre>
<p>Das ist meine Funktion.<br />
Hab schon gesucht im Netz, aber nix wirkliches gefunden.<br />
Kann mir da einer helfen?<br />
Danke schonmal im Vorraus</p>
<p>Greetz GabberMoron</p>
]]></description><link>https://www.c-plusplus.net/forum/post/518728</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/518728</guid><dc:creator><![CDATA[GabberMoron]]></dc:creator><pubDate>Wed, 12 May 2004 08:59:20 GMT</pubDate></item><item><title><![CDATA[Reply to Eintrage in eine Access-Datenbank on Wed, 12 May 2004 09:10:56 GMT]]></title><description><![CDATA[<p>Du kannst Open keine INSERT statement übergben.<br />
CRecordset hat für das da eine AddNew Methode.<br />
Siehe FAQ:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39099" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic.php?t=39099</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/518741</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/518741</guid><dc:creator><![CDATA[CMatt]]></dc:creator><pubDate>Wed, 12 May 2004 09:10:56 GMT</pubDate></item><item><title><![CDATA[Reply to Eintrage in eine Access-Datenbank on Wed, 12 May 2004 09:16:56 GMT]]></title><description><![CDATA[<p>Also muss ich erst Open<br />
dann AddNew();<br />
dann Update();<br />
und dann Close(); machen...<br />
also so hab ich das verstanden....<br />
hmmm ok, das schau ich mir mal an,<br />
wie die Syntax zum AddNew(); und Update();<br />
ist, .....<br />
weiss nämlich net wie ich da den Query einbauen soll <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="😃"
    /></p>
<p>Aber dankeschonmal fuer die schnelle antwort.</p>
<p>Greetz GabberMoron</p>
]]></description><link>https://www.c-plusplus.net/forum/post/518751</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/518751</guid><dc:creator><![CDATA[GabberMoron]]></dc:creator><pubDate>Wed, 12 May 2004 09:16:56 GMT</pubDate></item><item><title><![CDATA[Reply to Eintrage in eine Access-Datenbank on Wed, 12 May 2004 09:22:59 GMT]]></title><description><![CDATA[<p>Sorry für Spam...<br />
kann das gerade net umsetzten am Rechner,<br />
bin net @ home....<br />
aber könnte es so gehen???</p>
<pre><code>if (rs.AddNew(&quot;name&quot;,&quot;vorname&quot;,&quot;tel_priv&quot;),('&quot;+m_name+&quot;','&quot;+m_vorname+&quot;','&quot;+m_tele+&quot;') ) == 0) 
        MessageBox(&quot;Fehler in der  SQL - Abfrage&quot;);
else {
rs.Update();
MessageBox(&quot;Ok wurde gespeichert&quot;);
}
</code></pre>
<p>Oder bin ich da am total falschem Hacken...</p>
<p>Greetz Moron2k</p>
]]></description><link>https://www.c-plusplus.net/forum/post/518756</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/518756</guid><dc:creator><![CDATA[GabberMoron]]></dc:creator><pubDate>Wed, 12 May 2004 09:22:59 GMT</pubDate></item><item><title><![CDATA[Reply to Eintrage in eine Access-Datenbank on Wed, 12 May 2004 09:26:16 GMT]]></title><description><![CDATA[<p>bist total falsch.. faq:</p>
<blockquote>
<p>m_pSet-&gt;AddNew();</p>
<p>Mit diesem Befehl wird ein neuer Datensatz am Ende der DB eingefügt. Nach dieser Zeile kommen die Zuweisungen der Werte an die Member-Variablen der der von CRecordset abgeleiteten Klasse. Sobald alle gewünschten Wert übergeben wurden, wird der Datensatz mit m_pSet-&gt;Update(); in die DB geschrieben.</p>
</blockquote>
<p>das sieht dann z.B so aus:</p>
<pre><code class="language-cpp">rs.AddNew();
rs.m_name = &quot;name&quot;;
rs.m_vorname = &quot;vorname&quot;;
rs.Update();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/518759</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/518759</guid><dc:creator><![CDATA[CMatt]]></dc:creator><pubDate>Wed, 12 May 2004 09:26:16 GMT</pubDate></item><item><title><![CDATA[Reply to Eintrage in eine Access-Datenbank on Wed, 12 May 2004 09:33:26 GMT]]></title><description><![CDATA[<p>Hmmm huch achso<br />
dachte das muss da auch mit rein...<br />
also muss ich garkein query schreiben...</p>
<pre><code>rs.Open (CRecordset::readOnly)
rs.AddNew();
rs.m_name = m_name;
rs.m_vorname = m_vorname;
rs.m_tele = m_tele;
if (rs.Update() == 0) 
        MessageBox(&quot;Fehler in der  SQL - Abfrage&quot;); 
else { 
MessageBox(&quot;Ok wurde gespeichert&quot;); 
}
rs.Close();
</code></pre>
<p>Hmmm und wenn ich das richtig verstanden habe, sollte das da oben dann<br />
wohl nun richtig sein....</p>
<p>Danke aber nochmal fuer die Antwort</p>
<p>Greetz GabberMoron</p>
]]></description><link>https://www.c-plusplus.net/forum/post/518770</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/518770</guid><dc:creator><![CDATA[GabberMoron]]></dc:creator><pubDate>Wed, 12 May 2004 09:33:26 GMT</pubDate></item><item><title><![CDATA[Reply to Eintrage in eine Access-Datenbank on Wed, 12 May 2004 10:20:35 GMT]]></title><description><![CDATA[<p>bis auf das problem, dass dein Recordset readOnly geöffnet wurde (was sich mit AddNew/Update nicht richtug versteht) sollte es so klappen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/518824</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/518824</guid><dc:creator><![CDATA[CMatt]]></dc:creator><pubDate>Wed, 12 May 2004 10:20:35 GMT</pubDate></item><item><title><![CDATA[Reply to Eintrage in eine Access-Datenbank on Wed, 12 May 2004 10:41:38 GMT]]></title><description><![CDATA[<p>Ach du scheisse bin ich ein pansen....<br />
dann nehm ich halt eben forward only...<br />
ich teste das zuhause dann ma<br />
wenn es funzt schreib ich die Lösung nochmal hierrein,<br />
damit andere net nochmal fragen müssen.</p>
<p>Danke nochmal fuer deine Schnelle und Gute Hilfe</p>
<p>Greetz GabberMoron</p>
]]></description><link>https://www.c-plusplus.net/forum/post/518841</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/518841</guid><dc:creator><![CDATA[GabberMoron]]></dc:creator><pubDate>Wed, 12 May 2004 10:41:38 GMT</pubDate></item><item><title><![CDATA[Reply to Eintrage in eine Access-Datenbank on Wed, 12 May 2004 10:54:49 GMT]]></title><description><![CDATA[<p>Hier werden Sie geholfen.</p>
<p><a href="http://www.sensorme.de/dateien/odbc.zip" rel="nofollow">www.sensorme.de/dateien/odbc.zip</a></p>
<p>Dies ist eine ODBC-Klasse für Vc++ 7.1 . Hat fast diue gleichen Methoden wie meine Mysql-Wrapper. Für Source brauchst du nur im Forum zu suchen da es fast der gleiche ist wie für ODBC.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/518854</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/518854</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Wed, 12 May 2004 10:54:49 GMT</pubDate></item><item><title><![CDATA[Reply to Eintrage in eine Access-Datenbank on Wed, 12 May 2004 15:49:19 GMT]]></title><description><![CDATA[<p>Hmmm ok<br />
bin nun zuhaus, hab das auch ma aus probiert</p>
<pre><code>CRecordset rs( &amp;db );

	if ( rs.Open (CRecordset::forwardOnly,_T (&quot;SELECT * FROM Kontaktverwaltung&quot;)) == 0)
	{
		MessageBox(&quot;Connect nicht erfolgreich!&quot;);
	} else {
		rs.AddNew(); 
		rs.name = m_name; 
		rs.vorname = m_vorname; 
		rs.tel_priv = m_tele; 
		if (rs.Update() == 0) 
			MessageBox(&quot;Fehler in der  SQL - Abfrage&quot;); 
		else { 
			MessageBox(&quot;Ok wurde gespeichert&quot;); 
		}
	}	 
	rs.Close();
</code></pre>
<p>Das geht aber auch net da gibt der mir 3 Fehler...</p>
<p>error C2059: Syntaxfehler : 'constant' (bei <a href="http://rs.name" rel="nofollow">rs.name</a>)<br />
error C2059: Syntaxfehler : 'constant' (bei rs.vorname)<br />
error C2039: 'tel_priv' : Ist kein Element von 'CRecordset'</p>
<p>So mit dem constant komm ich absolut net klar, und sonst irgendwie auch net....<br />
ich raff das alles nicht.<br />
Hab ich da irgendwo einen denk Fehler oder bin ich einfach zu blöd dafür?</p>
<p>Greetz GabberMoron</p>
]]></description><link>https://www.c-plusplus.net/forum/post/519108</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/519108</guid><dc:creator><![CDATA[GabberMoron]]></dc:creator><pubDate>Wed, 12 May 2004 15:49:19 GMT</pubDate></item><item><title><![CDATA[Reply to Eintrage in eine Access-Datenbank on Thu, 13 May 2004 07:26:08 GMT]]></title><description><![CDATA[<p>Hast du die <strong>m_</strong> vor den Recordsetvariablen vergessen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/519433</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/519433</guid><dc:creator><![CDATA[isabeau]]></dc:creator><pubDate>Thu, 13 May 2004 07:26:08 GMT</pubDate></item><item><title><![CDATA[Reply to Eintrage in eine Access-Datenbank on Thu, 13 May 2004 10:35:40 GMT]]></title><description><![CDATA[<p>Wie leg ich den die Recordset Variablen fest?<br />
Muss ich das ins Public der Recordset Class schreiben?<br />
CRecordset name;<br />
CRecordset vorname;<br />
CRecordset tel_priv;</p>
<p>Oder wie muss ich das machen?</p>
<p>Greetz GabberMoron</p>
]]></description><link>https://www.c-plusplus.net/forum/post/519548</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/519548</guid><dc:creator><![CDATA[GabberMoron]]></dc:creator><pubDate>Thu, 13 May 2004 10:35:40 GMT</pubDate></item><item><title><![CDATA[Reply to Eintrage in eine Access-Datenbank on Thu, 13 May 2004 10:49:45 GMT]]></title><description><![CDATA[<p>ok hab das nun gemacht.<br />
Programm Startet auch .....<br />
dann spackt der aber ab...</p>
<pre><code class="language-csharp">MessageBox(&quot;Hier gehts noch&quot;);
rs.AddNew(); 
rs.p_name = m_name; 
rs.p_vorname = m_vorname; 
rs.p_tel_priv = m_tele;
MessageBox(&quot;Hier gehts noch&quot;);
</code></pre>
<p>Irgendwo da, weil die 2. MessageBox nicht kommt. Die 1. aber,<br />
so und ich hab nun ma wieder keine Ahnung wo der Fehler liegt....<br />
Oder kann es sein, das meine Access DB irgendwie im Arsch ist....<br />
weil ich bekomm immer das selbe.<br />
irgendsoein Speicher Problem glaube ich...</p>
<p>Debug Assertion failed!</p>
<p>Kann mir einer helfen? <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="😃"
    /></p>
<p>Greetz GabberMoron</p>
]]></description><link>https://www.c-plusplus.net/forum/post/519556</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/519556</guid><dc:creator><![CDATA[GabberMoron]]></dc:creator><pubDate>Thu, 13 May 2004 10:49:45 GMT</pubDate></item></channel></rss>