Board index » delphi » D4 and DataSource property nightmare! D4 bug in editor buffers

D4 and DataSource property nightmare! D4 bug in editor buffers

Hi all,
We're having a nightmare  setting various datasource properties with D4! If
the related TDataSource component is in another  unit, and that form is not
openned, when opening my form the datasource properties are set to nil!
Whitout any notice! All the time we have to review some form simply because
its properties are reset by Delphi editor!
This never happened in D3 to me!
Besides, If I set a datasource property of a TQuery for instance, to a
TDataSet located in another form, TForm2, Delphi tries to save TForm2 also,
altough I didn't change anything in it! In my case TForm2.dfm would be read
only, as being checked out by another meeber of our team!

Is there a solution to this? We're losing our patience seting same property
again and again!

TIA,
Remus

 

Re:D4 and DataSource property nightmare! D4 bug in editor buffers


Have you tried creating a Data Module ?? This can contain "All" of your
data sources in one place.

Re:D4 and DataSource property nightmare! D4 bug in editor buffers


This happens with Delphi 3 too. I'm using Delphi 3 and everytime I'm losing
the Datasource's dataset property. Maybe this have to do with visual
inheritance of forms. And building datamodules will not work, because all
my tables are in datamodules.

Somebody can help us?

Wagner R. Landgraf
wag...@automa.com.br

Rusanu Remus <rre...@yahoo.com> wrote in article
<73lqkj$e...@forums.borland.com>...

Quote
> Hi all,
> We're having a nightmare  setting various datasource properties with D4!
If
> the related TDataSource component is in another  unit, and that form is
not
> openned, when opening my form the datasource properties are set to nil!
> Whitout any notice! All the time we have to review some form simply
because
> its properties are reset by Delphi editor!
> This never happened in D3 to me!
> Besides, If I set a datasource property of a TQuery for instance, to a
> TDataSet located in another form, TForm2, Delphi tries to save TForm2
also,
> altough I didn't change anything in it! In my case TForm2.dfm would be
read
> only, as being checked out by another meeber of our team!

> Is there a solution to this? We're losing our patience seting same
property
> again and again!

> TIA,
> Remus

Re:D4 and DataSource property nightmare! D4 bug in editor buffers


Replace in my original message 'TForm2' with 'TDataModule2' and you will
have the same problem...
It really makes no difference the type of module, just the fact that is
loaded or not by Delphi.

Remus

Quote
Dan Labus wrote in message <73m1eb$ev...@forums.borland.com>...
>Have you tried creating a Data Module ?? This can contain "All" of your
>data sources in one place.

'All'? No offense, but how about one data module with several hundred
TQueries? would you be able to find the one you're looking for?

Re:D4 and DataSource property nightmare! D4 bug in editor buffers


I had the same problem with D3, except only with Lookup Links.
To work around, I Saved my project so that my top level forms would always
open when I opened the project.

Re:D4 and DataSource property nightmare! D4 bug in editor buffers


Darren,

- That workaround surely solves the problem? You have never losted
dataset's again?
- How do you do that workaround? If I choose "Save desktop" in Environment
options, Delphi always save the forms that are on the screen. Do you have
to reopen all your top forms every time you close Delphi? Or there is an
automatic way to do it?

Thanks

Wagner R. Landgraf
wag...@automa.com.br

Darren Whaley <Dwha...@Discover-Net.Net> wrote in article
<73mc3h$f...@forums.borland.com>...

Quote
> I had the same problem with D3, except only with Lookup Links.
> To work around, I Saved my project so that my top level forms would
always
> open when I opened the project.

Re:D4 and DataSource property nightmare! D4 bug in editor buffers


This doesn't happen to me.  My form-datamodule links are preserved, and I am
never prompted to save the datamodule unless I modify something on it.  I
haved tried all manner of things to "break" it, but it always works.  Are
you using standard VCLcomponents?  Please lay out a simple test case
starting with "create a new project" that will demonstrate the problem.

V/R
Russell L. Smith

Quote
Rusanu Remus wrote in message <73lqkj$e...@forums.borland.com>...
>We're having a nightmare  setting various datasource properties with D4! If
>the related TDataSource component is in another  unit, and that form is not
>openned, when opening my form the datasource properties are set to nil!

>Besides, If I set a datasource property of a TQuery for instance, to a
>TDataSet located in another form, TForm2, Delphi tries to save TForm2 also,
>altough I didn't change anything in it! In my case TForm2.dfm would be read
>only, as being checked out by another meeber of our team!

Re:D4 and DataSource property nightmare! D4 bug in editor buffers


I think that the keystone of the problem is that I work on a team and we
have to lock files. It's always happened to me only if the refered
datamodule/form is read-only. It's not caused by VSS add-ons, like the one
I'm using. It's happening on my coleagues machines as well, altough they
don't use a VSS add-on for Delphi.

Regards,
Remus

Re:D4 and DataSource property nightmare! D4 bug in editor buffers


We also perform team development (with PVCS).  One of our projects has over
500 units/forms.  Only units which are checked out for "edit" are writeable;
all else is read-only.  It still works fine...

FYI, we use Version Manager separately rather than use a VSS add-on.  It
sounds like you have already eliminated this possibility, though.

Can you walk me through a test case?

V/R
Russell L. Smith

Quote
Rusanu Remus wrote in message <73oc37$g...@forums.borland.com>...
>I think that the keystone of the problem is that I work on a team and we
>have to lock files. It's always happened to me only if the refered
>datamodule/form is read-only. It's not caused by VSS add-ons, like the one
>I'm using. It's happening on my coleagues machines as well, altough they
>don't use a VSS add-on for Delphi.

Re:D4 and DataSource property nightmare! D4 bug in editor buffers


Hi all.

This problem has bugged me for some time too.

AFAIK you have to use form inherientance to see it.

Here is a walk through that should do it every time... (At least it does for
me)

Stage 1:
1) Create a form, call it something like frmTemplate
2) Place a datasource on this form
3) Save form, add it to the repository
4) Close that project

Stage 2:
1) Create a new application, remove the main form
2) INHERIT a form from the base form you placed in the repository in stage 1
3) Add a datamodule to this project
4) Place a TTable or TQuery or TClientDataSet on the datamodule (it doesn't
matter which)
5) Use the datamodule from the inherited form, connect the datasource to the
dataset on the datamodule. If you like you can use a TDBGrid or other
component for visual representation.
6) Save this project.
7) Close All
8) Reopen this project.
9) Compile. Almost every time, the datasource on the form loses the
connection to the dataset - no warning. Just as Rasanu experiences.

At first I thought "No problems - just move the datamodule up the create
order in the project". No good. Although the Datamodule is the first form
created in my projects, the dataSources on the main form still lose the
connection to the datasets.

I am guessing that it has something to do with the creation order of things,
but darned if I can fix it. Moving the parent form into the autocreate list
(although it should not be necessary) does not help either.

I've looked all over for a solution too... although at the moment I just
settle for resetting the dataset properties when this happens. Can't see
anything in the FAQ's and although I don't spend all my time reading the
news groups I have searched "developers.href.com" with no luck.

It's a real bummer as I base a large amount of work on what I think is a
nice little base form with two datasources - one for searching and one for
editing. I have the datasources on the form so I can place a whole bunch of
generic code - edit, post, whatever - on the parent form and then just
inherit and tie the DataSources to datasets in a different datamodule for
each project. It makes Search/Browse/Edit forms a purely visual exercise and
most of the logic for the app is in the datamodule.

BTW: I get the same problem in Delphi 3.02 C/S and Delphi 4.02 C/S, I
usually don't develop in a team so it's not file locking/source management
problems & the example above was tested on a standalone system and has the
same problem.

What am I missing?????

Jonathon Desmond
Quasar Technology P/L
Brisbane, Australia
** Remove "Spammenot" from e-mail address to reply via e-mail **

Quote
Russell L. Smith wrote in message <73qfl0$i...@forums.borland.com>...
>We also perform team development (with PVCS).  One of our projects has over
>500 units/forms.  Only units which are checked out for "edit" are
writeable;
>all else is read-only.  It still works fine...

>FYI, we use Version Manager separately rather than use a VSS add-on.  It
>sounds like you have already eliminated this possibility, though.

>Can you walk me through a test case?

>V/R
>Russell L. Smith

>Rusanu Remus wrote in message <73oc37$g...@forums.borland.com>...
>>I think that the keystone of the problem is that I work on a team and we
>>have to lock files. It's always happened to me only if the refered
>>datamodule/form is read-only. It's not caused by VSS add-ons, like the one
>>I'm using. It's happening on my coleagues machines as well, altough they
>>don't use a VSS add-on for Delphi.

Re:D4 and DataSource property nightmare! D4 bug in editor buffers


I finally duplicated the problem.  Have you submitted a bug report?
Quote
Jonathon Desmond wrote in message <744tgi$r6...@forums.borland.com>...
>9) Compile. Almost every time, the datasource on the form loses the
>connection to the dataset - no warning. Just as Rasanu experiences.

Re:D4 and DataSource property nightmare! D4 bug in editor buffers


Hi Russell

I was hoping someone else smarter than me had the answer!

Have I missed something or has no-one else come across this before?

It appears to be related to the form inheritence alright - Remus confirmed
in an e-mail that they have a lot of that in the work he is doing.

Although I don't spend ALL my time in the newsgroups I do read them a fair
bit, and I have seen no mention of this problem before.

I will spend the rest of today looking for answers, then if I have no luck I
will submit a bug report tomorrow.

Anyone????

Jonathon Desmond
Quasar Technology Pty Ltd
Brisbane, Australia
** Remove spammenot from e-mail address to reply **

Quote
Russell L. Smith wrote in message <747mp9$...@forums.borland.com>...
>I finally duplicated the problem.  Have you submitted a bug report?

>Jonathon Desmond wrote in message <744tgi$r6...@forums.borland.com>...
>>9) Compile. Almost every time, the datasource on the form loses the
>>connection to the dataset - no warning. Just as Rasanu experiences.

Re:D4 and DataSource property nightmare! D4 bug in editor buffers


Problem has been submitted to Inprise, Bug Number 24831.

I'll let you all know what happens......

--
Jonathon Desmond
Quasar Technology Pty Ltd
Brisbane, Australia
** Remove spammenot from e-mail address to reply **

Quote
Jonathon Desmond wrote in message <747pfd$d...@forums.borland.com>...

>I will spend the rest of today looking for answers, then if I have no luck
I
>will submit a bug report tomorrow.

>Russell L. Smith wrote in message <747mp9$...@forums.borland.com>...
>>I finally duplicated the problem.  Have you submitted a bug report?

>>Jonathon Desmond wrote in message <744tgi$r6...@forums.borland.com>...
>>>9) Compile. Almost every time, the datasource on the form loses the
>>>connection to the dataset - no warning. Just as Rasanu experiences.

Re:D4 and DataSource property nightmare! D4 bug in editor buffers


Ah, this is because you have to have all the units that are linked together in
the project.  In this case the USES clauses is not enough.

Quote
Rusanu Remus wrote:
> Hi all,
> We're having a nightmare  setting various datasource properties with D4! If
> the related TDataSource component is in another  unit, and that form is not
> openned, when opening my form the datasource properties are set to nil!
> Whitout any notice! All the time we have to review some form simply because
> its properties are reset by Delphi editor!
> This never happened in D3 to me!
> Besides, If I set a datasource property of a TQuery for instance, to a
> TDataSet located in another form, TForm2, Delphi tries to save TForm2 also,
> altough I didn't change anything in it! In my case TForm2.dfm would be read
> only, as being checked out by another meeber of our team!

> Is there a solution to this? We're losing our patience seting same property
> again and again!

> TIA,
> Remus

--
Woon, Phillip A.,       E-Mail : pw...@med.osd.mil
EDS-D/SIDDOMS           Phone  : (703)736-8678
13600 EDS Drive         FAX    : (703)742-2749
Mailstop A4S - D12
Herndon, VA 20171

Other Threads