Search code examples
sqlasp-classicazureazure-sql-databaseresponse.write

SQL Azure data not writing?


I'm new to Azure, and exploring it for my company's internal company site. We've been using a local MS SQL 2008 Express database, which I have setup to sync with Azure for testing. Everything sync perfectly, all the data is there, but for some reason one data point will not come across in my ASP code.

The data point is a pdf filename. I'm not storing the files in the database, just the filename (for now). Everything worked fine on the local SQL server, but since the switch no luck. The odd part is that the if statements still work for the data, it just won't put the filename in a my response.write() method, therefore, it isn't putting the filename in my link for the user to download.

Anyone have ideas?


Solution

  • According to Security Guidelines and Limitations (SQL Azure Database): "SQL Azure Database supports only SQL Server Authentication. Windows Authentication (integrated security) is not supported. Users must provide credentials (login and password) every time they connect to SQL Azure Database."

    So I recommend you change your connection string to this format:

    "Server=avl6qnn22s.database.windows.net;Database=CRMDB;
     User ID=WebSvrAdmin@avl6qnn22s;Password=password;Trusted_Connection=False;"
    

    Also I advise you not to use NVARCHAR(MAX) to store a filename. This will lead to degraded performance. Replace for

    nvarchar(4000)