Tables
The catalog of tables can be accessed programmatically by invoking the GetSchema method to obtain the "Tables" schema collection. To retrieve the database schema instantiate a new NetSuiteConnection and open the connection. The example below demonstrates how to retrieve a list of the available tables.
C#
String connectionString = "Account Id=XABC123456;Password=password;User=user;Role Id=3;Version=2013_1;Location=C:\\myfolder\\;Offline=false;";
using (NetSuiteConnection connection = new NetSuiteConnection(connectionString))
{
connection.Open();
DataTable databaseSchema = connection.GetSchema("Tables");
foreach (DataRow row in databaseSchema.Rows)
{
string[] tableName = { row["Table_Name"].ToString() };
}
}
VB.NET
Using connection As New NetSuiteConnection(connectionString)
connection.Open()
Dim databaseSchema As DataTable = connection.GetSchema("Tables")
For Each row As DataRow In databaseSchema.Rows
Dim tableName As String() = {row("Table_Name").ToString()}
Next
End Using