Board index » jbuilder » DataSet exception problem

DataSet exception problem


2005-01-03 02:07:05 AM
jbuilder9
Hi All,
Happy New Year!
I got another problem here.
After I creat a query with the queryDataSet class and try to get the value
of each column at the runtime with the statement.
myQueryDataSet.getString(1), during the run time, the system sometime tell
me there is an QueryDataSet exception, sometime tell me the queryDataSet is
not open. I am so confused. Can you please tell me what the major problem
that I have? Thanks
Li
 
 

Re:DataSet exception problem

In <41d839b7$ XXXX@XXXXX.COM >jiangl_1994 wrote:
Quote
Hi All,
Happy New Year!
I got another problem here.
After I creat a query with the queryDataSet class and try to get the
value of each column at the runtime with the statement.
myQueryDataSet.getString(1), during the run time, the system sometime
tell me there is an QueryDataSet exception, sometime tell me the
queryDataSet is not open. I am so confused. Can you please tell me
what the major problem that I have? Thanks
You always have to "open" a querydataset. Generally if you set to
"true" the flag "open on execution" then immediately upon execution it
will be open..
Example:
_qds.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(this.
g_database, arg_sSQL, null, true, Load.ALL));
_qds.executeQuery();
. it will now be open.. but if you do the following
_qds.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(this.
g_database, arg_sSQL, null, false, Load.ALL));
_qds.executeQuery();
. it will not be open.. and you would need to call..
_qds.open();
All of this is outlined in the help...<hint, hint..>
--
=============================================
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/paperFAQ.html
====================================================