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
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
‘ This function opens the OLEDB dialog to create an OLEDB connection string,’ and return the selection’ It requires the OLEDB Service Component 1.0 Type Library to workPublic Function CreateConnString(Optional
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
‘ Create a SQL Server database with the specified name.’ If the second parameter is True and a DB with the same name is already ‘ present,’ it is dropped
‘ 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)’
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
‘ Returns a hashtable with the key-value pairs extracted from the querystring ‘ of the specified url’ EXAMPLE:’ Dim ht As Hashtable = GetUrlParameters’ (“http://www.mysite.com?param1=123¶m2=¶m3=234”)’ ‘ print the key=value pairs
‘ Returns the input string decoded from base64Private Function DecodeBase64(ByVal input As String) As String Dim strBytes() As Byte = System.Convert.FromBase64String(input) Return System.Text.Encoding.UTF8.GetString(strBytes)End Function
‘ Returns the input string encoded to base64Private Function EncodeBase64(ByVal input As String) As String Dim strBytes() As Byte = System.Text.Encoding.UTF8.GetBytes(input) Return System.Convert.ToBase64String(strBytes)End Function