.NET news » Database Database Rss Feed

Making Sense of the XML DataType in SQL Server 2005

As database developers, many of us have had to dip our feet into the wide ocean of XML.It should come as good news that in SQL Server 2005, you can store XML in the database with a new XML datatype. Although this is good news, many developers have been storing XML in the database for some time now. Without implicit support for XML, developers have been shoving XML documents into text fields since XML's inception.
20 Apr 2006, 19:00:00   Source: Making Sense of the XML DataType in SQL Server 2005   Tags: XML Database

TRY...CATCH in SQL Server 2005

SQL Server 2005 offers a number of new features over its predecessor, including many features aimed at making working with databases more like writing .NET application code. For example, in SQL Server 2005, stored procedures, triggers, UDFs, and so on can be written using any .NET Framework programming language (such as Visual Basic or C#). Another feature, and the focus of this article, is SQL Server 2005's support for TRY...CATCH blocks.

Prior to SQL Server 2005, detecting errors resulting from T-SQL statements could only be handled by checking a global error variable, @@ERROR. Because the @@ERROR variable value is reset after each SQL statement, this antiquated approach leads to rather bloated stored procedures, as the variable must be checked after each statement with code to handle any problems...

18 Apr 2006, 19:00:00   Source: TRY...CATCH in SQL Server 2005   Tags: Database

Using the Enterprise Library Data Access Block for .NET 2.0

Writing database-access code is a repetitious and time-consuming task, but now that it's available as a reusable Enterprise Data Access Application Block, you'll never have to write such code again.
16 Mar 2006, 16:06:50   Source: Using the Enterprise Library Data Access Block for .NET 2.0   Tags: Database

Custom Paging in ASP.NET 2.0 with SQL Server 2005

A common pattern in web development is providing paged access to data. Rather than displaying the entire contents of a report or database table to an end user, developers often show only a subset of records per web page, with controls for moving from page to page. With ASP.NET 1.x, the DataGrid made paging incredibly simple - just set the AllowPaging property to True and add a few lines of code in the PageIndexChanged event handler and you were done! ASP.NET 2.0's GridView makes the process even simpler - just check the Enable Paging option from the GridView's smart tag - no code needed.

Of course nothing is free in life, and the tradeoff you make with the ease of checking a checkbox to enable paging (or, in the DataGrid's case, writing a couple lines of code) is performance. Out of the box, the DataGrid and GridView use default paging, which is a simple paging model that returns all of the records for each every page of data shown. When paging through small amounts of data (dozens to a hundred or so records), this inefficiency is likely outweighed by the ease of adding the feature. However, if you want to page through thousands, tens of thousands, or hundreds of thousands of records the default paging model is not viable.

The alternative to default paging is custom paging, in which you are tasked with writing code that intelligently grabs the correct subset of data. It requires a bit more work, but is essential when dealing with sufficiently-sized data...

14 Mar 2006, 18:00:00   Source: Custom Paging in ASP.NET 2.0 with SQL Server 2005   Tags: ASP.NET Database

Data Binding in Windows Forms 2.0

Windows Forms 2.0 increases support for data binding via the new BindingNavigator and BindingSource objects, which will save you a lot of effort. Find out how you can perform sorting and searching tasks using data binding and simplify the display of master-detail relationships in tables.
21 Feb 2006, 22:24:37   Source: Data Binding in Windows Forms 2.0   Tags: Database Visual Studio

Online Article: Security in the CLR World Inside SQL Server

One of the major benefits of writing .NET code to run in the Common Language Runtime (CLR) hosted in any environment is code access security (CAS).CAS provides a code-based-rather than user-based-authorization scheme to prevent various kinds of luring and other code attacks. But how does that security scheme coexist with SQL Server 2005's own, newly enhanced security features? By default your .NET code is reasonably secure, but it's all too easy for the two security schemes to butt heads and cause you grief. In this article I'll look briefly at the concept behind CAS and a few new security features in SQL Server 2005, then explore how to make the two systems work for you instead of against you as you take advantage of these advanced programming features in SQL Server.

The Baker's Dozen: 13 Productivity Tips for ADO.NET 2.0

This installment of "The Baker's Dozen" presents a variety of tips and techniques to become productive with data handling techniques using ADO.NET 2.0 in Visual Studio 2005.
16 Feb 2006, 04:39:17   Source: The Baker's Dozen: 13 Productivity Tips for ADO.NET 2.0   Tags: Database

Ink And The Database

Unless your battery is really, really good, you'll eventually want to store your Ink. Simple file storage or XML serialization is sometimes sufficient, but usually, you'll want to move Ink into and out of a relational database. Here's how.
10 Feb 2006, 23:41:57   Source: Ink And The Database   Tags: Tablet PC Database

Data Access for Partially Connected Applications

Modern applications require more sophisticated data access features than a simple connection to SQL Server. Data needs to be available in distributed scenarios as well as offline scenarios. This article provides an architectural overview and implementation examples that support these scenarios.
3 Feb 2006, 23:26:10   Source: Data Access for Partially Connected Applications   Tags: Database

The OO Database Advantage

Here's a question: If you write your application's code in an OO language - such as C#, VB.NET, or managed C++ - why not write database query and update code in the same language? It would certainly make life simpler, wouldn't it? At the very least, you'd only have to hold one language in your head - not your programming language and SQL.
22 Jan 2006, 08:00:00   Source: The OO Database Advantage   Tags: Database