<?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[Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql]]></title><description><![CDATA[<p>Hallo alle zusammen, leider funzt die Suchfunktion bei mir nicht und nach langes suchen habe ich auch nichts gefunden...<br />
Ich habe 2 fragen:<br />
erstens, wie erstelle ich unter mfc ein ordner? File erstellen geht mit CFile::ModeCreate, aber ein ordner???<br />
zweitens, habe ich versucht anhand der mysql API einer Tabelle was ich erstellt habe so zu erstellen dass keine Daten wo der &quot;CODE&quot; gleich ist angenommen werden...</p>
<pre><code class="language-cpp">mysql_query(&amp;mDB,&quot;CREATE TABLE IF NOT EXISTS ct_arten (code VARCHAR(100) NOT NULL,bezde VARCHAR(100) NOT NULL,bezen VARCHAR(100) NOT NULL)&quot;);
mysql_query(&amp;mDB,&quot;ALTER TABLE ct_arten ADD UNIQUE KEY 'code'&quot;);
</code></pre>
<p>Funktioniert aber nicht, was ist daran falsch???</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/62289/ordner-erstellen-amp-unique-befehl-in-mysql</link><generator>RSS for Node</generator><lastBuildDate>Thu, 04 Jun 2026 05:08:46 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/62289.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 Jan 2004 07:42:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Thu, 22 Jan 2004 07:42:24 GMT]]></title><description><![CDATA[<p>Hallo alle zusammen, leider funzt die Suchfunktion bei mir nicht und nach langes suchen habe ich auch nichts gefunden...<br />
Ich habe 2 fragen:<br />
erstens, wie erstelle ich unter mfc ein ordner? File erstellen geht mit CFile::ModeCreate, aber ein ordner???<br />
zweitens, habe ich versucht anhand der mysql API einer Tabelle was ich erstellt habe so zu erstellen dass keine Daten wo der &quot;CODE&quot; gleich ist angenommen werden...</p>
<pre><code class="language-cpp">mysql_query(&amp;mDB,&quot;CREATE TABLE IF NOT EXISTS ct_arten (code VARCHAR(100) NOT NULL,bezde VARCHAR(100) NOT NULL,bezen VARCHAR(100) NOT NULL)&quot;);
mysql_query(&amp;mDB,&quot;ALTER TABLE ct_arten ADD UNIQUE KEY 'code'&quot;);
</code></pre>
<p>Funktioniert aber nicht, was ist daran falsch???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441593</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441593</guid><dc:creator><![CDATA[xyxyxy]]></dc:creator><pubDate>Thu, 22 Jan 2004 07:42:24 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Thu, 22 Jan 2004 08:00:36 GMT]]></title><description><![CDATA[<p>Gib das MySql mal von Hand ein und schreib uns die Fehlermeldung, die dann kommt.</p>
<p>So aus dem Bauch heraus würde ich die '' um code wegnehmen, kann aber grade nirgends nachschauen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441603</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441603</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Thu, 22 Jan 2004 08:00:36 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Thu, 22 Jan 2004 08:28:40 GMT]]></title><description><![CDATA[<p>mmmmhhhhh, wenn ich es unter DOS per Hand eingebe, gibts kein Fehler...<br />
Wenn ich die &quot;&quot; wegmache, interpretiert der Compiler das als c++ code...<br />
Wenn ich mysql_error ausgeben lasse, kommt nur vonwegen mysql error ich soll im buch nachschauen.<br />
Die erste Zeile ist ok. Die tabelle wird erzeugt. Nur die zweite Zeile funzt nicht...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441621</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441621</guid><dc:creator><![CDATA[xyxyxy]]></dc:creator><pubDate>Thu, 22 Jan 2004 08:28:40 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Thu, 22 Jan 2004 08:30:09 GMT]]></title><description><![CDATA[<p>Ach ja, die '' um code habe ich auch weggemacht, nutzt aber nichts...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441623</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441623</guid><dc:creator><![CDATA[xyxyxy]]></dc:creator><pubDate>Thu, 22 Jan 2004 08:30:09 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Thu, 22 Jan 2004 08:33:19 GMT]]></title><description><![CDATA[<p>Ich meinte ja auch nicht _die_ &quot;&quot; sondern die ''.</p>
<p>Also, hier deine Zeile:</p>
<pre><code class="language-cpp">mysql_query(&amp;mDB,&quot;ALTER TABLE ct_arten ADD UNIQUE KEY 'code'&quot;);
</code></pre>
<p>Und hier meine:</p>
<pre><code class="language-cpp">mysql_query(&amp;mDB,&quot;ALTER TABLE ct_arten ADD UNIQUE KEY code&quot;);
</code></pre>
<p>Aber wo ich deine Zeile so anschaue, wieso meckert der Compiler nicht? Die müßte doch so aussehen:</p>
<pre><code class="language-cpp">mysql_query(&amp;mDB,&quot;ALTER TABLE ct_arten ADD UNIQUE KEY \'code\'&quot;);
</code></pre>
<p>Und was sagt das Buch eigentlich dazu? Naja, ich guck mal...</p>
<p>PS: Das hier stimmt mich nachdenklich: <a href="http://developer2.akopia.com/archive/interchange-users/1999/msg08130.html" rel="nofollow">http://developer2.akopia.com/archive/interchange-users/1999/msg08130.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/441624</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441624</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Thu, 22 Jan 2004 08:33:19 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Thu, 22 Jan 2004 13:18:06 GMT]]></title><description><![CDATA[<p>Weiß keiner woran es liegt???<br />
Und was ordner erstellen angeht, weiß auch keiner???</p>
<p>MfG<br />
Samuel</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441847</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441847</guid><dc:creator><![CDATA[xyxyxy]]></dc:creator><pubDate>Thu, 22 Jan 2004 13:18:06 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Thu, 22 Jan 2004 13:50:48 GMT]]></title><description><![CDATA[<p>Platform SDK: Files and I/O<br />
CreateDirectory<br />
The CreateDirectory function creates a new directory. If the underlying file system supports security on files and directories, the function applies a specified security descriptor to the new directory.</p>
<p>To specify a template directory, use the CreateDirectoryEx function.</p>
<p>BOOL CreateDirectory(<br />
LPCTSTR lpPathName, // directory name<br />
LPSECURITY_ATTRIBUTES lpSecurityAttributes // SD<br />
);<br />
Parameters<br />
lpPathName<br />
[in] Pointer to a null-terminated string that specifies the path of the directory to be created.<br />
There is a default string size limit for paths of 248 characters. This limit is related to how the CreateDirectory function parses paths.</p>
<p>Windows NT/2000: An application can transcend this limit and send in paths longer than MAX_PATH characters by calling the wide (W) version of CreateDirectory and prepending &quot;\?\&quot; to the path. The &quot;\?\&quot; tells the function to turn off path parsing; it lets paths longer than MAX_PATH be used with CreateDirectoryW. However, each component in the path cannot be more than MAX_PATH characters long. This also works with UNC names. The &quot;\?\&quot; is ignored as part of the path. For example, &quot;\?\C:\myworld\private&quot; is seen as &quot;C:\myworld\private&quot;, and &quot;\?\UNC\bill_g_1\hotstuff\coolapps&quot; is seen as &quot;\\bill_g_1\hotstuff\coolapps&quot;.</p>
<p>lpSecurityAttributes<br />
Windows NT/2000: [in] Pointer to a SECURITY_ATTRIBUTES structure. The lpSecurityDescriptor member of the structure specifies a security descriptor for the new directory. If lpSecurityAttributes is NULL, the directory gets a default security descriptor. The target file system must support security on files and directories for this parameter to have an effect.<br />
Return Values<br />
If the function succeeds, the return value is nonzero.</p>
<p>If the function fails, the return value is zero. To get extended error information, call GetLastError.</p>
<p>Remarks<br />
Some file systems, such as NTFS, support compression or encryption for individual files and directories. On volumes formatted for such a file system, a new directory inherits the compression and encryption attributes of its parent directory.</p>
<p>Windows NT/2000: An application can obtain a handle to a directory by calling CreateFile with the FILE_FLAG_BACKUP_SEMANTICS flag set. For a code example, see CreateFile.</p>
<p>MAPI: For more information, see Syntax and Limitations for Win32 Functions Useful in MAPI Development.</p>
<p>Requirements<br />
Windows NT/2000: Requires Windows NT 3.1 or later.<br />
Windows 95/98: Requires Windows 95 or later.<br />
Windows CE: Requires version 1.0 or later.<br />
Header: Declared in winbase.h; include windows.h.<br />
Library: Use kernel32.lib.<br />
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.</p>
<p>See Also<br />
File I/O Overview, File I/O Functions, CreateDirectoryEx, CreateFile, RemoveDirectory, SECURITY_ATTRIBUTES</p>
<p>Built on Monday, August 16, 1999Requirements<br />
Windows NT/2000: Requires Windows NT 3.1 or later.<br />
Windows 95/98: Requires Windows 95 or later.<br />
Windows CE: Requires version 1.0 or later.<br />
Header: Declared in winbase.h; include windows.h.<br />
Library: Use kernel32.lib.<br />
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.<br />
See Also<br />
File I/O Overview, File I/O Functions, CreateDirectoryEx, CreateFile, RemoveDirectory, SECURITY_ATTRIBUTES</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441885</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441885</guid><dc:creator><![CDATA[CLoop]]></dc:creator><pubDate>Thu, 22 Jan 2004 13:50:48 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Thu, 22 Jan 2004 13:57:51 GMT]]></title><description><![CDATA[<p>Danke schon mal... Die erste Frage ist wohl erledigt...<br />
Ja, ja MSDN!!! Peinlich, peinlich dass ich es nicht gefunden habe!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441896</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441896</guid><dc:creator><![CDATA[xyxyxy]]></dc:creator><pubDate>Thu, 22 Jan 2004 13:57:51 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Thu, 22 Jan 2004 14:06:26 GMT]]></title><description><![CDATA[<p>Am Anfang habe ich in der MSDN auch nichts gefunden. Irgendwie gewöhnungsbedürftig das Ding.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441903</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441903</guid><dc:creator><![CDATA[CLoop]]></dc:creator><pubDate>Thu, 22 Jan 2004 14:06:26 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Thu, 22 Jan 2004 14:49:21 GMT]]></title><description><![CDATA[<p>Mit den Querys passt immer noch nicht. Ich weiß nicht was ich noch machen soll...</p>
<p>Vielen Dank für eure Geduld...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441943</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441943</guid><dc:creator><![CDATA[xyxyxy]]></dc:creator><pubDate>Thu, 22 Jan 2004 14:49:21 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Thu, 22 Jan 2004 21:29:29 GMT]]></title><description><![CDATA[<p>ALTER TABLE ct_arten ADD UNIQUE ('code')</p>
]]></description><link>https://www.c-plusplus.net/forum/post/442243</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/442243</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Thu, 22 Jan 2004 21:29:29 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Fri, 23 Jan 2004 14:22:20 GMT]]></title><description><![CDATA[<p>Danke Unix-TOM aber irgendwie will nicht... <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="😡"
    /><br />
Ich habe mit folgendes versucht,</p>
<pre><code class="language-cpp">if (mysql_query(&amp;mDB,&quot;ALTER TABLE ct_arten ADD UNIQUE ('code')&quot;) != NULL)
	AfxMessageBox(mysql_error(&amp;mDB));
</code></pre>
<p>aber irgendwie meckert er ein fehler neben</p>
<pre><code class="language-cpp">'code)'
</code></pre>
<p>...<br />
Ich weiß auch nicht weiter!!!<br />
Das was ich drüber schreibe funktioniert (da wird die tabelle erzeugt)!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/442611</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/442611</guid><dc:creator><![CDATA[xyxyxy]]></dc:creator><pubDate>Fri, 23 Jan 2004 14:22:20 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Fri, 23 Jan 2004 16:41:31 GMT]]></title><description><![CDATA[<p>Gib mal her was mysql_error() dazu sagt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/442725</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/442725</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Fri, 23 Jan 2004 16:41:31 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Fri, 23 Jan 2004 17:14:37 GMT]]></title><description><![CDATA[<p>Danke Unix-Tom für deine Unterstützung...<br />
Ich bin leider nicht mehr auf der Arbeit, kann dir deshalb nicht mehr genau sagen was mysql_error sagt...<br />
Aber wenn ich mich recht erinnere kommt sowas in der Art wie &quot;SQL Syntax Fehler neben 'code')&quot;. Nur was ist falsch neben &quot;'code')&quot; ???<br />
Was näheres kann ich dir am Montag sagen...<br />
Danke schon mal im voraus...</p>
<p>P.S. Warum ist dein Nickname Unix-Tom? Benutzt du irgendeine Unix System? Free-BSD, Open-BSD, Mac vielleicht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/442753</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/442753</guid><dc:creator><![CDATA[xyxyxy]]></dc:creator><pubDate>Fri, 23 Jan 2004 17:14:37 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Sat, 24 Jan 2004 05:51:56 GMT]]></title><description><![CDATA[<p>Begonnen mit SCO-UNIX. Jetzt Linux</p>
]]></description><link>https://www.c-plusplus.net/forum/post/442948</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/442948</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Sat, 24 Jan 2004 05:51:56 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Mon, 26 Jan 2004 07:28:26 GMT]]></title><description><![CDATA[<p>So, nun bin ich wieder auf der Arbeit und die Fehlermeldung von mysql_error lautet:<br />
&quot;You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''code')' at line 1&quot;.</p>
<p>Die Datenbank Version ist die 4.0 und mysql++ API version ist die 1.7.9...</p>
<p>Schon mal dankeschön für eure Mühe...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/444018</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/444018</guid><dc:creator><![CDATA[xyxyxy]]></dc:creator><pubDate>Mon, 26 Jan 2004 07:28:26 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Tue, 27 Jan 2004 07:32:34 GMT]]></title><description><![CDATA[<p>Weiß wirklich keiner was ich da falsch mache???<br />
Ich komme irgendwie nicht weiter und ich brauche es dringend... Ich kann nichts falsches an mein SQL Anweisung feststellen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/444888</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/444888</guid><dc:creator><![CDATA[xyxyxy]]></dc:creator><pubDate>Tue, 27 Jan 2004 07:32:34 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Tue, 27 Jan 2004 10:30:01 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>eigentlich hast du mit so vielen Versuchen schon einen Syntax-Fehler bekommen, so daß ich mich frage, warum du nicht die MySQL-Syntax für den &quot;ALTER TABLE&quot;-Befehl nachliest:</p>
<p><a href="http://www.mysql.de/doc/de/ALTER_TABLE.html" rel="nofollow">http://www.mysql.de/doc/de/ALTER_TABLE.html</a></p>
<p>Wenn du das jetzt genau ansiehst, müßtest du deine bisherigen Versuche klar als Syntax-Fehler erkennen, oder du hast Probleme, die Beschreibung dort zu lesen. Ich würde aufgrund der Beschreibung nur dieses</p>
<p>ALTER TABLE ct_arten ADD UNIQUE (code);</p>
<p>probieren (ohne irgendwelche komischen Hochkommas um den Spaltennamen, aber gut, beim letzten Versuch warst du schon nah dran)! und was kommt dabei heraus (jetzt bin ich gespannt <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>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/445023</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/445023</guid><dc:creator><![CDATA[Probe-Nutzer]]></dc:creator><pubDate>Tue, 27 Jan 2004 10:30:01 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner erstellen &amp;amp; UNIQUE Befehl in Mysql on Tue, 27 Jan 2004 11:08:27 GMT]]></title><description><![CDATA[<p>Manchmal ist man einfach zu doof...<br />
Danke, endlich hat es funktioniert...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/445053</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/445053</guid><dc:creator><![CDATA[xyxyxy]]></dc:creator><pubDate>Tue, 27 Jan 2004 11:08:27 GMT</pubDate></item></channel></rss>