Forum Discussion

lea_lindemann's avatar
lea_lindemann
Occasional Contributor
12 years ago

How to work with tables in MS Access

Hi,



I'm automating tests for a MS Access application with Access 2003, Win XP and TestComplete 9.10.



To prepare the database for each test case I want to (re-)set some data values.



My first idea was to access the table object, find the row/column and set the value. But the properties and methods provided for the mapped objects do not sufficie for that.



I can only access cells in the currently selected row, e.g. Edit('Foo') will contain value "1,0" if the 3rd row is selected (see screenshots). No property of any object contains the number of rows or columns so. I also can not access the buttons for selecting a data record.



What do I have to do to get access to these objects/properties?



Or is there another mor elegant way to set data in Access tables from TestComplete?



1 Reply

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Lea,


     


    According to the screenshots, you are using MSAA to get access to an MS Access table. Most probably, it doesn't allow you to get access to these properties and methods (TestComplete cannot affect this). Is there anybody who is testing Access tables from GUI and has a ready sample?


     


    I suggest that you consider the possibility of accessing this table via COM. Go through the "Testing Access Applications With TestComplete" article to learn how to do this.