Solved

MIDAS - Nested? ClientDataSets

Posted on 1998-11-26
15
261 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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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
 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

810 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