Advertisement
Guest User

Untitled

a guest
Oct 13th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. private void btnSendEmails_Click(object sender, EventArgs e)
  2. {
  3. string userName = txtUsername.Text;
  4. string password = txtPassword.Text;
  5. string tableSpace = txtTableSpace.Text;
  6. string tableName = txtTableName.Text;
  7. string statement = "Select * FROM " + tableName;
  8.  
  9. //create the connection to Oracle using the above log in information
  10. string connectionString = "Provider=OraOLEDB.Oracle;Data Source=" + tableSpace + ";User Id=" + userName + ";Password=" + password + ";";
  11. System.Data.OleDb.OleDbConnection cnn = new System.Data.OleDb.OleDbConnection(connectionString);
  12. cnn.Open();
  13. System.Data.OleDb.OleDbDataAdapter Dadpt = new System.Data.OleDb.OleDbDataAdapter(statement, cnn);
  14.  
  15.  
  16. DataSet ds = new DataSet();
  17. Dadpt.Fill(ds);
  18.  
  19. cnn.Close();
  20. //OpenFileDialog attachment;
  21.  
  22. CreateRTFMailItem(ds);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement