Data Environment Refresh


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Data Environment Refresh

  1. #1
    RichardL Guest

    Data Environment Refresh


    I have a Hierarchical flex grid bound to a data environment (pause for hysterical
    laughter). The DE is bound to an Access database (pause for additional hysterical
    laughter).

    When I delete from the table which is bound to the DE, how do I refresh the
    data in the grid?

    I am deleting using an unrelated ADO Connection connected to the same database,
    since depending on where I am in the grid, I would delete from different
    tables.



  2. #2
    Duane Snelling Guest

    Re: Data Environment Refresh


    Richard,
    That is your problem. If you make changes you need to do it with recordset
    that is part of the dataevironment, not a different connection. The data
    environment loads the data at startup from the database. If you make a change
    to the database its self through another ADO connection, you will not see
    the changes in the dataenvironment until you reload it.

    Here is some sample code connect to the recordset in the dataenvironment.


    dim dbe as dataenvironment
    dim rsC as recordset
    set dbe = new dataenvironment1
    Set rsC = dbe.rsCommand1
    dbe.rsCommand1.Open "select * from TableName", dbe.Connection1, adOpenStatic,
    adLockOptimistic


    hope this helps
    Duane...

    "RichardL" <richardl@astralc.com> wrote:
    >
    >I have a Hierarchical flex grid bound to a data environment (pause for hysterical
    >laughter). The DE is bound to an Access database (pause for additional

    hysterical
    >laughter).
    >
    >When I delete from the table which is bound to the DE, how do I refresh

    the
    >data in the grid?
    >
    >I am deleting using an unrelated ADO Connection connected to the same database,
    >since depending on where I am in the grid, I would delete from different
    >tables.
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center