Solved

MIDAS - Nested? ClientDataSets

Posted on 1998-11-26
15
259 Views
Last Modified: 2010-04-04
I'm trying do to something very simple - but I'm stuck.

I'm using 3 TClientDataSets CDS1, CDS2 and CDS3.
I'm not connected to a server or something.  It's just local, loaded from files.

CDS1 is the master of CDS2
CDS2 is the master of CDS3

It works fine for CDS1 and CDS2 but when I try adding CDS3 total chaos rules.

I figured out this probably is a nested dataset, I figured out I need to use TDataSetFields and a Provider but I just can't find out how.

Can anyone help me on this?
0
Comment
Question by:Odie
  • 7
  • 6
  • 2
15 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1348007
Odie,

I guess you'll find everything you need in this paper :

http://www.inprise.com/midas/papers/technical/

Zif.
0
 
LVL 1

Author Comment

by:Odie
ID: 1348008
Nope.  I didn't find the information I need in there.  Thanks anyway.

I did some more research on the problem and the problem starts when I add lookup fields (no problem with calculated fields).  And I don't need to use the Provider or TDataSetFields stuff, I suppose.


0
 
LVL 1

Author Comment

by:Odie
ID: 1348009
Nope.  I didn't find the information I need. Thanks anyway.

I did some more research on the problem and found that it occurs when I add lookup-fields (calculated fields don't give the problem).

Everything works alright without them.  (But I need them.)

The error occurs when trying to edit CDS3.  It says "DataSet not in Edit or (Insert?) Mode."
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1348010
and the dataset is set into edit mode?
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1348011
May I know why you use MIDAS since data is loaded from local files?
0
 
LVL 1

Author Comment

by:Odie
ID: 1348012
It seems to be handy.  Lookup stuff etc.  I do not need to distribute the BDE.  Future extension are possible - in case I really will need MIDAS.

and to Zif:
Active = true
State = dsBrowse

and it's only CDS3 which gives the error
CDS1 & 2 are in the same state and there's no problem editing them

when I try editing CDS3 a second time, I get a stack overflow (even after restarting the program, and not clearing the dataset).

BTW - have you tried putting up a simple form with my configuration?  Does it work?
0
 
LVL 1

Author Comment

by:Odie
ID: 1348013
Adjusted points to 400
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 4

Expert Comment

by:dwwang
ID: 1348014
Hi, I have written such kind of programm before, and seems have no problem, although not in TClientDataSet. Would you made it more specific, or e-mail a sample code to me?

e-mail: dw-wang@263.net
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1348015
Hi, sorry for the delay.

I found out the problem is that you use lookupfield as the same field with the masterfield. Seems this is not allowed in ClientDataSets.

I tried with TQueries, and found no problem.
0
 
LVL 1

Author Comment

by:Odie
ID: 1348016
I'll have a look.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1348017
Ok, any progress, leave me a message.
I'm also concerning about this topic(as well as the points ^_^)
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1348018
Hi, how are things going?
0
 
LVL 1

Author Comment

by:Odie
ID: 1348019
Sorry, forgotten.  I've worked around it.  Guess you were right, you can as well answer it now.
0
 
LVL 4

Accepted Solution

by:
dwwang earned 400 total points
ID: 1348020
Glad to here that! So how did you work it around, by using another field for lookup?

Merry Christmas and happy new year!

Regards,
Wang
0
 
LVL 1

Author Comment

by:Odie
ID: 1348021
By using CloneCursor to make another CDS which didn't have the other table as master;
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now