2

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?

Clockwork-Muse
  • 12,806
  • 6
  • 31
  • 45
hatrickwah
  • 133
  • 1
  • 10
  • Its classic. I've written the entire site in classic. – hatrickwah May 03 '12 at 14:46
  • Perhaps a little bit of relevant code would help us have some ideas? – AnthonyWJones May 03 '12 at 16:30
  • the code is i've tried are <%= col_name %> and <% response.write(col_name) %> on the database side, i'm pulling using col_name=rs("col_name"). This works for all my other table values, just not this one single col. – hatrickwah May 03 '12 at 17:53
  • All little more info, after more digging. I've found that the columns that are NVarChar(Max) are the ones likely to have the problem. Is there any reason this would be? I tend to stay away from MAX but there are some cases where its is preferred. – hatrickwah May 03 '12 at 21:58
  • Since my comment appears to be missing. I found last night after more troubleshooting, the issue only is present when I have the connection to database set to secure, when I disable it, the data comes across with no problems. – hatrickwah May 04 '12 at 16:13

1 Answers1

0

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)
Fernando Correia
  • 21,803
  • 13
  • 83
  • 116