how to send message
how to send sms in database data using c# windows application
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Francis SusaimichaelPosted Apr 8, 2016, 2:28 AM
any na,esspace for message send
What you meant exactly? Add some more clarity on your question.
GokulPosted Apr 7, 2016, 7:30 AM
Rajeesh MenothPosted Apr 6, 2016, 2:25 AM
Francis SusaimichaelPosted Apr 6, 2016, 2:15 AM
I guess, you want to get the data from the DB and sent the data as SMS. I'm not sure what type of data you are retrieve from DB. I hope it may be any password/code or some thing like that. Also, the data size will be from 1 to 120 char length.
You can get the data from the DB, you could do some thing like below:
{
DataTable dt = new DataTable();
string strConString = "Data Source=(local);Initial Catalog=MyDB;Integrated Security=True";
using (SqlConnection con = new SqlConnection(strConString))
{
con.Open();
SqlCommand cmd = new SqlCommand("Select * from tblStudents", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
con.Close();
}
return dt;
}