Determine the Value of a Date Variable
The value of a date variable is 12:00:00 AM when it is not assigned. If a date is optional for the user input, this value is often saved to the
The value of a date variable is 12:00:00 AM when it is not assigned. If a date is optional for the user input, this value is often saved to the
‘ Backup the specified database.’ Note: requires Imports System.Data.SqlClient” Example:’ Dim connString As String = “server=(local); user id=sa; password=; ‘ Database=master;”‘ Try’ BackupDatabase(connString, “MyTestDB”, “D:MyTestDbBackup.bak”)’ Catch ex As Exception’ MessageBox.Show(ex.Message)’
The following routines convert a numeric value into a string that represents the number, and vice versa. They are useful for reading data written by QuickBasic programs, because the QuickBasic
‘ Return True if the application is running as an EXE’ Return False if the application is running as a DLLFunction RunningAsExe() As Boolean ‘ get the codebase of the
‘ Returns a Hashtable whose keys are the unique words in a source string’ and whose elements are the number of occurrences of each word” Example:’ ‘ Dim de As
‘ Return the position of the argument in a list of values’ or zero if the argument isn’t included in the list’ It works for both regular values and for
‘ Keep the first argument in the range [lowLimit, highLimit]’ If the value is adjusted, the fourth (optional) argument is set to True” This function works will all basic data
Function IsValidEmail(ByVal Value As String, Optional ByVal MaxLength As _ Integer = 255, Optional ByVal IsRequired As Boolean = True) As Boolean If Value Is Nothing OrElse Value.Length = 0
‘ convert a positive number to any base’ BASE can be in the range 2-36Function Dec2Any(ByVal number As Long, ByVal base As Short) As String Dim index As Integer Dim