Solved

MIDAS - Nested? ClientDataSets

Posted on 1998-11-26
15
262 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 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