public string _LogString_ViaDataReader { get { string x = ""; try { DataTableReader reader = _dsMarkit_log.MARKIT_LOG.Cr... StringBuilder sb = new StringBuilder(); while (reader.Read()) { // Given a DataTableReader, display column names. for (int i = 0; i < reader.FieldCount; i++) { sb.Append("\r\n" + reader.GetName(i) + ": "); if (reader.IsDBNull(i)) { sb.Append("<NULL>"); } else { try { sb.Append(reader.GetValue(i... } catch (InvalidCastException) { sb.Append("<Invalid ......
original artickle: http://www.cambiaresearch.c... public bool TestEmailRegex(string emailAddress) { // string patternLenient = @"\w+([-+.]\w+)*@\w+([-.]\w... // Regex reLenient = new Regex(patternLenient); string patternStrict = @"^(([^<>()[\]\\.,;:\... + @"(\.[^<>()[\]\\.,;:\... + @"((\[[0-9]{1,3}\.[0-9]{1,3... + @"\.[0-9]{1,3}\])|(([a-zA-Z... ......
create and myTable_Audit via for myTable, where myTable autoIdentity column name is myTable_ID Steps: 1) Paste script below into Query Analyzer 2) set Query Analyzer results to "text" (not "grid" 3) set @v_Tablename = 'myTableName' below 4) set @v_postfix = '_ID' below (not 'myTableName_ID' ) 5) run script with no errors (script produces new script) 6) paste text results (new script) into query Query Analyzer 7) run script with no errors new table and triggers created Set NoCount On Go declare @v_Tablename ......
Private Function PassesSubstringTest(ByVal myWord As String, ByVal myFragment As String, ByVal matchType As MatchType) As Boolean If myWord = "REDON" Then System.Diagnostics.Debug.Pr... End If '--------------------------... 'anything to do? '--------------------------... If myFragment = "" Then '--------------------------... 'no, return "matched: ......
original article: http://www.cryer.co.uk/bria... To add a column to a SQL Server database table, checking first that the column does not already exist: if not exists (select * from syscolumns where id=object_id('<table_nam... and name='<column_name>') alter table <table_name> add <column_name> <column_definition> where: <table_name> is the name of the table, <column_name> is the name of the column and <column_definition> ......