MSSQL Accounts and Demo
Get MSSQL Account
create your own database
MSSQL Security allow mssql user access to your database
Tools
Microsoft SQL Server Management Studio
- Microsoft's tool to manage SQL databases
SQL Server Configuration Manager
- Manage SQL server Services, Protocols and Alias
osql
- command line interface to SQL server
DataBases
CREATE DATABASE database_name
We are going to use Microsoft Web Platform Installer 3.0 http://www.microsoft.com/web/downloads/platform.aspx to install SQL Server Express.
Connect to SQL Server From Home
Stored Procedures
- A stored procedure is a collection of compiled Transact-SQL statements that can take and return user-supplied parameters.
Views
- A view is simply a SELECT query saved in the database. Thus, most operations you can perform on queries you can also perform on views. However, there are some operations that apply only to one or the other. -MSSQL Help
ADO.NET
Connection The ASP.NET connection object is used to connenect to data providers.</p>
Providers from <a href="http://msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp?contentid=28001860">UDA - Universal Data Access</a> old providers DAO (Data Access Objects) RDS (Remote Data Objects) ODBC.NET - ODBC (Open Database Connectivity) you can still use ODBC you need to download ODBC.NET from <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6ccd8427-1017-4f33-a062-d165078e32b1&DisplayLang=en">MS</a> Current Providers OLE DB .NET Data Provider
<%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.OleDb" %> <script Language="c#" runat="server"> void Page_Load() { string strConnection = "Provider=Microsoft.Jet.OleDb.4.0;"; strConnection += @"Data Source=C:\infod\dangerdanger\northwind.mdb"; OleDbConnection objConnection = new OleDbConnection(strConnection); objConnection.Open(); }
SQL Server .NET Data Provider
<%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SqlClient" %> void Page_Load() { string strConnection = "user id=student;password=student;"; strConnection += @"initial catalog=northwind;data source=DIRK\DIRK_PUBLIC;"; strConnection += "Connect Timeout=30"; SqlConnection objConnection = new SqlConnection(strConnection); objConnection.Open(); }
objects
Object | Description |
---|---|
Connection | Establishes a connection to a specific data source. |
Command | Executes a command against a data source. |
DataReader | Reads a forward-only, read-only stream of data from a data source. |
DataAdapter | Populates a DataSet and resolves updates with the data source. |