... UseAStoredProcedureWithAParameter, in Listing A. 8. Listing A. 8 basCommandExamples.vb: Calling a Stored Procedure By Using Parameters Sub UseAStoredProcedureWithAParameter(ByVal txtResults As TextBox) Dim cnn As New ADODB.Connection() ... Executing a SQL Server 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. In doing ... use the ADO Command object, as well as the Parameter object if you are passing parameters. You will create a Command object and supply the command text, which in this case will be the name of...
Ngày tải lên: 14/12/2013, 20:16
... Visual Studio .NET to debug SQL Server stored procedures (in both standalone mode and from managed code). Discussion Debugging a stored procedure in standalone mode You can debug a stored procedure ... Team LiB ] Recipe 9.8 Debugging a SQL Server Stored Procedure Problem Given an application that uses a SQL Server stored procedure that is causing errors, you need to debug the stored procedure. ... supply the parameter values on the Run Stored Procedure dialog. Debugging a stored procedure from managed code To debug a stored procedure from managed code, SQL debugging must be enabled for...
Ngày tải lên: 07/11/2013, 13:15
Tài liệu Using a Single Stored Procedure to Update Multiple Changes to a SQL Server Database pdf
... parameters @data and @datadeleted contain an XML representation of a DataSet containing all updated and added records and all deleted records, respectively. These parameters are parsed using the ... Create the DataAdapter. SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM " + TABLENAME, ConfigurationSettings.AppSettings[" ;Sql_ ConnectString"]); // Load the schema ... Form.Load Sets up the sample by creating a DataSet containing the contents of the table using System.Data; using System.Data.SqlClient; private DataSet ds; private const String TABLENAME...
Ngày tải lên: 21/01/2014, 11:20
SQL Server 2000 Administration in 15 Minutes a Week: Administration Fundamentals
... the instance name ( servername\instancename ). Only SQL Server 2000 can act as a named instance, but you can have many named instances operating at the same time. You can also Run SQL Server ... capabilities. Windows 2000 Advanced Server and Datacenter Server add a “load-balancing” capability to clustering. We will be going into how to design and setup clusters in a later article. Instances ... Mode authentication you are asked to provide a password for the system administrator (sa) account. This account is available so you can authenticate as a “sysadmin” via SQL Server Authentication....
Ngày tải lên: 17/10/2013, 09:15
Specifying Locking Hints in a SQL Server Database
... from changing data being read by a user and preventing users from reading data being changed by a user. Locks are acquired and released by user actions; they are managed internally by database ... command. SqlCommand cmd = new SqlCommand(sqlText, conn, tran); // Create the DataAdapter and CommandBuilder. SqlDataAdapter da = new SqlDataAdapter(cmd); SqlCommandBuilder cb = new SqlCommandBuilder(da); ... dataGrid.DataSource = null; [ Team LiB ] Recipe 6.14 Specifying Locking Hints in a SQL Server Database Problem You need to pessimistically lock rows in an underlying SQL Server database....
Ngày tải lên: 17/10/2013, 20:15
Executing SQL Server Stored Procedures phần 1
... Stored Procedure In Chapter 4 , you saw how to create a stored procedure in the SQL Server Northwind database. The procedure you saw was named AddProduct(), and Listing 8.11 shows the AddProduct .sql ... mySqlCommand.Parameters.Add( "@MySupplierID", SqlDbType.Int).Value = 1; mySqlCommand.Parameters.Add( "@MyCategoryID", SqlDbType.Int).Value = 1; mySqlCommand.Parameters.Add( ... your parameter to ParameterDirection.Output. For example: mySqlCommand.Parameters.Add("@MyProductID", SqlDbType.Int); Executing SQL Server Stored Procedures In Chapter 4 , you saw...
Ngày tải lên: 07/11/2013, 10:15
Executing SQL Server Stored Procedures phần 2
... Command object using the ExecuteReader() // method SqlDataReader mySqlDataReader = mySqlCommand.ExecuteReader(); // step 4: read the rows using the DataReader object while (mySqlDataReader.Read()) ... before you can read any output parameters. 6. Read the values of any output parameters. In the following example, you'll see a stored procedure named AddProduct3() that will return a result ... create a Command object and set its CommandText // property to an EXECUTE statement containing the stored // procedure call SqlCommand mySqlCommand = mySqlConnection.CreateCommand(); mySqlCommand.CommandText...
Ngày tải lên: 07/11/2013, 10:15
Tài liệu Specifying Locking Hints in a SQL Server Database doc
... conn.BeginTransaction(IsolationLevel.ReadCommitted); // Create the command. SqlCommand cmd = new SqlCommand(sqlText, conn, tran); // Create the DataAdapter and CommandBuilder. SqlDataAdapter da = new SqlDataAdapter(cmd); ... on a resource. Locks ensure transactional integrity and database consistency by preventing other users from changing data being read by a user and preventing users from reading data being changed ... information about database locks: ã The system stored procedure sp_lock returns a result set containing all active locks. ã The syslockinfo table in the master database contains information about...
Ngày tải lên: 14/12/2013, 18:16
Tài liệu Determining the Length of Columns in a SQL Server Table doc
... SqlDataAdapter da = new SqlDataAdapter(sqlText, conn); // Add table mappings. da.TableMappings.Add("Table", "Orders"); da.TableMappings.Add("Table1", "Order Details"); ... FillSchema( ) method of the DataAdapter is also included. The data type and nullable properties are available using both sp_help and FillSchema( ). For more information about the sp_help system stored ... // Create the DataSet. DataSet ds = new DataSet( ); // Fill the schema and data. da.FillSchema(ds, SchemaType.Mapped); da.Fill(ds); // Iterate over the table collection in the DataSet....
Ngày tải lên: 24/12/2013, 05:15
Design and Implement a SQL Server Database
... thường đó là Default Instance. Một Instance c a SQL Server 2000 có 4 system databases và mt hay nhiu user database. Cỏc system databases bao gm: ã Master : Ch a tất cả những thông tin cấp hệ thống ... AuthID First Name Last Name A1 John Brown A2 Matthew Bortniker A3 Rick Johnson A4 Peter Wright A5 James Moon AuthorBook BookID AuthID 1 A1 2 A2 2 A3 3 A4 3 A5 3 A1 Ngoài ra một trong ... and jobs). Cấu Trúc Vật Lý C a Một SQL Server Database Mỗi một database trong SQL Server đều ch a ít nhất một data file chính (primary), có thể có thêm một hay nhiều data file phụ (Secondary)...
Ngày tải lên: 25/08/2012, 09:00
Design and Implement a SQL Server Database
... user database được tạo ra thì SQL Server sẽ copy toàn bộ các system objects (tables, stored procedures ) từ Model database sang database mi va to. ã Msdb : Database này được SQL Server Agent ... (SQL) Server nào đó là ta nói đến một Instance c a SQL Server 2000, thông thường đó là Default Instance. Một Instance c a SQL Server 2000 có 4 system databases và một hay nhiều user database. ... (schedule alerts and jobs). 3.2. Cấu Trúc Vật Lý C a Một SQL Server Database Mỗi một database trong SQL Server đều ch a ít nhất một data file chính (primary), có thể có thêm một hay nhiều data file...
Ngày tải lên: 06/10/2013, 17:20
Getting a SQL Server Query Plan
... settings for using SQL- 92 default settings Statistics Alters current session settings for displaying statistics Transactions Alters current session settings for handling SQL Server Transactions ... categories Category Description Date and Time Alters current session settings for handling of date and time data Locking Alters current session settings for handling SQL Server locking Miscellaneous ... SHOWPLAN_TEXT (from the Query Execution category) is ON, SQL Server returns a result set containing detailed information about how the SQL statements are going to be executed rather than actually...
Ngày tải lên: 28/10/2013, 18:15
Using a SqlConnection Object to Connect to a SQL Server Database phần 1
... static void Main() { // formulate a string containing the details of the // database connection string connectionString = " ;server= localhost;database=Northwind;uid=sa;pwd=sa"; ... illustrates how to use a SqlConnection object to connect to a SQL Server database */ using System; using System.Data; using System.Data.SqlClient; class MySqlConnection { public static ... database to be established when there's a suitable connection already available. When you close a connection, that connection isn't actually closed; instead, your connection is marked...
Ngày tải lên: 07/11/2013, 10:15
Tài liệu Using a SqlConnection Object to Connect to a SQL Server Database phần 2 doc
... object. You can produce information and error messages using the SQL Server PRINT or RAISERROR statements, which are described in Chapter 4 , "Introduction to Transact- SQL Programming." ... StateChangeEventArgs class. The following example defines a method named StateChangeHandler to handle the StateChange event. You'll notice that the second parameter to this method is a StateChangeEventArgs ... System.Object class acts as the base class for all classes. In other words, all classes are ultimately derived from the System.Object class. The second parameter is an object of a class that is derived...
Ngày tải lên: 14/12/2013, 13:15
Tài liệu Back Up and Verify a SQL Server Database doc
... Settings Object Property Setting Label Name Label1 Text SQL Servers ListBox Name lstSQLServers Label Name Label2 Text Databases ListBox Name lstDatabases Label Name Label3 Text Backup ... familiar to How-To 7.1. For an examination of the LoadSQLServers routine, check out step 4 in that How-To. Listing 7.8 frmHowTo7_2.vb: Calling the Routine That Loads Available SQL Servers into ... into a List Box Private Sub frmHowTo7_2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Load up the SQL Servers LoadSQLServers(Me.lstSQLServers)...
Ngày tải lên: 21/01/2014, 12:20
Tài liệu Retrieving Constraints from a SQL Server Database docx
Ngày tải lên: 26/01/2014, 10:20
Tài liệu Wiley - Microsoft SQL Server 2008 All-in-One Desk Reference For Dummies (2008)01 doc
Ngày tải lên: 27/01/2014, 09:20
Tài liệu Wiley - Microsoft SQL Server 2008 All-in-One Desk Reference For Dummies (2008)02 pdf
Ngày tải lên: 27/01/2014, 09:20