<?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 in MySQL gibt &amp;quot;Typangabe ist ungültig&amp;quot; zurück]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich komme einfach nicht weiter. Datenbank MySQL 5, ODBCConnector 5.0<br />
Tabelle:<br />
id | integer | primär<br />
edate | date<br />
etime | time<br />
bahn | char</p>
<p>wenn ich nun mit folgendem code einen Insert ausführen möchte bekomme ich eine Exception &quot;...EOleExeption ... Die Typangabe ist ungültig&quot; zurück.</p>
<pre><code>[cpp]try
			{
				bahn = (String)ValueNode-&gt;ChildNodes-&gt;FindNode(n)-&gt;NodeValue;
				//temperatur = (String)ValueNode-&gt;ChildNodes-&gt;FindNode(t)-&gt;NodeValue;
				//druck = (String)ValueNode-&gt;ChildNodes-&gt;FindNode(h)-&gt;NodeValue;
				//temperatur = StringReplace(temperatur,&quot;.&quot;,&quot;,&quot;,TReplaceFlags() &lt;&lt; rfReplaceAll);
				TDateTime dt = Now();	// aktuelle Zeit holen
				// Werte in die Datenbak wegschreiben
				query_environment-&gt;Close();
				query_environment-&gt;SQL-&gt;Clear();
				query_environment-&gt;SQL-&gt;Add(&quot;Insert into tbl_environment(edate, etime, bahn)&quot;);
				query_environment-&gt;SQL-&gt;Add(&quot;VALUES (:edate, :etime,:bahn)&quot;);
				query_environment-&gt;Parameters-&gt;ParamByName(&quot;edate&quot;)-&gt;Value = dt.FormatString(&quot;yyyy.mm.dd&quot;);
				query_environment-&gt;Parameters-&gt;ParamByName(&quot;etime&quot;)-&gt;Value = dt.FormatString(&quot;hh:nn:ss&quot;);
				query_environment-&gt;Parameters-&gt;ParamByName(&quot;bahn&quot;)-&gt;Value = bahn;
				query_environment-&gt;ExecSQL();
			} catch (...) {
			}[/cpp]
</code></pre>
<p>gebe ich die values manuell ein :</p>
<pre><code>query_environment-&gt;SQL-&gt;Add(&quot;VALUES ('2007.12.12', '12:00','bahn1')&quot;);
</code></pre>
<p>dann trägt er die Werte ein <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="🙄"
    /></p>
<p>Ich finde den Fehler einfach nicht. Ich hoffe ihr habt eine Idee wieso das nicht laufen will.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/181775/insert-in-mysql-gibt-quot-typangabe-ist-ungültig-quot-zurück</link><generator>RSS for Node</generator><lastBuildDate>Sat, 15 Aug 2026 19:11:17 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/181775.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 17 May 2007 09:51:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to INSERT in MySQL gibt &amp;quot;Typangabe ist ungültig&amp;quot; zurück on Thu, 17 May 2007 09:54:23 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich komme einfach nicht weiter. Datenbank MySQL 5, ODBCConnector 5.0<br />
Tabelle:<br />
id | integer | primär<br />
edate | date<br />
etime | time<br />
bahn | char</p>
<p>wenn ich nun mit folgendem code einen Insert ausführen möchte bekomme ich eine Exception &quot;...EOleExeption ... Die Typangabe ist ungültig&quot; zurück.</p>
<pre><code>[cpp]try
			{
				bahn = (String)ValueNode-&gt;ChildNodes-&gt;FindNode(n)-&gt;NodeValue;
				//temperatur = (String)ValueNode-&gt;ChildNodes-&gt;FindNode(t)-&gt;NodeValue;
				//druck = (String)ValueNode-&gt;ChildNodes-&gt;FindNode(h)-&gt;NodeValue;
				//temperatur = StringReplace(temperatur,&quot;.&quot;,&quot;,&quot;,TReplaceFlags() &lt;&lt; rfReplaceAll);
				TDateTime dt = Now();	// aktuelle Zeit holen
				// Werte in die Datenbak wegschreiben
				query_environment-&gt;Close();
				query_environment-&gt;SQL-&gt;Clear();
				query_environment-&gt;SQL-&gt;Add(&quot;Insert into tbl_environment(edate, etime, bahn)&quot;);
				query_environment-&gt;SQL-&gt;Add(&quot;VALUES (:edate, :etime,:bahn)&quot;);
				query_environment-&gt;Parameters-&gt;ParamByName(&quot;edate&quot;)-&gt;Value = dt.FormatString(&quot;yyyy.mm.dd&quot;);
				query_environment-&gt;Parameters-&gt;ParamByName(&quot;etime&quot;)-&gt;Value = dt.FormatString(&quot;hh:nn:ss&quot;);
				query_environment-&gt;Parameters-&gt;ParamByName(&quot;bahn&quot;)-&gt;Value = bahn;
				query_environment-&gt;ExecSQL();
			} catch (...) {
			}[/cpp]
</code></pre>
<p>gebe ich die values manuell ein :</p>
<pre><code>query_environment-&gt;SQL-&gt;Add(&quot;VALUES ('2007.12.12', '12:00','bahn1')&quot;);
</code></pre>
<p>dann trägt er die Werte ein <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="🙄"
    /></p>
<p>Ich finde den Fehler einfach nicht. Ich hoffe ihr habt eine Idee wieso das nicht laufen will.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1286655</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1286655</guid><dc:creator><![CDATA[Avalon]]></dc:creator><pubDate>Thu, 17 May 2007 09:54:23 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT in MySQL gibt &amp;quot;Typangabe ist ungültig&amp;quot; zurück on Thu, 17 May 2007 10:24:52 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Überlas doch der Datenbank das richtige Format</p>
<pre><code class="language-cpp">query_environment-&gt;Parameters-&gt;ParamByName(&quot;edate&quot;)-&gt;AsDateTime = dt;
</code></pre>
<p>Ansonsten sehe ich kein Problem.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1286674</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1286674</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 17 May 2007 10:24:52 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT in MySQL gibt &amp;quot;Typangabe ist ungültig&amp;quot; zurück on Thu, 17 May 2007 10:45:53 GMT]]></title><description><![CDATA[<p>hi akari,</p>
<p>edate und etime hab ich auch mal weg gelassen. sollte also nur bahn eintragen. bekomme aber die selbe fehlermeldung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1286685</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1286685</guid><dc:creator><![CDATA[Avalon]]></dc:creator><pubDate>Thu, 17 May 2007 10:45:53 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT in MySQL gibt &amp;quot;Typangabe ist ungültig&amp;quot; zurück on Fri, 18 May 2007 21:38:01 GMT]]></title><description><![CDATA[<p>hi zusammen,</p>
<p>hab das ganze mal mit einer MSSQL datenbank gemacht. dort funzt es einwandfrei (würd mich auch wundern wenn nicht, weil der code ok ist).<br />
WARUM funzt der code nicht bei MySQL ?????</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1287697</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1287697</guid><dc:creator><![CDATA[Avalon]]></dc:creator><pubDate>Fri, 18 May 2007 21:38:01 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT in MySQL gibt &amp;quot;Typangabe ist ungültig&amp;quot; zurück on Tue, 22 May 2007 10:14:39 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich vermute du hast dir die Antwort schon selbst gegeben...</p>
<p>VALUES (2007.12.12, 12:00, bahn1)<br />
oder:<br />
VALUES ('2007.12.12', '12:00','bahn1')</p>
<p>dir fehlen die einfachen Anführungsstriche.</p>
<p>mfg, Micha!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1289731</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1289731</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 22 May 2007 10:14:39 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT in MySQL gibt &amp;quot;Typangabe ist ungültig&amp;quot; zurück on Tue, 22 May 2007 20:29:55 GMT]]></title><description><![CDATA[<p>RandomAccess85 schrieb:</p>
<blockquote>
<p>Hallo,</p>
<p>ich vermute du hast dir die Antwort schon selbst gegeben...</p>
<p>VALUES (2007.12.12, 12:00, bahn1)<br />
oder:<br />
VALUES ('2007.12.12', '12:00','bahn1')</p>
<p>dir fehlen die einfachen Anführungsstriche.</p>
<p>mfg, Micha!</p>
</blockquote>
<p>das hatte ich auch getestet. hatte den string mit den '' ausgegeben. keine chance. <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="😞"
    /><br />
manuell ja, variable nein, variable incl den '' auch nein</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1290163</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1290163</guid><dc:creator><![CDATA[Avalon]]></dc:creator><pubDate>Tue, 22 May 2007 20:29:55 GMT</pubDate></item><item><title><![CDATA[Reply to INSERT in MySQL gibt &amp;quot;Typangabe ist ungültig&amp;quot; zurück on Wed, 23 May 2007 05:14:41 GMT]]></title><description><![CDATA[<p>schau mal <a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-171195-and-start-is-0-and-postdays-is-0-and-postorder-is-asc-and-highlight-is-mysql.html" rel="nofollow">hier</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1290292</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1290292</guid><dc:creator><![CDATA[Linnea]]></dc:creator><pubDate>Wed, 23 May 2007 05:14:41 GMT</pubDate></item></channel></rss>