none
Connecting ASP (Classic) to an Azure database RRS feed

  • Question

  • My technical group and I have been unable to connect our ASP application to our Azure database. We have tried all the following

    a) Ensuring our database is operable by connecting to it with SQL Server Management Studio

    b) Opening the correct ports by using Windows Firewall after RDP into the VM

    c) Used Azure to mark database endpoints for the VM

    d) We also created another login on our master database and used those to create a user on the database we wanted to connect to 

    e) We also tried a DSN

    None of these approaches worked. 

    Using the DSN, we received the error:

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC SQL Server Driver][SQL Server]'' is an invalid name because it contains a NULL character or an invalid unicode character.

    Using SQL Native Client, we received the error:

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    Any help or thoughts would be much appreciated.

    Thursday, May 21, 2015 4:26 AM

Answers

All replies

  • Hi ,,

    Did you checked these guidelines 

    The following guidelines apply to SQL Database connections using ODBC:

    • When using SQL Server Native Client from SQL Server 2008 R2 or SQL Server 2008, the connection string must include the server name as part of the user name (user@server).
    • You must use TCP/IP as the protocol when connecting to an Azure SQL Database.
    • You cannot create a table in the master database, so therefore you must create a user database to create a table.
    • You cannot execute a use database command to switch to your user database. You must disconnect and connect directly to the user database.
    • You must have a primary key or clustered index on your table to be able to insert data.


    Vishnu VG

    Thursday, May 21, 2015 5:29 AM
  • Thanks very much for the reply. Yes, I have ascertained that all those requirements have been met.  

    We are still getting the same errors.  I know ASP is not supported by Azure (WHAT?!) but was hoping that someone has created a workaround.


    Thursday, May 21, 2015 5:35 AM
  • Has anyone connected Classic ASP on an Azure VM to an Azure SQL Server db?  Or can I get confirmation from Microsoft that this is not supported?  



    Monday, May 25, 2015 9:35 PM
  • Hi,

    Which version od SNAC are you using?  Since Classic ASP uses OLE DB to connect to SQL, it's important to use the latest SNAC11, since older versions will not work.

    Thanks


    Lfsantos

    Tuesday, May 26, 2015 5:12 PM
  • Hi dfgsdfgsdfgsdfgsdgf,

    Please have a check on the below thread and check if it helps. It has a similar discussion.

    http://stackoverflow.com/questions/30355118/connecting-asp-on-azure-virtual-machine-to-azure-db

    Regards,

    Mekh.

    Wednesday, May 27, 2015 8:15 AM
    Moderator