Board index » jbuilder » Weird behaviour

Weird behaviour


2003-09-22 07:40:41 PM
jbuilder1
Hi,
I have 3 tableDataSets (patientDataSet, ConditionsDataSet, TeethDataSet),
each with their own custom provider or resolver. patationDataSet holds the
patients personal details, ConditionDataSet holds the different conditions
the a tooth can be in, and TeethDataSet holds records of visit dates, the
patient number and a condition for each tooth. The problem is if i have the
patientDataSet disabled then i can insert into the teethDAtaSet and save,
but if i have the patientDataSet enabled i cannot save to the teethDataSet,
and get an unknown column name error.
I know i have posted this before, but i have more info now
Thanks
Rudy
 
 

Re:Weird behaviour

Rudy wrote:
Quote
Hi,

I have 3 tableDataSets (patientDataSet, ConditionsDataSet, TeethDataSet),
each with their own custom provider or resolver. patationDataSet holds
the
patients personal details, ConditionDataSet holds the different
conditions the a tooth can be in, and TeethDataSet holds records of visit
dates, the
patient number and a condition for each tooth. The problem is if i have
the patientDataSet disabled then i can insert into the teethDAtaSet and
save, but if i have the patientDataSet enabled i cannot save to the
teethDataSet, and get an unknown column name error.

I know i have posted this before, but i have more info now

Thanks
Rudy
I will assume that the tables have a primary key to foreign key
relationship? Is that a safe assumption?
If this is the case, then thge table expecting a foreign keyu to primary
mapping will not allows an insert in the relational table without the
primary key more than likely. Since the foreign ket RI is expecting a
primary key in the parent table the DB is probably enforcing this
relationship.
 

Re:Weird behaviour

Thanks,
I do have a PK to FK relationship but when i make the SELECT query to obtain
the teethSet i use the patient number in the where clause to get the
relevant records. So there is no direct link, that i know of, between the
tableTeethSet and the tablePatientSet.
With this in mind is there anyway to remove this behaviour, is it anything
to with resolve order??
Thanks Rudy
"pNichols" < XXXX@XXXXX.COM >wrote in message
Quote
Rudy wrote:

>Hi,
>
>I have 3 tableDataSets (patientDataSet, ConditionsDataSet,
TeethDataSet),
>each with their own custom provider or resolver. patationDataSet holds
>the
>patients personal details, ConditionDataSet holds the different
>conditions the a tooth can be in, and TeethDataSet holds records of
visit
>dates, the
>patient number and a condition for each tooth. The problem is if i have
>the patientDataSet disabled then i can insert into the teethDAtaSet and
>save, but if i have the patientDataSet enabled i cannot save to the
>teethDataSet, and get an unknown column name error.
>
>I know i have posted this before, but i have more info now
>
>Thanks
>Rudy

I will assume that the tables have a primary key to foreign key
relationship? Is that a safe assumption?

If this is the case, then thge table expecting a foreign keyu to primary
mapping will not allows an insert in the relational table without the
primary key more than likely. Since the foreign ket RI is expecting a
primary key in the parent table the DB is probably enforcing this
relationship.

 

{smallsort}

Re:Weird behaviour

Sorry i am starting a new thread but unfortunately i cannot see my last post
to reply to that. Well the problem i have was explained before, ie i am
getting an unknown column name error for a tableDataSet when the column is
there. This error occurs, as i have found out when the following occurs:
1. I call a clientProvider class (which provides the data for the table via
rmi, using a SQL statement)
2. This clientProvider is called in the following way along with the
clientResolver
clientProvider1.setQuery("SELECT * FROM TOOTH_TYPES",
"PATIENT_DETAILS");
tableDataSet1.setProvider(clientProvider1);
tableDataSet1.setResolver(clientResolver1);
tableDataSet1.open();
clientProvider1.setQuery("SELECT * FROM APP_TYPE", "APP_TYPE");
tableDataSet2.setProvider(clientProvider1);
tableDataSet2.setResolver(clientResolver1);
tableDataSet2.open();
3. The data in these tableDataSets is shown in 2 jdbTables
4. There are navigation panels and status lables
5. The problem occurs with one table depending on which order they are in,
whether they are opened etc when i make a change to the jdbTable and use the
save function on the nav panel
6. However after the exceptions if thrown and i try the save again on the
same table, the data is saved.
7. I have tried using separate instances of the clientProviders and
clientResolvers but no luck. These providers and resolvers are similar to
the DataSetData project that comes with jBuilder (8)
Thanks for your time,
I have tried everything, so any idea will be appreciated
Rudy
 

Re:Weird behaviour

Someone said that i am multiplying the tablesets, which means some columns
which should not be are present. Is this true???
Thanks
Rudy
"Rudy" < XXXX@XXXXX.COM >wrote in message
Quote
Sorry i am starting a new thread but unfortunately i cannot see my last
post
to reply to that. Well the problem i have was explained before, ie i am
getting an unknown column name error for a tableDataSet when the column is
there. This error occurs, as i have found out when the following occurs:

1. I call a clientProvider class (which provides the data for the table
via
rmi, using a SQL statement)
2. This clientProvider is called in the following way along with the
clientResolver

clientProvider1.setQuery("SELECT * FROM TOOTH_TYPES",
"PATIENT_DETAILS");
tableDataSet1.setProvider(clientProvider1);
tableDataSet1.setResolver(clientResolver1);
tableDataSet1.open();

clientProvider1.setQuery("SELECT * FROM APP_TYPE", "APP_TYPE");
tableDataSet2.setProvider(clientProvider1);
tableDataSet2.setResolver(clientResolver1);
tableDataSet2.open();

3. The data in these tableDataSets is shown in 2 jdbTables
4. There are navigation panels and status lables
5. The problem occurs with one table depending on which order they are
in,
whether they are opened etc when i make a change to the jdbTable and use
the
save function on the nav panel
6. However after the exceptions if thrown and i try the save again on the
same table, the data is saved.
7. I have tried using separate instances of the clientProviders and
clientResolvers but no luck. These providers and resolvers are similar to
the DataSetData project that comes with jBuilder (8)

Thanks for your time,
I have tried everything, so any idea will be appreciated
Rudy


 

Re:Weird behaviour

In < XXXX@XXXXX.COM >Rudy wrote:
Quote
Someone said that i am multiplying the tablesets, which means some
columns which should not be are present. Is this true???
My guess is that you should not be using the same provider and resolver
for both tables.. (because the they apparently are not designed to be
use in the way you are using them..) It appears that the resolver is
"remembering" columns from the previously request..
John...
--
=============================================
TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
Post all questions and replies to this newsgroup ONLY
For papers on DataExpress, Applets, JSP, and Web Development go to:
www.microps.com/mps/papers.htm
====================================================
 

Re:Weird behaviour

Hi there,
Thanks for the reply. However i am using different instances of the
providers and resolvers
clientProvider1.setQuery("SELECT * FROM TOOTH_TYPES", "TOOTH_TYPES", ");
tableDataSet1.setProvider(clientProvider1);
tableDataSet1.setResolver(clientResolver1);
//tableDataSet1.open();
clientProvider2.setQuery("SELECT * FROM APP_TYPE", "APP_TYPE");
tableDataSet2.setProvider(clientProvider2);
tableDataSet2.setResolver(clientResolver2);
//tableDataSet2.open();
However, i get the error on the first save of the TOOTH_TYPES dataSet...Its
strange and i will have to find the bug some how.
Any idea would be helpful.
Thanks
Rudy
"John B. Moore (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote
In < XXXX@XXXXX.COM >Rudy wrote:
>Someone said that i am multiplying the tablesets, which means some
>columns which should not be are present. Is this true???

My guess is that you should not be using the same provider and resolver
for both tables.. (because the they apparently are not designed to be
use in the way you are using them..) It appears that the resolver is
"remembering" columns from the previously request..

John...

--
=============================================
TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
Post all questions and replies to this newsgroup ONLY
For papers on DataExpress, Applets, JSP, and Web Development go to:
www.microps.com/mps/papers.htm
====================================================
 

Re:Weird behaviour

In < XXXX@XXXXX.COM >Rudy wrote:
Quote
Hi there,
Thanks for the reply. However i am using different instances of the
providers and resolvers
Good, your first example did not indicate that as you used
"clientProvider1" for both.
Do you have any static member fields in the clientProvider class that
might carry over..???
John..
--
=============================================
TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
Post all questions and replies to this newsgroup ONLY
For papers on DataExpress, Applets, JSP, and Web Development go to:
www.microps.com/mps/papers.htm
====================================================
 

Re:Weird behaviour

Hi there,
I have tried to use more than 1 instance ie ClientProvider1 and
ClientProvider2 all instances of ClientProvider, i have no static members
either in the cleintProvider class
Thanks, i have really hit a brick wall
Rudy
"John B. Moore (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote
In < XXXX@XXXXX.COM >Rudy wrote:
>Hi there,
>Thanks for the reply. However i am using different instances of the
>providers and resolvers

Good, your first example did not indicate that as you used
"clientProvider1" for both.

Do you have any static member fields in the clientProvider class that
might carry over..???

John..
--
=============================================
TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
Post all questions and replies to this newsgroup ONLY
For papers on DataExpress, Applets, JSP, and Web Development go to:
www.microps.com/mps/papers.htm
====================================================