<?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[Problem mit Variable im ADO Conect]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>habe da mal wieder ein Problem,</p>
<p>Ich erstelle eine Verbindung auf die Datenbank.<br />
Soweit klappt das auch.</p>
<p>Nur wenn ich im connection Sting eine Variable einfüge, dann bringt er mir ne runtime error.</p>
<p>So funktioniert es....<br />
connection-&gt;Open(L&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Nordwind.mdb;&quot; L&quot;&quot;, L&quot;&quot;, L&quot;&quot;, ADODB::adConnectUnspecified);</p>
<p>Und so nicht mehr....<br />
std::string m_strTest = &quot;L\&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Nordwind.mdb;\&quot; L\&quot;\&quot;&quot;;<br />
_bstr_t pfad = m_strTest.c_str();<br />
connection-&gt;Open(pfad, L&quot;&quot;, L&quot;&quot;, ADODB::adConnectUnspecified);</p>
<p>Der Grund ist, ich möchte mir den Datenbanknamen Dynamisch halten.</p>
<p>Hat mir jemand dazu eine Idee ??</p>
<p>Gruß<br />
andy_mann</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/67088/problem-mit-variable-im-ado-conect</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 07:10:08 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/67088.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 05 Mar 2004 13:38:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit Variable im ADO Conect on Fri, 05 Mar 2004 13:38:52 GMT]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>habe da mal wieder ein Problem,</p>
<p>Ich erstelle eine Verbindung auf die Datenbank.<br />
Soweit klappt das auch.</p>
<p>Nur wenn ich im connection Sting eine Variable einfüge, dann bringt er mir ne runtime error.</p>
<p>So funktioniert es....<br />
connection-&gt;Open(L&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Nordwind.mdb;&quot; L&quot;&quot;, L&quot;&quot;, L&quot;&quot;, ADODB::adConnectUnspecified);</p>
<p>Und so nicht mehr....<br />
std::string m_strTest = &quot;L\&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Nordwind.mdb;\&quot; L\&quot;\&quot;&quot;;<br />
_bstr_t pfad = m_strTest.c_str();<br />
connection-&gt;Open(pfad, L&quot;&quot;, L&quot;&quot;, ADODB::adConnectUnspecified);</p>
<p>Der Grund ist, ich möchte mir den Datenbanknamen Dynamisch halten.</p>
<p>Hat mir jemand dazu eine Idee ??</p>
<p>Gruß<br />
andy_mann</p>
]]></description><link>https://www.c-plusplus.net/forum/post/473736</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/473736</guid><dc:creator><![CDATA[andy_mann]]></dc:creator><pubDate>Fri, 05 Mar 2004 13:38:52 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Variable im ADO Conect on Fri, 05 Mar 2004 13:56:10 GMT]]></title><description><![CDATA[<p>Ich weiß zwar nicht was &quot;L&quot; ist, aber vermutlich ein Datentyp oder Konvertierungsmakro? Das darf natürlich nicht in den String mit rein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/473754</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/473754</guid><dc:creator><![CDATA[CodeWalker]]></dc:creator><pubDate>Fri, 05 Mar 2004 13:56:10 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Variable im ADO Conect on Sat, 06 Mar 2004 09:41:12 GMT]]></title><description><![CDATA[<p>Ich Danke Dir,</p>
<p>ich habe jetzt den Inhalt der Nach dem L lpmmt als Variable gehalten.</p>
<p>Trotzdem selber fehler. Runtim error beim ausführen.</p>
<p>Ich kriege es einfach nicht him...</p>
<p>Gruß<br />
andy_mann</p>
]]></description><link>https://www.c-plusplus.net/forum/post/474328</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/474328</guid><dc:creator><![CDATA[andy_mann]]></dc:creator><pubDate>Sat, 06 Mar 2004 09:41:12 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Variable im ADO Conect on Sat, 06 Mar 2004 20:10:56 GMT]]></title><description><![CDATA[<p>Versuch mal:</p>
<pre><code class="language-cpp">#include &lt;atlconv.h&gt; // &lt;= bei ATL-Projekt kann man das weglassen, eh schon included
USES_CONVERSION;
std::string m_strTest = &quot;Provider=Microsoft.Jet.OLEDB.4.0;DataSource=Nordwind.mdb&quot;;
_bstr_t pfad = A2BSTR(m_strTest.c_str());
connection-&gt;Open(pfad, L&quot;&quot;, L&quot;&quot;, ADODB::adConnectUnspecified);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/474683</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/474683</guid><dc:creator><![CDATA[CodeWalker]]></dc:creator><pubDate>Sat, 06 Mar 2004 20:10:56 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Variable im ADO Conect on Sun, 07 Mar 2004 11:36:27 GMT]]></title><description><![CDATA[<p>Hallo CodeWalker,</p>
<p>Danke, jetzt geht es.<br />
Ich dachte schon dass geht gar nicht...</p>
<p>Gruß<br />
andy_mann</p>
]]></description><link>https://www.c-plusplus.net/forum/post/474921</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/474921</guid><dc:creator><![CDATA[andy_mann]]></dc:creator><pubDate>Sun, 07 Mar 2004 11:36:27 GMT</pubDate></item></channel></rss>