Recent content by J_Pygram

  1. J

    Using Master/Detail

    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...
  2. J

    Savepoints

    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...
  3. J

    Calculated Fields

    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: //...
  4. J

    Calculated Fields

    Thanks Frans You are on the right lines but I can not quite get that last mile. Anyone else got any thoughts? Thanks in advance John
  5. J

    Calculated Fields

    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...
  6. J

    Record changed by another user.

    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
  7. J

    Record changed by another user.

    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...
  8. J

    EOracleError ora-1480 ?????

    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
  9. J

    Re: DeclareQueryVariables

    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...
  10. J

    Standalone Client

    The message is "ORA-12571; TNS: Packet writer failure"
  11. J

    Standalone Client

    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...
Back
Top