Click here to Skip to main content
15,891,184 members
Home / Discussions / C#
   

C#

 
AnswerRe: create patch Pin
Giorgi Dalakishvili26-Jun-08 21:51
mentorGiorgi Dalakishvili26-Jun-08 21:51 
GeneralRe: create patch Pin
leppie26-Jun-08 23:25
leppie26-Jun-08 23:25 
GeneralRe: create patch [modified] Pin
Giorgi Dalakishvili27-Jun-08 4:03
mentorGiorgi Dalakishvili27-Jun-08 4:03 
AnswerRe: create patch Pin
monSur hoq26-Jun-08 22:42
monSur hoq26-Jun-08 22:42 
Questioncan update the Configuration file at run time Pin
wasimsharp26-Jun-08 21:34
wasimsharp26-Jun-08 21:34 
AnswerRe: can update the Configuration file at run time Pin
Simon P Stevens26-Jun-08 22:14
Simon P Stevens26-Jun-08 22:14 
AnswerRe: can update the Configuration file at run time Pin
Giorgi Dalakishvili27-Jun-08 4:03
mentorGiorgi Dalakishvili27-Jun-08 4:03 
QuestionMultiThreading Pin
ali zaidi26-Jun-08 20:35
ali zaidi26-Jun-08 20:35 
I am heaving thousands of rows in a Dataset, First i have to read the first row and have to start a process that sends the message to the rows values ,and then i have to wait for completing the task then the same work will go for the next row and so on..... Acctually what i want , I want to use threads though more then ont process could run at a time so i save my time,Please it is to urgent

I m doing like this .............





public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

Thread[] th;

private void button1_Click(object sender, EventArgs e)
{
th = new Thread[10];
for (int i = 0; i < 10; i++)
{
th[i] = new Thread(new ThreadStart(SendSMS1));
}
foreach (Thread t in th)
{
t.Start();
}
}

SqlConnection con;
SqlDataAdapter da;
DataSet ds;
DataSet dsAddRow;

private void Form1_Load(object sender, EventArgs e)
{

con = new SqlConnection(@"Data Source=NZN-7FC996E32D7\SQLEXPRESS;database=smscube;integrated security=true");
string str = "SELECT S.*,U.[name] AS 'UserName',Se.SenderID AS 'pCode','0' AS 'aCode',0 AS 'Type',U.password FROM SMSLog1 S LEFT OUTER JOIN UserLogin U ON S.UserID=U.UserID LEFT OUTER JOIN usersenderid Se ON Se.UserID=S.UserID";
da = new SqlDataAdapter(str, con);
ds = new DataSet();
dsAddRow = new DataSet();
i = 0;
da.Fill(ds);
}

static int i;

public void SendSMS1()
{
if (ds.Tables[0].Rows.Count <= i)
return;
string username =Convert.ToString( ds.Tables[0].Rows[i]["UserName"]);
string password =Convert.ToString( ds.Tables[0].Rows[i]["Password"]);
string type =Convert.ToString( ds.Tables[0].Rows[i]["TYPE"]);
string pcode =Convert.ToString( ds.Tables[0].Rows[i]["pCode"]);
string acode =Convert.ToString( ds.Tables[0].Rows[i]["aCode"]);
string mobilenumber =Convert.ToString( ds.Tables[0].Rows[i]["MobileNo"]);
string message = Convert.ToString(ds.Tables[0].Rows[i]["Text"]);
Process curPro= Process.Start("http://203.145.131.149:81/login/pushurl.php?USERNAME=" + username + "&PASSWORD=" + password + "&TYPE=" + type + "&pcode=" + pcode + "&acode=" + acode + "&mnumber=" + mobilenumber + "&message=" + message);
curPro.WaitForExit();
i++;

}
}
AnswerRe: MultiThreading Pin
N a v a n e e t h26-Jun-08 21:19
N a v a n e e t h26-Jun-08 21:19 
GeneralRe: MultiThreading Pin
ali zaidi26-Jun-08 21:40
ali zaidi26-Jun-08 21:40 
GeneralRe: MultiThreading Pin
N a v a n e e t h26-Jun-08 23:02
N a v a n e e t h26-Jun-08 23:02 
QuestionOpenFileDialog Initial Directory FTP Directory - Plz Helpp - 2nd try Pin
laziale26-Jun-08 20:33
laziale26-Jun-08 20:33 
AnswerRe: OpenFileDialog Initial Directory FTP Directory - Plz Helpp - 2nd try Pin
Colwin26-Jun-08 21:04
Colwin26-Jun-08 21:04 
GeneralRe: OpenFileDialog Initial Directory FTP Directory - Plz Helpp - 2nd try Pin
laziale26-Jun-08 21:19
laziale26-Jun-08 21:19 
GeneralRe: OpenFileDialog Initial Directory FTP Directory - Plz Helpp - 2nd try Pin
Colwin26-Jun-08 21:26
Colwin26-Jun-08 21:26 
GeneralRe: OpenFileDialog Initial Directory FTP Directory - Plz Helpp - 2nd try Pin
laziale26-Jun-08 21:31
laziale26-Jun-08 21:31 
GeneralRe: OpenFileDialog Initial Directory FTP Directory - Plz Helpp - 2nd try Pin
laziale26-Jun-08 21:49
laziale26-Jun-08 21:49 
GeneralRe: OpenFileDialog Initial Directory FTP Directory - Plz Helpp - 2nd try Pin
Colwin26-Jun-08 23:31
Colwin26-Jun-08 23:31 
GeneralRe: OpenFileDialog Initial Directory FTP Directory - Plz Helpp - 2nd try Pin
laziale26-Jun-08 23:41
laziale26-Jun-08 23:41 
GeneralRe: OpenFileDialog Initial Directory FTP Directory - Plz Helpp - 2nd try Pin
Colwin27-Jun-08 1:01
Colwin27-Jun-08 1:01 
GeneralRe: OpenFileDialog Initial Directory FTP Directory - Plz Helpp - 2nd try Pin
laziale27-Jun-08 1:10
laziale27-Jun-08 1:10 
QuestionHow to add line to Form Pin
wasimsharp26-Jun-08 19:48
wasimsharp26-Jun-08 19:48 
AnswerRe: How to add line to Form Pin
Christian Graus26-Jun-08 20:02
protectorChristian Graus26-Jun-08 20:02 
AnswerRe: How to add line to Form Pin
Ravi Bhavnani26-Jun-08 20:07
professionalRavi Bhavnani26-Jun-08 20:07 
AnswerRe: How to add line to Form Pin
wasimsharp26-Jun-08 20:08
wasimsharp26-Jun-08 20:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.