Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    2

    Unanswered: TMemoField using Delphi7

    I have a field CHAR(500) in a Informix table. When I mapped this field in a TClientDataset the type is TMemoField. When I use the applyupdate in this TClientDataset, I have the error : "Record not found or changed by another user". I'm using the ProviderFlags True for the pfInUpdate and pfInWhere.

    If I set False to pfInUpdate for this field I don't have the error, but, of course, the value is not saved in the database.

    What I need to do ?

  2. #2
    Join Date
    Mar 2004
    Location
    Sydney
    Posts
    20
    I think this might be a Delphi issue.

    The dataset that is writing to the database (usually table, query or update component) has a updatemode property. Try setting this to "upWhereKeyOnly" and make sure the key fields are available to the dataset, ie in the original query etc.

  3. #3
    Join Date
    Feb 2004
    Posts
    30

    Re: TMemoField using Delphi7

    Since Delphi would perform the checking for all existing fields before update a record, internally, it would generate a SQL command somewhat as like as the one shown below:

    update <table>
    set field1 = value1,
    field2 = value2,
    ........
    fieldx = valuex
    where field1 = old_value1
    and field2 = old_value2
    and ............
    and fieldx = old_valuex

    So, just take out the where checking of the memo field would let you update normally. i.e. set pfInWhere to false of the memo field. However, you must take the risk as that field is really updated by another user before you commit your change.

    Hope this help,
    Athens.


    Originally posted by tarcisio
    I have a field CHAR(500) in a Informix table. When I mapped this field in a TClientDataset the type is TMemoField. When I use the applyupdate in this TClientDataset, I have the error : "Record not found or changed by another user". I'm using the ProviderFlags True for the pfInUpdate and pfInWhere.

    If I set False to pfInUpdate for this field I don't have the error, but, of course, the value is not saved in the database.

    What I need to do ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •