Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Send email to every email registered in Database

Posted on 2004-10-08
1
Medium Priority
?
151 Views
Last Modified: 2010-04-15
Hi,

onpageload I want to fetch all email addresses in my employee database into a textbox separated with ",". This textfield will be used on a page for sending a newsletter to my employees.

anyone?
0
Comment
Question by:ginola14
1 Comment
 
LVL 18

Accepted Solution

by:
tusharashah earned 1000 total points
ID: 12258378
To fetch emails from Database you can create a DataReader and Add it to TextBox One by one like following:


----------------------------------------------------------------------------------------------------------------------------------

string strConn = "Your ConnectionString";
OleDbConnection myConnection = new OleDbConnection(strConn);
myConnection.Open();
       
OleDbCommand cmd2 = new OleDbCommand("Select Emails from EmployeeTable;", myConnection)

OleDbDataReader objDR;
objDR = cmd2.ExecuteReader();
string strEmails = "";
while( objDR.Read() )
{
   strEmails += objDR["EmailColumn"].ToString() + ";" ;
}
objDR.Close();
 
 ----------------------------------------------------------------------------------------------------------------------------------

-tushar
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question