Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to copy the result from a Select into a DataSet ?

Reply
Thread Tools

How to copy the result from a Select into a DataSet ?

 
 
Pierre
Guest
Posts: n/a
 
      06-24-2007
Hi,

How to copy the result from a Select into a DataSet ?

Thanks,

Tintin92


 
Reply With Quote
 
 
 
 
bencoe@gmail.com
Guest
Posts: n/a
 
      06-24-2007
On Jun 24, 12:32 pm, "Pierre" <n...@spam.com> wrote:
> Hi,
>
> How to copy the result from a Select into a DataSet ?
>
> Thanks,
>
> Tintin92


An SQL select statement? SELECT x FROM x WHERE X AND Y?


Ben.


 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      06-29-2007
"Pierre" wrote:
>> How to copy the result from a Select into a DataSet ?


wrote:
> An SQL select statement? SELECT x FROM x WHERE X AND Y?


Assuming SQL via JDBC:

<http://java.sun.com/javase/6/docs/api/java/sql/ResultSet.html>
obtained from, say, a
<http://java.sun.com/javase/6/docs/api/java/sql/PreparedStatement.html>

PreparedStatement pstmt = con.prepareStatement(
"SELECT name, salary WHERE id = ?" );
ps.setString( 1, "1719232931" );
ResultSet rs = ps.executeQuery();
String name = rs.getString( "name" );
BigDecimal salary = getBigDecimal( "salary" );

Assuming anything other than what we've guessed, you'll have to be a lot more
specific. What kind of "Select"? What is a "DataSet"?

--
Lew
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
1. Ruby result: 101 seconds , 2. Java result:9.8 seconds, 3. Perl result:62 seconds Michael Tan Ruby 32 07-21-2005 03:23 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N ASP .Net 2 10-31-2003 01:05 PM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N ASP .Net 2 10-31-2003 02:42 AM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N ASP .Net 1 10-31-2003 02:39 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57