Data base connectivity

#1

Can anyone provide code how to connect with Oracle database from not press and retrieve SQL query results in chat window …in addition to that how to send mail to user as an attachment?