Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.databases > #89
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!novia!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail |
|---|---|
| From | "Lew" <lew@THRWHITE.remove-dii-this> |
| Subject | Re: java resultset |
| Message-ID | <xKGdne2gk9rrLrrVnZ2dnUVZ_gWdnZ2d@comcast.com> (permalink) |
| X-Comment-To | comp.lang.java.databases |
| Newsgroups | comp.lang.java.databases |
| In-Reply-To | <H3MVj.276$i51.180@trndny09> |
| References | <H3MVj.276$i51.180@trndny09> |
| Content-Type | text/plain; charset=IBM437 |
| Content-Transfer-Encoding | 8bit |
| X-Gateway | time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] |
| Lines | 37 |
| Date | Wed, 27 Apr 2011 15:21:41 GMT |
| NNTP-Posting-Host | 96.60.20.240 |
| X-Complaints-To | news@tds.net |
| X-Trace | newsreading01.news.tds.net 1303917701 96.60.20.240 (Wed, 27 Apr 2011 10:21:41 CDT) |
| NNTP-Posting-Date | Wed, 27 Apr 2011 10:21:41 CDT |
| Organization | TDS.net |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.databases:89 |
Show key headers only | View raw
To: comp.lang.java.databases
Dave Miller wrote:
> a wrote:
>> Hi
>>
>> Can I create a resultset that have all the specified columns? And, I
>> have to
>> populate it with data. When the database is offline, then I can
>> simulate it
>> to test my code. Please provide simple example.
>>
>> Thanks
>>
>>
> A resultset is stored in memory - I'm unsure what you mean about
> "offline". To get all of the columns, ask for all of the columns.
>
> A simple resultset example:
>
> java.sql.Connection c = DriverManager.getConnection("your driver and
> path to db", "your db user id", "your db password");
> Statement get = c.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
> ResultSet.CONCUR_READ_ONLY);
> ResultSet rs = get.executeQuery("your query");
>
> //use your result set from here
The newer RowSet interface lets you disconnect from the database while using
the results, unlike normal ResultSets.
--
Lew
---
* Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.databases | Previous | Next — Previous in thread | Find similar
java resultset "a" <a@THRWHITE.remove-dii-this> - 2011-04-27 15:21 +0000
Re: java resultset "Dave Miller" <dave.miller@THRWHITE.remove-dii-this> - 2011-04-27 15:21 +0000
Re: java resultset "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:21 +0000
csiph-web