/// <summary> /// This method deletes any records from the table which match the given WHERE /// clause of a SQL command, using the given database connection number /// and database table name. /// </summary> /// <param name="connectionNumber">The serial number of the connection that is used to access the time series</param> /// <param name="tableName">The name of the database table that time series will be deleted from</param> /// <param name="traceTableName">The name of the database table that stores the BLOB for a single trace</param> /// <param name="whereClause">The WHERE clause of a SQL command, not including the word WHERE. /// For example, to delete delete all records where Id > 55, use the text "Id > 55".</param> /// <returns>true if one or more records were deleted, false if no records were deleted</returns> public bool DeleteMatchingSeries( int connectionNumber, String tableName, String traceTableName, String whereClause) { // Get the connection that we'll pass along. var connx = GetConnectionContainerFromId(connectionNumber); // Construct new TS object with SqlConnection object and table name TS ts = new TS(connx, tableName, traceTableName); return(ts.DeleteMatchingSeries(whereClause)); }
public bool DeleteMatchingSeries( int connectionNumber, sbyte *pParamTableName, sbyte *pTraceTableName, sbyte *pWhereClause) { try { // Convert from simple character byte array to .Net String object String paramTableName = new String(pParamTableName); String traceTableName = new String(pTraceTableName); String whereClause = new String(pWhereClause); // Get the connection that we'll pass along. var connx = TSLib.GetConnectionContainerFromId(connectionNumber); // Construct new TS object with SqlConnection object and table name TS ts = new TS(connx, paramTableName, traceTableName); return(ts.DeleteMatchingSeries(whereClause)); } catch (Exception e) { ErrorMessage = e.Message; return(false); } }