<?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[MSSQL per Hand]]></title><description><![CDATA[<p>Hi,<br />
wie kann ich den Zugriff auf einen MSSQL-Server ohne zuhilfenahme der MFC anstellen - so in der Art von PHP &amp; MySql (mysql_query)?</p>
<p>Danke schon mal</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/17001/mssql-per-hand</link><generator>RSS for Node</generator><lastBuildDate>Fri, 01 May 2026 21:01:55 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/17001.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 28 Apr 2003 09:08:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MSSQL per Hand on Mon, 28 Apr 2003 09:08:00 GMT]]></title><description><![CDATA[<p>Hi,<br />
wie kann ich den Zugriff auf einen MSSQL-Server ohne zuhilfenahme der MFC anstellen - so in der Art von PHP &amp; MySql (mysql_query)?</p>
<p>Danke schon mal</p>
]]></description><link>https://www.c-plusplus.net/forum/post/95125</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/95125</guid><dc:creator><![CDATA[SQL]]></dc:creator><pubDate>Mon, 28 Apr 2003 09:08:00 GMT</pubDate></item><item><title><![CDATA[Reply to MSSQL per Hand on Mon, 28 Apr 2003 09:42:00 GMT]]></title><description><![CDATA[<p>entweder über ODBC oder die entsprechende DB-C-Lib des MSSQL-SDK - die funktionen fangen mit dbXXXX an und sind allesamt im MSDN beschrieben ...</p>
<p>RockNix ///</p>
<p>[ Dieser Beitrag wurde am 28.04.2003 um 11:44 Uhr von <strong>RockNix</strong> editiert. ]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/95126</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/95126</guid><dc:creator><![CDATA[RockNix]]></dc:creator><pubDate>Mon, 28 Apr 2003 09:42:00 GMT</pubDate></item><item><title><![CDATA[Reply to MSSQL per Hand on Mon, 28 Apr 2003 09:46:00 GMT]]></title><description><![CDATA[<p>aus dem MSDN ein EX:</p>
<p>The following example shows the basic framework of many DB-Library for C applications. The program connects to SQL Server, sends a Transact-SQL SELECT statement to SQL Server, and processes the set of rows resulting from the SELECT.</p>
<p>For information about defining the target operating system prior to compiling your application, see Building Applications.</p>
<pre><code class="language-cpp">#define DBNTWIN32
#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;
#include &lt;sqlfront.h&gt;
#include &lt;sqldb.h&gt;

// Forward declarations of the error handler and message handler. 
int err_handler(PDBPROCESS, INT, INT, INT, LPCSTR, LPCSTR);
int msg_handler(PDBPROCESS, DBINT, INT, INT, LPCSTR, LPCSTR,
                LPCSTR, DBUSMALLINT);
main()
{
    PDBPROCESS  dbproc;    // The connection with SQL Server. 
    PLOGINREC   login;     // The login information. 
    DBCHAR      name[100];
    DBCHAR      city[100];

    // Install user-supplied error- and message-handling functions.
    dberrhandle (err_handler);
    dbmsghandle (msg_handler);

    // Initialize DB-Library.
    dbinit ();

    // Get a LOGINREC.
    login = dblogin ();
    DBSETLUSER (login, &quot;my_login&quot;);
    DBSETLPWD (login, &quot;my_password&quot;);
    DBSETLAPP (login, &quot;example&quot;);

    // Get a DBPROCESS structure for communication with SQL Server. 
    dbproc = dbopen (login, &quot;my_server&quot;);

    // Retrieve some columns from the &quot;authors&quot; table in the
    // &quot;pubs&quot; database.

    // First, put the command into the command buffer. 
    dbcmd (dbproc, &quot;select au_lname, city from pubs..authors&quot;);
    dbcmd (dbproc, &quot; where state = 'CA' &quot;);

    // Send the command to SQL Server and start execution. 
    dbsqlexec (dbproc);

    // Process the results. 
    if (dbresults (dbproc) == SUCCEED)
    {
        // Bind column to program variables. 
        dbbind (dbproc, 1, NTBSTRINGBIND, 0, name);
        dbbind (dbproc, 2, NTBSTRINGBIND, 0, city);

        // Retrieve and print the result rows. 
        while (dbnextrow (dbproc) != NO_MORE_ROWS)
        {
            printf (&quot;%s from %s\n&quot;, name, city);
        }
    }

    // Close the connection to SQL Server. 
    dbexit ();

    return (0);
}

int err_handler (PDBPROCESS dbproc, INT severity,
    INT dberr, INT oserr, LPCSTR dberrstr, LPCSTR oserrstr)
{
    printf (&quot;DB-Library Error %i: %s\n&quot;, dberr, dberrstr);
    if (oserr != DBNOERR)
    {
        printf (&quot;Operating System Error %i: %s\n&quot;, oserr, oserrstr);
    }
    return (INT_CANCEL);
}

int msg_handler (PDBPROCESS dbproc, DBINT msgno, INT msgstate,
    INT severity, LPCSTR msgtext, LPCSTR server,
    LPCSTR procedure, DBUSMALLINT line)
{
    printf (&quot;SQL Server Message %ld: %s\n&quot;, msgno, msgtext);
    return (0);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/95127</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/95127</guid><dc:creator><![CDATA[RockNix]]></dc:creator><pubDate>Mon, 28 Apr 2003 09:46:00 GMT</pubDate></item><item><title><![CDATA[Reply to MSSQL per Hand on Mon, 28 Apr 2003 10:42:00 GMT]]></title><description><![CDATA[<p>Steht da auch, welche LIBs man inkluden muss?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/95128</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/95128</guid><dc:creator><![CDATA[SQL]]></dc:creator><pubDate>Mon, 28 Apr 2003 10:42:00 GMT</pubDate></item><item><title><![CDATA[Reply to MSSQL per Hand on Mon, 28 Apr 2003 10:44:00 GMT]]></title><description><![CDATA[<p><a href="http://www.mysql.com/products/mysql++/index.html" rel="nofollow">http://www.mysql.com/products/mysql++/index.html</a></p>
<p>da findest du mehr Infos...</p>
<p>ciao<br />
<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>
]]></description><link>https://www.c-plusplus.net/forum/post/95129</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/95129</guid><dc:creator><![CDATA[brain-death]]></dc:creator><pubDate>Mon, 28 Apr 2003 10:44:00 GMT</pubDate></item><item><title><![CDATA[Reply to MSSQL per Hand on Mon, 28 Apr 2003 10:48:00 GMT]]></title><description><![CDATA[<p>öhm, gehts jetzt um MSSQL oder MySQL ?</p>
<p>rocknix ///</p>
]]></description><link>https://www.c-plusplus.net/forum/post/95130</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/95130</guid><dc:creator><![CDATA[RockNix]]></dc:creator><pubDate>Mon, 28 Apr 2003 10:48:00 GMT</pubDate></item><item><title><![CDATA[Reply to MSSQL per Hand on Mon, 28 Apr 2003 10:49:00 GMT]]></title><description><![CDATA[<p>OK, danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/95131</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/95131</guid><dc:creator><![CDATA[SQL]]></dc:creator><pubDate>Mon, 28 Apr 2003 10:49:00 GMT</pubDate></item><item><title><![CDATA[Reply to MSSQL per Hand on Mon, 28 Apr 2003 11:24:00 GMT]]></title><description><![CDATA[<blockquote>
<p>Original erstellt von RockNix:<br />
**öhm, gehts jetzt um MSSQL oder MySQL ?</p>
<p>rocknix ///**</p>
</blockquote>
<p>Stimmt, hab da nicht ganz richtig gelesen, aber ich denk dass die Lib von MySQL auch ganz interessant ist. Vermutlich will er einfach auf einen SQL Server zugreifen...</p>
<p>Wie er will</p>
<p><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>
]]></description><link>https://www.c-plusplus.net/forum/post/95132</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/95132</guid><dc:creator><![CDATA[brain-death]]></dc:creator><pubDate>Mon, 28 Apr 2003 11:24:00 GMT</pubDate></item><item><title><![CDATA[Reply to MSSQL per Hand on Mon, 28 Apr 2003 11:27:00 GMT]]></title><description><![CDATA[<p>Die Lib hatte ich mir vorher schon angesehen, hat mir aber irgendwie nicht zugesagt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/95133</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/95133</guid><dc:creator><![CDATA[SQL]]></dc:creator><pubDate>Mon, 28 Apr 2003 11:27:00 GMT</pubDate></item><item><title><![CDATA[Reply to MSSQL per Hand on Mon, 28 Apr 2003 11:33:00 GMT]]></title><description><![CDATA[<p>also zur lib von MySQL ( ab 4.0) -&gt; habe diese selbst auch schon des öfteren angewandt und kann eigentlich nur sagen, dass sie sehr stabil läuft. ok hier und da ist einiges etwas gewöhnungsbedürftig, aber das hast du schnell im griff und - die ist für LAU <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>RockNix ///</p>
]]></description><link>https://www.c-plusplus.net/forum/post/95134</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/95134</guid><dc:creator><![CDATA[RockNix]]></dc:creator><pubDate>Mon, 28 Apr 2003 11:33:00 GMT</pubDate></item><item><title><![CDATA[Reply to MSSQL per Hand on Tue, 29 Apr 2003 08:04:00 GMT]]></title><description><![CDATA[<p>Wieso kann man nicht mehrmals per</p>
<pre><code>dbcmd(dbproc, &quot;...&quot;);
dbsqlexec(dbproc);
</code></pre>
<p>den gleichen SQL Befehl ausführen? Bei mir schlägt beim zweiten Mal immer dbsqlexec fehl <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 />
BTW: natürlich habe ich dbresults zwischenzeitlich aufgerufen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/95135</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/95135</guid><dc:creator><![CDATA[SQL]]></dc:creator><pubDate>Tue, 29 Apr 2003 08:04:00 GMT</pubDate></item><item><title><![CDATA[Reply to MSSQL per Hand on Sat, 10 Nov 2007 12:02:59 GMT]]></title><description><![CDATA[<p>Welche lib muss man dür einen MSSQL-Server einbinden? Ich bekomme beim Borland-Builder nur jede Menge [Linker Fehler].. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":/"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1400824</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1400824</guid><dc:creator><![CDATA[Moeiii]]></dc:creator><pubDate>Sat, 10 Nov 2007 12:02:59 GMT</pubDate></item></channel></rss>