wood burning stoves 2.0*
The moose likes JDBC and the fly likes Empty ResultSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Empty ResultSet" Watch "Empty ResultSet" New topic
Author

Empty ResultSet

wilhe york
Greenhorn

Joined: Mar 20, 2001
Posts: 4
Microsoft's ADODB.RecordSet allows a developer to build an empty RecordSet by speicfying the Field.Name,Field.Type and a row position. Being pretty new in the JDBC world, is there something comparable in JDBC?


me?myself:I
Bjarki Holm
Author
Ranch Hand

Joined: May 25, 2001
Posts: 65
Wilhe,
why would you want that?
------------------
Bjarki Holm
Author of Professional Java Data


Bjarki Holm
wilhe york
Greenhorn

Joined: Mar 20, 2001
Posts: 4
Originally posted by Bjarki Holm:
Wilhe,
why would you want that?

I was just curious. I used the empty RecordSet when doing ASP because it was easier and cleaner looking than arrays. It also allowed me to use MTS to manage the data structure on IIS. I could also use the user defined Recordset as a database update dump when the appropriate data was collected and could do cool things like sorting and getting distincts. Of course there is XSLT and the collection API in Java so I am not missing anything. Just thought it would be another tool on the batman belt.
Bjarki Holm
Author
Ranch Hand

Joined: May 25, 2001
Posts: 65
I get your point. I recommend using the Collection API, is that suits your app.
Cheers,

------------------
Bjarki Holm
Author of Professional Java Data
[This message has been edited by Bjarki Holm (edited June 12, 2001).]
wilhe york
Greenhorn

Joined: Mar 20, 2001
Posts: 4
Originally posted by Bjarki Holm:
I get your point. I recommend using the Collection API, is that suits your app.
Cheers,

Is there anything in your book that shows interesting Data Structures that would be comparable?
Bjarki Holm
Author
Ranch Hand

Joined: May 25, 2001
Posts: 65
If I understand you correctly (which I'm not sure I am ), you should have a look at the JDO architecture, which is covered in the book to some extent. Check out http://access1.sun.com/jdo for more details.
Cheers,

------------------
Bjarki Holm
Author of Professional Java Data
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
I'm not totaly sure what you are looking for, but I have one possible solution. What you might do is make a class that models your data, then place objects of that type into a Vector for example.
Am I being clear, and would this be an approac to solve your problem?
Jason Menard
wilhe york
Greenhorn

Joined: Mar 20, 2001
Posts: 4
Originally posted by Jason Menard:
I'm not totaly sure what you are looking for, but I have one possible solution. What you might do is make a class that models your data, then place objects of that type into a Vector for example.
Am I being clear, and would this be an approac to solve your problem?
Jason Menard

Thanks. I have actually built XML driven Beans that model this type of structure... All things are well and I haven't considered this ADODB.RecordSet structure in almost a year now. I just wondered if anyone had done something like this using actual Database drivers which would allow one to used and abuse cached data before submitting (if necessary) updates to a database.
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Okay I understand a little better now. If you develop with JBuilder, Borland's DataSet APIs seem to do things similar to this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Empty ResultSet
 
Similar Threads
Loading file data into a DB2 table using java
what's "Assertion expressions should not contain side effects." mean?
Need guidance for SCJD exam preparation
I am a new comer,who can u tell me what means "JQ+"
java sql parser