Database Reference
In-Depth Information
<connectionStrings>
<add
name="Connection1"
providerName="System.Data.SqlClient"
connectionString="Server=tcp:jt4y4mmglp.database.windows.net;
Database=EnzoLog;User ID=test@jt4y4mmglp;
Password=yourPasswordHere;
Trusted_Connection=False;Encrypt=True;"/>
</connectionStrings>
Note Make sure to specify the user ID as < user name >@< server name > .
Go back to the Default.aspx page, and change the SqlDataSource settings as
follows by adding the ConnectionString and the SelectCommand settings
manually.
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:Connection1 %>"
SelectCommand="SELECT uid, name FROM sys.sysusers ORDER BY 1" >
</asp:SqlDataSource>
Running the project should give you output similar to that shown in Figure 9-14.
5.
Figure 9-14. Running the solution locally and fetching data from SQL Azure
So far, you're running this project on the local machine. Although the Windows Azure Tools are
required, this project doesn't use any of the Windows Azure storage options; it connects directly to a live
SQL Azure database.
Search WWH ::




Custom Search