none
No OLE DB for SQL Azure?

    Question

  • The web interface to SQL Azure gives 2 connection strings. One for ADO.NET and one for ODBC. None available for OLE DB?
    Thursday, December 10, 2009 7:45 AM

Answers

  • Hello,
    It is a standard SQL Server 2008 Connection string for OleDB.
    You can use with SQL Azure like this:
    OleDbConnection con = new OleDbConnection("Provider=SQLNCLI10; Server=tcp:YOUR_SERVER_NAME.database.windows.net; Database=[YOUR_DB]; Uid=[YOUR_LOGIN_NAME]@[YOUR_SERVER_NAME]; Pwd=[YOUR_PASSWORD];");
                con.Open();
                con.Dispose();
    Just note that you provide the server name two times - one time at the Server porperty of the connection string, and second time with the login name which has to be structured like that:
    login@servername

    Hope this helps.
    • Proposed as answer by Anton StaykovMVP Thursday, December 10, 2009 7:16 PM
    • Marked as answer by daluu Friday, December 11, 2009 6:11 AM
    Thursday, December 10, 2009 7:15 PM
  • OLEDB is not currently supported. This is something we are considering supporting though.  If you have a strong interest in OLEDB support please let us know.

    Rick Negrin
    SQL Azure
    Friday, December 11, 2009 5:59 AM

All replies

  • Hello,
    It is a standard SQL Server 2008 Connection string for OleDB.
    You can use with SQL Azure like this:
    OleDbConnection con = new OleDbConnection("Provider=SQLNCLI10; Server=tcp:YOUR_SERVER_NAME.database.windows.net; Database=[YOUR_DB]; Uid=[YOUR_LOGIN_NAME]@[YOUR_SERVER_NAME]; Pwd=[YOUR_PASSWORD];");
                con.Open();
                con.Dispose();
    Just note that you provide the server name two times - one time at the Server porperty of the connection string, and second time with the login name which has to be structured like that:
    login@servername

    Hope this helps.
    • Proposed as answer by Anton StaykovMVP Thursday, December 10, 2009 7:16 PM
    • Marked as answer by daluu Friday, December 11, 2009 6:11 AM
    Thursday, December 10, 2009 7:15 PM
  • OLEDB is not currently supported. This is something we are considering supporting though.  If you have a strong interest in OLEDB support please let us know.

    Rick Negrin
    SQL Azure
    Friday, December 11, 2009 5:59 AM
  • Thanks for the tip, Anton. That did the trick. Worked in VBScript and with QueryExpress tool.

    Though, it seems the OLEDB connection provides less features over the ODBC one. For example, with QueryExPlus tool, with ODBC connection, I get to see the list of tables and there fields in the tools pseudo object explorer. But with OLEDB connection, I don't get that. But still better than no OLEDB.

    • Edited by daluu Friday, December 11, 2009 6:29 AM clarification
    Friday, December 11, 2009 6:24 AM
  • I would like to suggest that Microsoft add "official" OLEDB support sometime in the future. It's nice to have along with ODBC, more choice for the consumer/user.

    • Edited by daluu Friday, December 11, 2009 6:28 AM clarification
    Friday, December 11, 2009 6:27 AM
  • OLEDB connection string example is in the samples. Probably this would work.

    What does not work is the Microsoft OLE DB provider for ODBC  as it will try to hook up to ODBC DSN.

    I think it will be a nice addition if OLE DB provider is provided(no pun) as it will allow creating Linked Servers.
    mysorian
    Saturday, December 12, 2009 2:32 PM