This is a very simple class object used in the COREScriptSQLConnector (OpenSQLQueries() method) and COREScriptMySQLConnector (OpenMySQLQueries() method) objects. These methods allow you to select data from multiple tables or views in 1 function call.
Object Declaration: public COREScriptSQLQueryItem(string strSQL, string strTableName)
Properties:
Property Name |
Data Type |
SQLString |
string - A valid SQL Select statement. Example: Select * From MyTable Where Processed = 0. |
TableName |
string - The name of the table or view in the SQLString property. If creating a List<CORESScriptSQLConnector> make sure that every table name is unique. |
Example Code:
List<COREScriptSQLQueryItem> queries = new List<COREScriptSQLQueryItem>();
queries.Add(new COREScriptSQLQueryItem(
"Select * from MyTable Where Processed = 0", "MyTable")
);
//Another select from the SAME table Note the change in strTableName parameter
queries.Add(new COREScriptSQLQueryItem(
"Select * from MyTable Where Processed = 1", "MyTable1")
);
queries.Add(new COREScriptSQLQueryItem(
"Select * from Patients Where PatientDOB Is Null", "Patients")
);
System.Data.DataSet ods = globals.MSSQLProfile.OpenSQLQueries(queries);