main logo
Subject: Problems with MakeNewField in VJDK Updated
Author: "Jones, John"
Posted: 2001/08/29 18:43:17
 
View Entire Thread
New Search


Here is a routine I'm using. Everything works fine until I get to the line
with the ">>>>" in front of it. Then my program dies; no exception, no
error, debug just stops. Does anyone have any idea why this might be?

An update:
Here is the code, a little tweaked. I wanted to see if other baseobject
methods worked, and in particular if I delete a field can I add one. I
deleted the field "Series" successfully, but then it crashed as usual when I
tried to make a new field, at the place marked with ">>>>".

john

try
{
String dbName=theDB.GetName();
String tblName=theTable.GetName();
String theVerdict=dbName + ":" + tblName + ":" +
theTable.GetFieldCount();

theTable.Flush();

theTable.SetName("Marjorie");
VField it=theTable.GetField("Series");
theTable.DeleteField(it);
>>>>theTable.MakeNewField( "FirstName", VJDK.TypeString, 25 );
theTable.MakeNewField( "FirstTime", VJDK.TypeString, 25 );
theTable.MakeNewField( "FirstShot", VJDK.TypeString, 25 );
theTable.MakeNewField( "FirstDibs", VJDK.TypeString, 25 );
theTable.MakeNewField( "FirstBlud", VJDK.TypeString, 25 );
}
catch (Exception ex)
{
String errCode = ex.toString();
}
catch(VException vx)
{
int errCode = vx.GetErrorCode();
String errStr = vx.GetErrorString();
}
 
©2001 Jones, John
<-- Prior Message New Search Next Message -->