| ibi Patterns - Search 6.0.0 .NET API |
| NetricsServerInterface.recdelete Method (String, String[], Boolean) |
| See AlsoExample |
![]()
|
Delete records from a table.
Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)
Syntax
| Visual Basic (Declaration) |
|---|
| Public Function recdelete( _ ByVal tblName As String, _ ByVal recKeys As String(), _ ByVal doMaxWork As Boolean _ ) As NetricsTableStats |
| C# |
|---|
| public NetricsTableStats recdelete( string tblName, string[] recKeys, bool doMaxWork ) |
| C++ |
|---|
| public: NetricsTableStats recdelete( String tblName, array<String>^ recKeys, bool doMaxWork ) sealed |
| J# |
|---|
| public NetricsTableStats recdelete( string tblName, string[] recKeys, bool doMaxWork ) |
| JScript |
|---|
| public
function recdelete( tblName : String, recKeys : String[], doMaxWork : bool ) : NetricsTableStats |
Parameters
- tblName
- The name of the table from which the records will be deleted.
- recKeys
- The record keys of the records to be deleted
- doMaxWork
- Continue on error - deletes those records which do exist, ignores those that don't.
Return Value
The stats for the table after the records have been deleted
Exceptions
| Exception Type | Condition |
|---|---|
| NetricsException | If the server indicates an error occured (Possible errors - TBLNOTFOUND, DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC, NORECKEY, RECNOTFOUND, UPDPARAM, SHUTDOWN) |
Example
This sample shows how to delete records from an ibi™ Patterns - Search table.
Copy Code
| |
|---|---|
using NetricsServerInterface;
class MyClass
{
private static NetricsServerInterface.NetricsServerInterface si = null;
public static void Main()
{
try
{
String host = "localhost";
int port = 5051;
si = new NetricsServerInterface.NetricsServerInterface(host, port);
// Target ibi™ Patterns - Search table
String table = "names";
// Do not continue on format errors
bool doMaxWork = false;
// Record keys of records to be deleted
String[] recKeys = {"1","2"};
NetricsTableStats response = si.recdelete(table, recKeys, doMaxWork);
Console.WriteLine("Records deleted: Number of records in table " + table + " is " + response.getNumRecs() + ".");
}
catch (NetricsException e)
{
Console.Write(e.getErrorDescription() + "\n");
}
}
}
| |