Tip Bank

DevX - Software Development Resource

Case-sensitive Comparisons

To program a case-sensitive comparison of a user-typed password on a case-insensitive SQL Server 7.0 instance, assume that the value of the password stored in your table is BamBi2000 (notice

DevX - Software Development Resource

Improve Your Search Algorithms

A normal practice in implementing a search is to use the “like” operator. As long as you are searching for your keyword in only one column, there will be no

DevX - Software Development Resource

RestoreDatabase – Restoring a SQL Server database

‘ Restore the specified database.’ Note: requires Imports System.Data.SqlClient” Example:’ Dim connString As String = “server=(local); user id=sa; password=; ‘ Database=master;”‘ Try’ RestoreDatabase(connString, “MyTestDB”, “D:MyTestDbBackup.bak”)’ Catch ex As Exception’ MessageBox.Show(ex.Message)’

DevX - Software Development Resource

The DataTable’s Compute method

The DataTable class has a method, Compute, that executes SQL-like functions on the rows locally stored in the DataTable. It supports functions such as COUNT, SUM, MIN, MAX, AVG and

DevX - Software Development Resource

Calculated columns that refer to relationships

The DataSet is a container of multiple DataTables, and it allows to create parent-child relationships between two tables, as shown below: ‘ create a relationship between the Categories and the