Board index » jbuilder » QueryDataSet

QueryDataSet


2003-09-24 03:50:46 AM
jbuilder11
Hello. I have a question:
I have 2 QueryDataSet, q_a and q_b. q_b depends on the existence of a q_a
record, so I do as follows
q_a.saveChanges() ;
q_b.saveChanges() ;
But it seems like q_b.saveChanges() does not wait q_a.saveChanges() to
finish before it executes.
Is there any wait() something that I have to use between both of them, or
any thread issue that I have to take in consideration?
Thanks in advance.
Mynor Paredes
 
 

Re:QueryDataSet

I have a few questions about JBuilder's QueryDataSet that has reference to
an appropriate QueryResolver
1. after I call deleteRow() or deleteAllRows() do I need to call
saveChanges()?
When deleteRow() method is called the data is deleted from the QueryDataSet
but not from the Database, isn't it?
2. I noticed that some QueryDataSet methods require a prior call of the
open() method. (i.e. getRowCoung()). When do I need to open QueryDataSet? Do
I need to call close() method and when?
Alex
 

Re:QueryDataSet

In <3fa04c65$ XXXX@XXXXX.COM >Alex Terehoff wrote:
Quote
I have a few questions about JBuilder's QueryDataSet that has
reference to an appropriate QueryResolver

1. after I call deleteRow() or deleteAllRows() do I need to call
saveChanges()?
When deleteRow() method is called the data is deleted from the
QueryDataSet but not from the Database, isn't it?
Correct.. Your local dataset must be "resolved" to the database.. (
hence it is called the "Provide/Resolve Model"..<G>)
Quote
2. I noticed that
some QueryDataSet methods require a prior call of the open() method. (
i.e. getRowCoung()). When do I need to open QueryDataSet? Do I need to
call close() method and when?
If you are operating on the data, you need to "open" it.. If you are
operating on the metadata, you do not..
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.html
====================================================
 

{smallsort}

Re:QueryDataSet

Thank you John
Alex
"John B. Moore (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote
In <3fa04c65$ XXXX@XXXXX.COM >Alex Terehoff wrote:
>I have a few questions about JBuilder's QueryDataSet that has
>reference to an appropriate QueryResolver
>
>1. after I call deleteRow() or deleteAllRows() do I need to call
>saveChanges()?
>When deleteRow() method is called the data is deleted from the
>QueryDataSet but not from the Database, isn't it?

Correct.. Your local dataset must be "resolved" to the database.. (
hence it is called the "Provide/Resolve Model"..<G>)

>2. I noticed that
>some QueryDataSet methods require a prior call of the open() method. (
>i.e. getRowCoung()). When do I need to open QueryDataSet? Do I need to
>call close() method and when?

If you are operating on the data, you need to "open" it.. If you are
operating on the metadata, you do not..

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.html
====================================================
 

Re:QueryDataSet

Hello
How can I programmatically loop through the results of my query. I want to assign each field to a variable, can someone point me in the direction of some example code on how to do this???
Thanks
Jake
 

Re:QueryDataSet

Jakem Schott wrote:
Quote
Hello

How can I programmatically loop through the results of my query. I want to assign each field to a variable, can someone point me in the direction of some example code on how to do this???

Thanks

Jake
Do you need to use the QueryDataSet or can you use standard JDBC ResultSet?
The best way to do something like this, is to use Reflection. Using
something like ResultSetMetaData can provide what you need.
Curious however, why you want to assign the results to a variable. You
would be much better off using RowSets for cached results from a query.
Much less work, similar results.