Subject Re: [IBO] Don't have any error but it is not Posting !!!
Author Marc Leclerc
Hi,

Data does not seem to be commited, either use the IB_Transaction AutoCommit
feature or do it explicitely. I think that
IB_Query->CommitUpdates() is the one you may call but I am unsure.

hinw
----- Original Message -----
From: <alvin@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, March 19, 2001 8:18 PM
Subject: [IBO] Don't have any error but it is not Posting !!!


> This code does not create any error, but i wonder why the records are
> not being posted, Table is created at run-time and it's OK ???...
>
> void __fastcall TFormNMain::FormCreate(TObject *Sender)
> {
> IBOTable->Active = false;
> IBOTable->DatabaseName = DgConnection->Path;
> IBOTable->TableName = "Check";
>
> IBOTable->FieldDefs->Add( "Name", ftString, 512, true );
> IBOTable->FieldDefs->Add( "Address", ftString, 512, true );
> IBOTable->FieldDefs->Add( "Attribute", ftInteger, 0, true );
>
> IBOTable->CreateTable();
> IBOTable->Active = true;
>
> IB_Query->Active = true; // Select Name, Status FROM Check
> // Fields to show in IB_Grid
> try {
> IBOTable->Append();
> IBOTable->FieldByName( "Name" )->AsString = "Name";
> IBOTable->FieldByName( "Status" )->AsString = "Status";
> IBOTable->FieldByName( "Attribute" )->Value = 0;
> IBOTable->Post();
> IB_Grid->Update();
> IBOTable->Refresh();
> }
> catch ( ... ) {
> ShowMessage("Record not Posted !!!");
> }
> }
>
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>