Displaying an image from a database in a web forms control
-
[ Team LiB ] Recipe 2.15 Retrieving Update Errors Problem You want to access all of the error information available after an update fails. Solution Use one of the available properties (such as HasErrors) and methods (such as GetErrors( )) to obtain the error information.
5p luvpro 04-08-2010 65 7 Download
-
[ Team LiB ] Recipe 1.17 Using Transactions with Pooled Connections Problem You want to use connection pooling with transactions in your .NET application to maximize performance. Solution The discussion explains how to use connection pooling with transactions.
1p luvpro 04-08-2010 86 5 Download
-
[ Team LiB ] Recipe 2.12 Retrieving Stored Procedure Return Values Using a DataReader Problem You are using a stored procedure to create a DataReader and need to get the return value. When you try to access the value, it is null. How can you access the return value?
4p luvpro 04-08-2010 92 9 Download
-
[ Team LiB ] Recipe 2.1 Retrieving Hierarchical Data into a DataSet Problem You want to fill a DataSet with parent and related child data, even if the DataSet already has a schema that includes the relationship. Solution There are several techniques you can use to load parent and child data into a DataSet.
4p luvpro 04-08-2010 79 6 Download
-
[ Team LiB ] Recipe 2.20 Retrieving Data from an Oracle Package Problem Given an Oracle package that returns multiple result sets for related tables as REF CURSOR data types, you want to access this data using a DataReader and load the data into a DataSet. Solution Use the data type OracleType.Cursor .
5p luvpro 04-08-2010 91 7 Download
-
[ Team LiB ] Recipe 2.19 Replacing Null Values in a Strongly Typed DataSet Problem When a column in a database has a null value, you want the value in the DataSet to be a string indicating that no value is available. Solution Use annotations in the XML schema to control the handling of null values.
4p luvpro 04-08-2010 96 6 Download
-
[ Team LiB ] Recipe 7.16 Dynamically Creating Crystal Reports Problem You need to define a DataTable at runtime and bind it to a Crystal Report. Solution Create a DataAdapter and use it to fill a DataTable with a subset of records
3p luvpro 04-08-2010 96 13 Download
-
[ Team LiB ] Recipe 7.17 Using ADO.NET Design-Time Features in Classes Without a GUI Problem The design-time environment provides controls and wizards to facilitate creation of and management of properties of ADO.NET objects.
4p luvpro 04-08-2010 90 8 Download
-
[ Team LiB ] Recipe 7.14 Using a DataView to Control Edits, Deletions, or Additions in Windows Forms Problem You need to selectively prevent users from editing, deleting, or adding data in a Windows Forms application. Solution Bind a DataView to Windows Forms controls. The sample code contains four event handlers
3p luvpro 04-08-2010 96 10 Download
-
[ Team LiB ] Recipe 7.15 Adding Search Capabilities to Windows Forms Problem You need to use a search criteria specified by a user to locate a record displayed in a DataGrid without executing a query against the database. Solution Use the Find( )
3p luvpro 04-08-2010 96 7 Download
-
[ 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. Solution Use SQL Server locking hints from ADO.NET. The sample code contains three event handlers
5p luvpro 04-08-2010 90 8 Download
-
[ Team LiB ] Recipe 7.13 Loading a Windows PictureBox with Images Stored by Access as OLE Objects Problem You need to display images from a Microsoft Access database in a PictureBox control. Solution Strip the OLE image header that Microsoft Access adds to the image. The sample code contains six event handlers
5p luvpro 04-08-2010 116 8 Download
-
[ Team LiB ] Recipe 2.9 Returning an Output Parameter Using a DataReader Problem You want to access an output parameter returned by a stored procedure that you have used to create a DataReader. Solution Add a parameter
4p luvpro 04-08-2010 96 11 Download
-
[ Team LiB ] Recipe 6.13 Implementing Pessimistic Concurrency Without Using Database Locks Problem You need the safety of pessimistic locking without the overhead of database locks. Solution Use extra columns and stored procedures as shown in the following examples.
14p luvpro 04-08-2010 94 8 Download
-
[ Team LiB ] Recipe 6.12 Using Transaction Isolation Levels to Protect Data Problem You want to effectively use transaction isolation levels to ensure data consistency for a range of data rows. Solution Set and use isolation levels as shown in the following example.
5p luvpro 04-08-2010 80 7 Download
-
[ Team LiB ] Recipe 6.11 Resolving Data Conflicts Problem You need to effectively resolve data conflicts and prevent overwriting of existing data when attempting to update changes in a DataSet to a database where the underlying data has changed.
8p luvpro 04-08-2010 90 7 Download
-
[ Team LiB ] Recipe 6.10 Checking for Concurrency Violations Problem You need to check for concurrency violations. Solution Use a timestamp column to manage data concurrency violations.
7p luvpro 04-08-2010 75 5 Download
-
[ Team LiB ] Recipe 7.9 Binding a Group of Radio Buttons in a Windows Form Problem You need to bind a field in a database to a radio button and update the database with the radio button selected.
6p luvpro 04-08-2010 117 13 Download
-
[ Team LiB ] Recipe 7.7 Displaying an Image from a Database in a Web Forms Control Problem You need to display an image from a database column in an ASP.NET control. Solution Fill an ASP.NET Image control from a database field by pointing the ImageUrl property
3p luvpro 04-08-2010 97 12 Download
-
[ Team LiB ] Recipe 7.8 Displaying an Image from a Database in a Windows Forms Control Problem You need to display an image from a database in a Windows Forms control. Solution Read the image into a byte array and load it directly into a PictureBox control with a MemoryStream.
5p luvpro 04-08-2010 97 12 Download