I have 2 tables which are linked by a foreign key on a field called USER_ID. I have also 2 TOracleDataSet components and I want to create a master/detail form. In the detail DataSet I have set Master correctly and have been prompted to accept the DetailFields and MasterFields property which were...
Savepoints do not seem to work as I would expect...
OracleSession1->Savepoint("START_TRANS");
try {
tPerson->Edit();
tPerson->FieldByName("FIRSTNAME")->AsString=Edit1->Text;
tPerson->Post();
tPerson->Edit();
// the next line generates a constraint violation...
To any interested persons...
I seem to have cracked it. The secret is using persistent fields and adding
them to the list of fields in the TTable object. The following seems to work
but I am never too proud to listen to hints or improvements that others may
have.
In the .h file...
private: //...
Can anyone tell me how to get a TOracleDataSet to trigger the OnCalcFields event when it is created at run time. I have the following in the .h file...
private:
TOracleDataSet *person;
TStringField *personFULL_NAME;
void __fastcall CalcFields(TDataSet *DataSet);
In the .cpp file...
person=new...
Thanks Marko,
It was all to do with the refresh options. As you suggested I had a before update trigger which was causing a problem. Thanks for your help.
John
------------------
[i]John Pygram[/u]
JPygram@aol.com
I think this may be a Borland issue rather than anything to do with DOA but I am sure that someone out there will know the answer.
I am using data aware controls (TDBEdit etc) with a DOA TOracleDataSet component to edit a subset of a larger table. If I make alterations to a record, scroll away...
Hivaj,
You must set any variables before execution of the SQL otherwise you will get an error unless you have already run the query then it will use the last value. You can set NULL values and empty strings but you must set something. Good luck.
John
I am having trouble using this feature. Here is a sample of code where I get the error "variable :PERSON not declared"
TOracleQuery *Query=new TOracleQuery(NULL);
Query->Session=DBComp->MainSession;
Query->SQL->Add("select * from person");
Query->Execute();
TOracleDataSet *Person=new...
I think I have a similar problem to "sparis", posted on the 18th last. I have a client application which can operate in stand alone mode if the server is not present. I am using windows sockets(winsock2) with TOracleSession and several DOA components.
The client tries a WSAStartup and then...