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
--
Dave Miller
Java Web Hosting at:
http://www.cheap-jsp-hosting.com/


|