on 8/30/01 2:43, Jones, John at john At cdsysinc DO.T com wrote:
> 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(); ^^^^^^^^^^^^^^^^^^^^ this Flush() is useless, because you did not modify anything.
> theTable.SetName("Marjorie"); ^^^^^^^^^^^^^^^^^^^^^^^^^^^ I wonder what you think this line do ? why you write it here ?
> 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(); > }
Question: Does VJDK include at least one example that uses this way of field creation? I mean VBaseObject.MakeNewField()
If yes, run that example and make sure that it works fine. We need this to understand if bug in MakeNewField() or somewhere else.
Am I right that you are going to have database with dynamic database structure, yes ?
Can you send your java files where you create database ?
I am afraid that we will not be able debug this problem until Jochen return from vacation.
-- Best regards, Ruslan Zasukhin
------------------------- Paradigma.
e-mail: ruslan@paradigmasoft.com web : http://www.paradigmasoft.com
To subscribe to the Valentina mail list send a letter to valentina-on At lists DO.T macserve.net ©2001 Ruslan Zasukhin |