• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is there any way to send the contents of a resultset to a mail using javamail  RSS feed

 
sameer chandra vogeti
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 22841
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any sample code for that as i am new to java development.
 
Paul Clapham
Sheriff
Posts: 22841
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!