... Using theSQLServerDocumentation SQL Server also comes with extensive electronic documentation. To access this documentation, you select Start ➣ Programs ➣ Microsoft SQLServer ➣ ... Books Online. Figure 1.9 shows theSQLServerdocumentation home page. Figure 1.9: SQLServerdocumentation home page You can browse the online books usingthe Contents tab, and you can search ... information usingthe Index and Search tabs. Figure 1.10 shows some of the information for the SELECT statement, which is located in the Transact -SQL reference book. Figure 1.10: SELECT examples documentation...
... the database. Using OPENXML() OPENXML() reads the XML from the document specified by the handle @XmlDocumentId and returns the rows to the INSERT statement. These rows are then added to the ... 2) WITH Customers - remove the XML document from memory EXECUTE sp_xml_removedocument @XmlDocumentId Using theSQLServer OPENXML() Function SQL Server contains a function named ... customers using OPENXML(), and then you'll insert two new rows into the Customers table usingthe values from that XML data. OPENXML() Syntax The OPENXML() function uses the following syntax OPENXML(XmlDocumentHandle...
... Using theSQLServer FOR XML Clause With a standard SQL SELECT statement, you submit your SELECT statement to the database for execution and get results back in the form of rows. SQLServer ... mode, then you must use the BINARY BASE64 option. The Tag column specifies the numeric position of the row in the XML hierarchy. The Parent column identifies the parent, which is 0 in the previous ... retrieve binary data using either the RAW or EXPLICIT mode, then you must use the BINARY BASE64 option. In the examples in this section, I'll use the Employees table of the Northwind database....
... create a nested transaction usingtheSQLServer .NET data provider, but the Begin( ) command that you need is only available with the OLE DB .NET data provider. The SQLServer data provider appears ... when using it. Solution Simulate nested transactions with savepoints when usingtheSQLServer .NET data provider, manage and control the lifetime of the SqlTransaction class, and create the ... variables, and constants using System; using System.Configuration; using System.Windows.Forms; using System.Data; using System.Data.SqlClient; { // Insert the records into the table. if (categoryName1TextBox.Text.Trim(...
... and then browse to that directory usingthe Browse button. Next, you use the Security tab to set the details of how to authenticate the user when accessing SQL Server. I've used the sa SQL ... you access SQLServer via HTTP. Figure 16.6: The IIS Virtual Directory Management for SQLServer console To define a virtual directory, expand the node for your computer usingthe + icon ... the SELECT statement in this URL retrieves two rows from the Customers table. The first part of the URL is http://localhost/Northwind This contains the name of theserver (localhost) and the...
... new SqlConnection(connectionString); // open the database connection usingthe // Open() method of the SqlConnection object mySqlConnection.Open(); // display the properties of the SqlConnection ... a SqlConnection object to connect to the // database, passing the connection string to the constructor SqlConnection mySqlConnection = Using a SqlConnection Object to Connect to a SQLServer ... imported the System.Data.SqlClient namespace, you can create a new SqlConnection object usingthe following statement: SqlConnection mySqlConnection = new SqlConnection(); You can then set the...
... from the PRINT statement The following message was produced: System.Data.SqlClient.SqlError: This is the message from the RAISERROR statement The state of a connection enables you to know the ... event. For example, the following statement registers the StateChangeHandler() method with the StateChange event of the mySqlConnection object: // open mySqlConnection mySqlConnection.Open(); ... create a SqlCommand object SqlCommand mySqlCommand = mySqlConnection.CreateCommand(); // run a PRINT statement mySqlCommand.CommandText = "PRINT 'This is the message from the PRINT...
... Figure 2.1: The Service Manager You select the name of theserver computer on which SQLServer is running in theServer drop-down list box. To start SQL Server, you click the Start/Continue ... some of the tools you use to manage SQL Server. Specifically, you'll learn how to start and stop SQLServerusingthe Service Manager and use the Enterprise Manager to administer SQL Server. ... button. To stop SQL Server, you click the Stop button. You can also use the Service Manager to pause SQL Server, and select whether you want to automatically start SQLServer when the operating...
... You will then specify the type of Command object you are creating-in this case by using the type of ADODB.CommandTypeEnum.adCmdStoredProc. The next step is to create a parameter that the Command ... Executing a SQLServer Stored Procedure By Using ActiveX Data Objects If you are doing an ADO development with client server for backends, then you probably call stored procedures. ... will be the name of the stored procedure, called CustOrdersHist. You can see the T -SQL for CustOrderHist in Listing A.7. This stored procedure returns product names and the total quantity purchased...
... box is available on the Other tab of theserver properties page of the SharePoint Portal Server MMC. Use this check box to prevent users from usingthe SharePoint Portal Server to discuss documents ... Customizing the SharePoint Portal Server Dashboard Site 52 Review 56 Module 8: Usingthe SharePoint Portal Server Dashboard Site Module 8: Usingthe SharePoint Portal Server Dashboard ... whether it is actually configured; it only plugs in theserver name. This can be changed in the SharePoint Portal Server Administration in the Microsoft Management Console (MMC) by using the...
... from ASP.NET using Windows Authentication in SQL Server. Discussion Connecting to a SQLServer database provides two different authentication modes: Windows Authentication Uses the current ... authenticating a connection. SQL Server Authentication Uses a SQLServer login account providing a user ID and password. Integrated security requires that theSQLServer is running on the same computer ... Connecting to SQLServerUsing Integrated Security from ASP.NET Problem You want to coordinate Windows security accounts between an ASP.NET application and SQL Server. Solution Connect to SQL Server...
... types (nchar, nvarchar, and ntext) report double the value of the MaxLength property of the column object. In the example, the ShipCountry column of the Orders table reports MaxLength = 15 (stores ... both the Orders and Order Details tables, the solution adds column length, precision, and scale data for each row in the sp_help result set to a Hashtable keyed on the column name. The code then ... then iterates over the collection of columns in the table and displays the length, precision, and scale for each from the Hashtable. Information from the FillSchema( ) method of the DataAdapter...
... theserver from the Run these agents on this server drop-down list on the Agents property page. All the agents for a given folder must be bound to the same server. Slide Objective To show the ... Besides the benefit of processing business logic on a server, using event scripts provides several other benefits. Module 13: Usingthe Microsoft Exchange Server Event Service 21 Using the ... agents: 1. Start the Exchange Server Administrator program. 2. Locate and select the EventConfig_servername folder, where servername is the server on which the Exchange Server Event Service...
... Recipe 6.4 Using ADO.NET and SQLServer DBMS Transactions Together Problem You need to use a DBMS transaction within a SQLServer stored procedure from an ADO.NET transaction with theSQLServer ... transaction, the transaction count entering the stored procedure is 1. UsingtheSQL BEGIN TRAN command in the stored procedure creates a nested transaction, increasing the transaction count to 2. If the ... from the Northwind sample database. The default view of the table is bound to a data grid on the form. Insert Button.Click Inserts user-entered data for the Categories records into the Northwind...
... access the internal representation of the XML document. The handle is valid for the duration of the connection to theSQLServer or until it is reset. The handle can be invalidated and the associated ... query used to select the nodes in the XML document to be processed The argument for the WITH clause is: SchemaDeclaration The format of the result set. If not supplied, the results are returned ... System.Windows.Forms; using System.Text; using System.IO; [ Team LiB ] Recipe 8.11 Using a Single Stored Procedure to Update Multiple Changes to a SQL Server Database Problem You need to update a SQL Server...