none
Is ODBC still available for use from C++ in Visual Studio 2015? Is there a 64bit driver for accessing SQL Server? RRS feed

  • Question

  • Hi,

    Knowing that there are alternate ways to communicate/access SQL Server, like OLE-DB and native client access, is ODBC still the main way to access SQL databases (both in SQLServer and other brands like ORACLE)?

    Do we have good examples in C++ for these? do we need a 64bit driver for this? Is one available?

    Regards,

    Juan Dent


    Juan Dent


    • Edited by Juan Dent Sunday, May 8, 2016 3:14 PM
    Sunday, May 8, 2016 3:13 PM

Answers

  • Microsoft recommends ODBC for SQL Server access from native (unmanaged) code.  As mentioned in the announcement in this forum (https://social.msdn.microsoft.com/Forums/en-US/e696d0ac-f8e2-4b19-8a08-7a357d3d780f/microsoft-is-aligning-with-odbc-for-native-relational-data-access-faq?forum=sqldataaccess), OLE DB should not be used for new development in favor of ODBC.

    The latest released Windows SQL Server ODBC driver is ODBC Driver 11 for SQL Server (https://msdn.microsoft.com/en-us/library/jj730314%28v=sql.110%29.aspx?f=255&MSPPError=-2147217396).  ODBC Driver 13 for SQL Server is in currently in preview.  SQL Server Native Client includes both an ODBC driver and OLE DB provider.  However, SQL Server 2012 was the last SQL Server Native Client to ship.  These all have 64-bit versions available.

    Most DBMS products provide ODBC drivers for their product.


    Dan Guzman, Data Platform MVP, http://www.dbdelta.com

    • Marked as answer by Juan Dent Monday, May 9, 2016 1:18 AM
    Sunday, May 8, 2016 6:55 PM
    Moderator

All replies

  • Microsoft recommends ODBC for SQL Server access from native (unmanaged) code.  As mentioned in the announcement in this forum (https://social.msdn.microsoft.com/Forums/en-US/e696d0ac-f8e2-4b19-8a08-7a357d3d780f/microsoft-is-aligning-with-odbc-for-native-relational-data-access-faq?forum=sqldataaccess), OLE DB should not be used for new development in favor of ODBC.

    The latest released Windows SQL Server ODBC driver is ODBC Driver 11 for SQL Server (https://msdn.microsoft.com/en-us/library/jj730314%28v=sql.110%29.aspx?f=255&MSPPError=-2147217396).  ODBC Driver 13 for SQL Server is in currently in preview.  SQL Server Native Client includes both an ODBC driver and OLE DB provider.  However, SQL Server 2012 was the last SQL Server Native Client to ship.  These all have 64-bit versions available.

    Most DBMS products provide ODBC drivers for their product.


    Dan Guzman, Data Platform MVP, http://www.dbdelta.com

    • Marked as answer by Juan Dent Monday, May 9, 2016 1:18 AM
    Sunday, May 8, 2016 6:55 PM
    Moderator
  • Finally!

    A straight answer to what's going on with unmanaged C++ data access to SQL Server and Azure, etc.

    THANK YOU for giving me much needed direction.

    Jim Kay

    Saturday, March 11, 2017 7:32 AM