Rename a table.


Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)

Syntax

Visual Basic (Declaration)
Public Sub tblmove( _ 
   ByVal oldName As String,  _ 
   ByVal newName As String _ 
) _
    Implements INetricsServerInterface.tblmove
C#
public void tblmove(
   string oldName,
   string newName
)
C++
public:
 void tblmove(
   String oldName,
   String newName
) sealed 
J#
public void tblmove(
   string oldName,
   string newName
)
JScript
public  function tblmove(
   oldName : String,
   newName : String
)

Parameters

oldName
The name of the table that will be renamed
newName
The new name of the table

Implements

INetricsServerInterface.tblmove

Exceptions

Exception TypeCondition
NetricsExceptionIf the server indicates that an error has occured (Possible errors - TBLMOVESAME, TBLNOTFOUND, EXPECTTBLDESC, FEATURESET, NOTBLDESC, NOSYSINIT)

Remarks

Call this method to rename an existing table. Note that if the table with the name

 Copy Code
newName
already exists, it will be deleted, and replaced by the table that you are renaming.

Example

This sample shows how to rename a TIBCO Patterns Engine 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);
                        // oldName is the existing table name and newName is the new table name
                        String oldName = "names1";
                        String newName = "names";
                        si.tblmove(oldName, newName);
                        Console.WriteLine("Table moved");
                    }
                    catch (NetricsException e)
                    {
                        Console.Write(e.getErrorDescription() + "\n");
                    }
                  }
               }
             

See Also