?
Solved

Using memory resident ADO recordsets

Posted on 2006-07-16
2
Medium Priority
?
505 Views
Last Modified: 2013-12-25
Hi all,

I have been using memory resident ADO recordsets for a while in a Parent/Child relationship.  Now for the question:

Is it possible to have one parent with a child and have the child have children?  In other words, grandparent/parent/child relationship.

Here is code I am trying to play with:

           Set rsItems = New ADODB.Recordset
           Set rsItemsDtl = New ADODB.Recordset
           Set rsItemsInvDtl = New ADODB.Recordset
   
           rsItems.ActiveConnection = "provider=msdatashape;data provider=none;"
           rsItems.Open " SHAPE APPEND" & _
                " New adVarChar(40) as CustNbr, New adVarChar(100) as CustName, New adCurrency as YTD," & _
                " New adCurrency as LYYTD, New adCurrency as LY," & _
                " ((SHAPE APPEND New adVarChar(10) as chCustNbr," & _
                " New adVarChar(40) as chProductNbr, New adVarChar(100) as chProductDesc, New adVarChar(30) as chSize," & _
                " New adVarChar(10) as chMfg, New adVarChar(10) as chUnit, New adInteger as chQty," & _
                " New adCurrency as chYTD, New adInteger as chLYtdQty, New adCurrency as chLYYTD," & _
                " New adInteger as chLyQty, New adCurrency as chLY, New adVarChar(100) as chCustProd," & _
                " ((SHAPE APPEND New adVarChar(40) as chIDCustProd, New adVarChar(10) as chIDInvNbr," & _
                " New adDate as chIDInvDate, New adInteger as chIDQty, New adCurrency as chIDInvAmt)" & _
                " RELATE chCustProd to chIDCustProd) AS Child)" & _
                " RELATE CustNbr to chCustNbr) AS Child" _
                , , adOpenDynamic, adLockOptimistic

I know that I am not doing this correctly.

When answering, please provide an example.

Thanks,

Rick
0
Comment
Question by:rweiser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 17124108
looks looks like you have the code correct:
http://p2p.wrox.com/topic.asp?TOPIC_ID=24783

however, you named both levels "Child", possibly that makes it a problem.
possibly, using adOpenStatis instead of adOpenDynamic helps?

Sorry, I don't have VB on this computer...
0
 

Author Comment

by:rweiser
ID: 17126716
I was not using "GrandChild" in the code.

Thanks for your help.

Rick
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question