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

L

Lew

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"?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,742
Latest member
AshliMayer

Latest Threads

Top