Summary

In this chapter we covered the query technologies available to you in a VB.NET database access application. They include queries that return records and queries that create and change database structures.

Much of what we covered in this chapter doesn't stand on its own it will make much more sense when you start doing application programming with SQL Server and ADO.NET.

Questions and Answers

Q1:

What's with the square brackets?

A1:

Square brackets are often inserted around object names by VS.NET and SQL Server's administration tools. The tools are trying to protect you from problems associated with object names that contain spaces and other reserved characters, as well as reserved words. For example, in the Northwind example database that is installed on most SQL Server 2000 databases, there's a table called Order Details. Ignoring for a moment the question of whether embedding spaces in table names is wise, you must refer to this table as [Order Details] to get SQL Server to recognize it. However, GUI tools such as VS.NET try to insert the square brackets for you whenever they can. We don't generally use them in code listings in this book because square brackets are hard to touch-type and also because we're lazy.

Q2:

What is dbo?

A2:

The dbo qualifier is another of those GUI-driven helpers that often occur in SQL Server programming. It's a way to associate a given database object with the database owner. Objects in the database may be owned by different users; the dbo moniker is a shortcut way to say, "Refer to the one that's owned by the database owner, whoever that may be." In a database objects owned by multiple users isn't common, but it does happen. In databases in which all the objects are owned by dbo, it's okay to drop the reference to dbo if you want (the GUI tools will try to put them back in for you anyway).



Database Access with Visual Basic. NET
Database Access with Visual Basic .NET (3rd Edition)
ISBN: 0672323435
EAN: 2147483647
Year: 2003
Pages: 97

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net