public XmlImportAndSaveToDB ( int connectionNumber, String tableName, String traceTableName, String xmlFileName, List |
||
connectionNumber | int | The serial number of the connection that is used to write to the database |
tableName | String | The name of the database table that time series will be written to |
traceTableName | String | The name of the database table that stores the BLOB for a single trace |
xmlFileName | String | The file name (with path) of an XML file that defines one or more time series to import |
tsImportList | List |
A List of TSImport objects that the method adds to. One item is added to the List /// for each time series that is processed in the XML file. The List must already be instantiated before calling /// this method. The method does not change any items that are already in the List. |
Результат | int |
public int XmlImportAndSaveToDB(int connectionNumber, String tableName, String traceTableName,
String xmlFileName, List<TSImport> tsImportList)
{
// Get the connection that we'll pass along.
SqlConnection connx = GetConnectionFromId(connectionNumber);
// Construct new TSXml object with SqlConnection object and table name
TSXml tsXml = new TSXml(connx, ConnxObject, tableName, traceTableName);
// Method in the TSXml object does all the work
return tsXml.ReadAndStore(xmlFileName, null, tsImportList, true, true);
}