In this chapter, we'll show you how to build a Windows Azure Application that accesses SQL Azure.
Open eclipse, right click the blank of PHP Explorer and select New->Windows Azure PHP Project....
Input the project name demo, click Next button.
In the coming page, fill in the Role name as SQLAzureWebRole and select SQL Azure option in Data Storage Options group. Then fill in all connection parameters for SQL Azure, and click the Test Connection button to see if the connection is ok. Click Finish button to create the project.
After the project is created successfully, you can also change the connection settings for SQL Azure. Right click demo_SQLAzureWebRole project, select properties, in the pop-up dialog, select Windows Azure->Data Storage. You will be presented with a configure dialog.
Edit your login information here (Click here for more information about how to provisioning a SQL Azure Account). Click Test Connection.
The following dialog will pop-up if successfully connected to SQL Azure.
There will be generating sample files (connect.php,SQLAzureSample.php) for you reference.