| Author |
Is there any way to send the contents of a resultset to a mail using javamail
|
sameer chandra vogeti
Greenhorn
Joined: Jan 31, 2008
Posts: 12
|
|
Hi,
Currently my application requires to send out mail's at regular intervals and it fetches data from a DB using Plain JDBC,is there any method through which i can export the content's of a resultset to a mail and send it across to required people.
Please help
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16479
|
|
|
A ResultSet doesn't have any "contents". However it is possible to read all of the records which it manifests, and I am sure you have seen code which does that. So read all of the records and format them into text in a way which is suitable for e-mailing. Then send that text.
|
 |
sameer chandra vogeti
Greenhorn
Joined: Jan 31, 2008
Posts: 12
|
|
Any sample code for that as i am new to java development.
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16479
|
|
|
Sample code for what? Extracting data from a ResultSet? Read any JDBC tutorial. Sending e-mail? Have a look at the sample programs in your JavaMail download.
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12907
|
|
JDBC tutorial
Fundamentals of the JavaMail API
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: Is there any way to send the contents of a resultset to a mail using javamail
|
|
|