@@ -7,6 +7,13 @@ namespace ScriptHelp.Scripts
77{
88 class Formula
99 {
10+ //static readonly bool isListObject;
11+
12+ static Formula ( )
13+ {
14+ //isListObject = ErrorHandler.IsValidListObject(true);
15+ }
16+
1017 /// <summary>
1118 /// Add a formula at the end of the table to use as a script
1219 /// </summary>
@@ -18,6 +25,7 @@ public static void DqlAppend()
1825 try
1926 {
2027 ErrorHandler . CreateLogRecord ( ) ;
28+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
2129 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
2230 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
2331 string sqlColName = string . Empty ;
@@ -165,6 +173,7 @@ public static void DqlAppendLocked()
165173 try
166174 {
167175 ErrorHandler . CreateLogRecord ( ) ;
176+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
168177 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
169178 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
170179 string sqlColName = string . Empty ;
@@ -325,6 +334,7 @@ public static void DqlCreate()
325334 try
326335 {
327336 ErrorHandler . CreateLogRecord ( ) ;
337+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
328338 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
329339 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
330340 string sqlColName = string . Empty ;
@@ -444,6 +454,7 @@ public static void DqlTruncateAppend()
444454 try
445455 {
446456 ErrorHandler . CreateLogRecord ( ) ;
457+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
447458 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
448459 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
449460 string sqlColName = string . Empty ;
@@ -592,6 +603,7 @@ public static void DqlUpdate()
592603 try
593604 {
594605 ErrorHandler . CreateLogRecord ( ) ;
606+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
595607 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
596608 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
597609 string sqlColName = string . Empty ;
@@ -735,6 +747,7 @@ public static void DqlUpdateLocked()
735747 try
736748 {
737749 ErrorHandler . CreateLogRecord ( ) ;
750+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
738751 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
739752 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
740753 string sqlColName = string . Empty ;
@@ -895,6 +908,7 @@ public static void GithubTable()
895908 try
896909 {
897910 ErrorHandler . CreateLogRecord ( ) ;
911+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
898912 Cursor . Current = System . Windows . Forms . Cursors . WaitCursor ;
899913 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
900914 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
@@ -981,6 +995,7 @@ public static void HtmlTable()
981995 try
982996 {
983997 ErrorHandler . CreateLogRecord ( ) ;
998+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
984999 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
9851000 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
9861001 string sqlColName = string . Empty ;
@@ -1098,6 +1113,7 @@ public static void PlSqlCreateTable()
10981113 try
10991114 {
11001115 ErrorHandler . CreateLogRecord ( ) ;
1116+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
11011117 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
11021118 string sqlColName = string . Empty ;
11031119
@@ -1200,6 +1216,7 @@ public static void PlSqlInsertValues()
12001216 try
12011217 {
12021218 ErrorHandler . CreateLogRecord ( ) ;
1219+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
12031220 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
12041221 string sqlColName = string . Empty ;
12051222
@@ -1301,6 +1318,7 @@ public static void PlSqlMergeValues()
13011318 try
13021319 {
13031320 ErrorHandler . CreateLogRecord ( ) ;
1321+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
13041322 Cursor . Current = System . Windows . Forms . Cursors . WaitCursor ;
13051323 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
13061324 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
@@ -1411,6 +1429,7 @@ public static void PlSqlSelectValues()
14111429 try
14121430 {
14131431 ErrorHandler . CreateLogRecord ( ) ;
1432+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
14141433 Cursor . Current = System . Windows . Forms . Cursors . WaitCursor ;
14151434 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
14161435 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
@@ -1519,6 +1538,7 @@ public static void PlSqlSelectUnion()
15191538 try
15201539 {
15211540 ErrorHandler . CreateLogRecord ( ) ;
1541+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
15221542 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
15231543 string sqlColName = string . Empty ;
15241544
@@ -1621,6 +1641,7 @@ public static void PlSqlUpdateValues()
16211641 try
16221642 {
16231643 ErrorHandler . CreateLogRecord ( ) ;
1644+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
16241645 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
16251646 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
16261647 string sqlColName = string . Empty ;
@@ -1770,6 +1791,7 @@ public static void TSqlCreateTable()
17701791 try
17711792 {
17721793 ErrorHandler . CreateLogRecord ( ) ;
1794+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
17731795 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
17741796 string sqlColName = string . Empty ;
17751797
@@ -1872,6 +1894,7 @@ public static void TSqlInsertValues()
18721894 try
18731895 {
18741896 ErrorHandler . CreateLogRecord ( ) ;
1897+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
18751898 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
18761899 string sqlColName = string . Empty ;
18771900
@@ -1973,6 +1996,7 @@ public static void TSqlMergeValues()
19731996 try
19741997 {
19751998 ErrorHandler . CreateLogRecord ( ) ;
1999+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
19762000 Cursor . Current = System . Windows . Forms . Cursors . WaitCursor ;
19772001 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
19782002 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
@@ -2083,6 +2107,7 @@ public static void TSqlSelectUnion()
20832107 try
20842108 {
20852109 ErrorHandler . CreateLogRecord ( ) ;
2110+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
20862111 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
20872112 string sqlColName = string . Empty ;
20882113 sqlColName = Properties . Settings . Default . Table_ColumnName ;
@@ -2186,6 +2211,7 @@ public static void TSqlSelectValues()
21862211 try
21872212 {
21882213 ErrorHandler . CreateLogRecord ( ) ;
2214+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
21892215 Cursor . Current = System . Windows . Forms . Cursors . WaitCursor ;
21902216 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
21912217 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
@@ -2294,6 +2320,7 @@ public static void TSqlUpdateValues()
22942320 try
22952321 {
22962322 ErrorHandler . CreateLogRecord ( ) ;
2323+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
22972324 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
22982325 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
22992326 string sqlColName = string . Empty ;
@@ -2443,6 +2470,7 @@ public static void XmlValues()
24432470 try
24442471 {
24452472 ErrorHandler . CreateLogRecord ( ) ;
2473+ if ( ErrorHandler . IsValidListObject ( true ) == false ) { return ; } ;
24462474 string lastColumnName = Properties . Settings . Default . Table_ColumnTableAlias ;
24472475 string tableAlias = Properties . Settings . Default . Table_ColumnTableAlias ;
24482476 string sqlColName = string . Empty ;
0 commit comments