error while inserting record

Hi I m trying to insert a record into database through CFrontDotNet but it is throwing error.

Here is my code :-

//Insert

_cFrontDotNet.OpenCompany(“CRONUS India Ltd.”);

int _TableNo = _cFrontDotNet.TableNo(“Item”);

int thand = _cFrontDotNet.OpenTable(_TableNo);

int rthand = _cFrontDotNet.AllocRecord(thand);

_cFrontDotNet.InitRecord(thand, rthand);

_cFrontDotNet.BeginWriteTransaction();

_cFrontDotNet.LockTable(thand, NavisionTableLockMode.LockWait);

_cFrontDotNet.SetFieldData(thand, rthand, 3, NavisionFieldType.Text, NavisionText.Parse(“Hi Again”).GetBytes());

_cFrontDotNet.InsertRecord(thand, rthand);

// Update another field of the same record.

_cFrontDotNet.SetFieldData(thand, rthand, 4, NavisionFieldType.Text, NavisionText.Parse(“Next”).GetBytes());Exec

_cFrontDotNet.ModifyRecord(thand, rthand);

_cFrontDotNet.EndWriteTransaction();

_cFrontDotNet.FreeRecord(rthand);

_cFrontDotNet.CloseTable(thand);

While executing nextSetFieldData, it throws error.
Cud u please someone tell me what cud be the problem ?

Thanx a lot.

Regards,

Poonam.j

Hi Poonam,

Can you let us know the exact error please?

/TH