2

I have inherited a VB6 project written using DAO on largely Access data.

The code is poor and the application often generates a Windows crash (program "has encountered a problem and needs to close") with large sets of data. I suspect large parts need rewriting.

I want to start with using DAO to relate a recordset of invoice headers (which has one record per invoice) and another of invoice lines (which has several records per invoice). Two fields link these recordsets: Date and Reference.

Though I have seen an example of creating a DAO.Relation, I have no idea how to use it and would welcome some advice please.

finch
  • 549
  • 1
  • 6
  • 18
  • Welcome to SO, please read the [FAQ](http://stackoverflow.com/faq#questions) before asking questions. – MarioDS Oct 16 '12 at 18:06
  • @Mario De Schaepmeester, I had read the FAQ! I thought my question was OK. Basically, how do I use DAO.Relation? The rest of my posting explains what I am trying to seek. What would you rather I had written? – finch Oct 16 '12 at 18:35
  • I see now that your question is probably about VBA? I thought it was about Visual Basic programming... My bad – MarioDS Oct 16 '12 at 19:06
  • @Mario De Schaepmeester, the program is in VB6, as mentioned in my original posting! – finch Oct 16 '12 at 19:30
  • 1
    If you're looking for a feature like .Net heirarchical datasets, there's nothing like that in DAO or ADO. – MarkJ Oct 17 '12 at 07:45
  • 1
    @markj thank you for the information; I am sure you are right! If you enter this as an answer, I will accept it and you can get your points. – finch Feb 19 '13 at 14:31
  • @finch OK, have done! – MarkJ Feb 19 '13 at 14:49

1 Answers1

1

If you're looking for a feature like .Net hierarchical datasets, there's nothing like that in DAO or ADO.

MarkJ
  • 30,070
  • 5
  • 68
  • 111