Database Reference
In-Depth Information
}
}
4.
Run the project, and click the ODBC button. As in the previous example, the
list box populates with the names from the Users table. The grid also populates
with the same set of names (see Figure 6-2).
Figure 6-2. Finished form with data
From these examples, you can see that connecting to and querying SQL Azure is no different from
connecting to a local instance of SQL Server. The end of this chapter discusses some guidelines and best
practices to help you prepare for your move to SQL Azure.
So far we have discussed connecting with ADO.NET and ODBC along with the different options we
have with each, so let's continue the discussion and talk about using the SqlCmd utility.
Sqlcmd
If you've worked with SQL Server for any length of time, chances are you've worked with the sqlcmd
utility. This utility lets you enter and execute T-SQL statements and other objects via a command
prompt. You can also use the sqlcmd utility via the Query Editor in sqlcmd mode, in a Windows script
file, or via a SQL Server Agent job.
Search WWH ::




Custom Search