C++ API for SQL Server?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Annonymous Coward

    C++ API for SQL Server?

    I am thinking of embedding SQL Server express ina (native) C++
    application. I am looking for a C++ API for SQE, but cant seem to find
    one ...

    Is there a (ANSI) C++ API for making native calls to SQLServer
    (Express). I am aware of ODBC wrappers, but I'd much rather talk
    directly to the database, without having to go through the ODBC layer.
  • sifobo

    #2
    Re: C++ API for SQL Server?

    On Jun 20, 6:56 pm, Annonymous Coward <m...@home.comw rote:
    I am thinking of embedding SQL Server express ina (native) C++
    application. I am looking for a C++ API for SQE, but cant seem to find
    one ...
    >
    Is there a (ANSI) C++ API for making native calls to SQLServer
    (Express).  I am aware of ODBC wrappers, but I'd much rather talk
    directly to the database, without having to go through the ODBC layer.
    Use SQL DMO. Its got a C++ interface. More information is available in
    the SQL Server 2000 SDK

    Comment

    • Erland Sommarskog

      #3
      Re: C++ API for SQL Server?

      sifobo (info@sifobo.co m) writes:
      On Jun 20, 6:56 pm, Annonymous Coward <m...@home.comw rote:
      >I am thinking of embedding SQL Server express ina (native) C++
      >application. I am looking for a C++ API for SQE, but cant seem to find
      >one ...
      >>
      >Is there a (ANSI) C++ API for making native calls to SQLServer
      >(Express).  I am aware of ODBC wrappers, but I'd much rather talk
      >directly to the database, without having to go through the ODBC layer.
      >
      Use SQL DMO. Its got a C++ interface. More information is available in
      the SQL Server 2000 SDK
      Not a very good piece of advice. DMO is a management API, and is not for
      general data access as far as I know. On top of that, it is deprecated
      and has been replaced with SMO in SQL 2005. SMO is a managed API, so it's
      suitable for Anonymous Coward anyway.

      --
      Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se

      Books Online for SQL Server 2005 at

      Books Online for SQL Server 2000 at

      Comment

      • max graff

        #4
        Re: C++ API for SQL Server?

        On Jun 20, 11:16 pm, Erland Sommarskog <esq...@sommars kog.sewrote:
        sifobo(i...@sif obo.com) writes:
        On Jun 20, 6:56 pm, Annonymous Coward <m...@home.comw rote:
        I am thinking of embedding SQL Server express ina (native) C++
        application. I am looking for a C++ API for SQE, but cant seem to find
        one ...
        >
        Is there a (ANSI) C++ API for making native calls to SQLServer
        (Express).  I am aware of ODBC wrappers, but I'd much rather talk
        directly to the database, without having to go through the ODBC layer.
        >
        Use SQL DMO. Its got a C++ interface. More information is available in
        the SQL Server 2000 SDK
        >
        Not a very good piece of advice. DMO is a management API, and is not for
        general data access as far as I know. On top of that, it is deprecated
        and has been replaced with SMO in SQL 2005. SMO is a managed API, so it's
        suitable for Anonymous Coward anyway.
        >
        --
        Erland Sommarskog, SQL Server MVP, esq...@sommarsk og.se
        >
        Books Online for SQL Server 2005 athttp://www.microsoft.c om/technet/prodtechnol/sql/2005/downloads/books...
        Books Online for SQL Server 2000 athttp://www.microsoft.c om/sql/prodinfo/previousversion s/books.mspx
        Erland, you haven't answered Anonymous's question and called someone's
        advice 'not good'. How useful is that!!

        I agree SMO has superseeded DMO but Anonymous is looking for somehing
        using native C++ and NOT MANAGED C++. So your suggestion is in itself
        faulty and useless on various grounds.

        Anonymous, I have used C++/DMO in my various projects and it works
        just as well for running SQL 2005 as it did for the earlier versions.
        Though Redmond has 'stopped' supporting DMO it still hasn't pulled the
        plug on it.

        Comment

        • Erland Sommarskog

          #5
          Re: C++ API for SQL Server?

          max graff (graff3@hotmail .com) writes:
          Erland, you haven't answered Anonymous's question and called someone's
          advice 'not good'. How useful is that!!
          I posted an answer to the original post in a separate article.

          And even if I don't know a good answer to the question, and someone posts a
          suggestion that I find poor, it can still be helpful if it saves the
          person asking from going in the wrong direction.
          I agree SMO has superseeded DMO but Anonymous is looking for somehing
          using native C++ and NOT MANAGED C++. So your suggestion is in itself
          faulty and useless on various grounds.
          Anonymous Coward asked something closer to the database than ODBC. If we
          overlook the fact that this is difficult to achieve, DMO sits on top of
          something (I guess that is OLE DB), DMO is not the answer to that question.
          DMO is also a specialised API for management and as far as I know, it is
          not intended to be a general API for data access.


          --
          Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se

          Books Online for SQL Server 2005 at

          Books Online for SQL Server 2000 at

          Comment

          • Annonymous Coward

            #6
            Re: C++ API for SQL Server?

            max graff wrote:
            On Jun 20, 11:16 pm, Erland Sommarskog <esq...@sommars kog.sewrote:
            >sifobo(i...@si fobo.com) writes:
            >>On Jun 20, 6:56 pm, Annonymous Coward <m...@home.comw rote:
            >>>I am thinking of embedding SQL Server express ina (native) C++
            >>>applicatio n. I am looking for a C++ API for SQE, but cant seem to find
            >>>one ...
            >>>Is there a (ANSI) C++ API for making native calls to SQLServer
            >>>(Express). I am aware of ODBC wrappers, but I'd much rather talk
            >>>directly to the database, without having to go through the ODBC layer.
            >>Use SQL DMO. Its got a C++ interface. More information is available in
            >>the SQL Server 2000 SDK
            >Not a very good piece of advice. DMO is a management API, and is not for
            >general data access as far as I know. On top of that, it is deprecated
            >and has been replaced with SMO in SQL 2005. SMO is a managed API, so it's
            >suitable for Anonymous Coward anyway.
            >>
            >--
            >Erland Sommarskog, SQL Server MVP, esq...@sommarsk og.se
            >>
            >Books Online for SQL Server 2005 athttp://www.microsoft.c om/technet/prodtechnol/sql/2005/downloads/books...
            >Books Online for SQL Server 2000 athttp://www.microsoft.c om/sql/prodinfo/previousversion s/books.mspx
            >
            Erland, you haven't answered Anonymous's question and called someone's
            advice 'not good'. How useful is that!!
            >
            I agree SMO has superseeded DMO but Anonymous is looking for somehing
            using native C++ and NOT MANAGED C++. So your suggestion is in itself
            faulty and useless on various grounds.
            >
            Anonymous, I have used C++/DMO in my various projects and it works
            just as well for running SQL 2005 as it did for the earlier versions.
            Though Redmond has 'stopped' supporting DMO it still hasn't pulled the
            plug on it.
            Thanks Guys, in the end I settled for SQLAPI which was a light wrapper
            around SS (and other dbs). Fitted the bill perfectly - I'm currently
            running tests....

            Comment

            Working...