Hello
i am working with C#2005 where my requirement is to send and receive data through serial port.i have succeded in that part ,but my second task is to splict the received data and insert into data base where exactly i am facing this problem
in the code i posted ,the code in the Split(); is only getting executed when ever i place a break point there with out break poing my application is running fine but that split method is not getting executed .
i tried for this alot in google but no use i am unable find the actual problem
can any one there with some suggestion
i am not getting any exception or any error other then that method is skipped when there is no break point
Regards
NMsreddi
i am working with C#2005 where my requirement is to send and receive data through serial port.i have succeded in that part ,but my second task is to splict the received data and insert into data base where exactly i am facing this problem
Code:
///my code for received data
private void port_DataReceived(object sender, SerialDataReceivedEventArgs e)
{// Event for receiving data
// Read the buffer to text box.
this.Invoke(new EventHandler(DoUpdate));
}
private void DoUpdate(object s, EventArgs e)
{
statusBar1.Text = "Getting Data";
statusBar1.Refresh();
RichtextBox1.Text = RichtextBox1.Text + port.ReadExisting();
string s=port.ReadExisting();
if(s.Length>60)
{
//my code for other validations go here
// i will call here the split method
Split();
// inthis split method i am inserting data in to database
}
}
i tried for this alot in google but no use i am unable find the actual problem
can any one there with some suggestion
i am not getting any exception or any error other then that method is skipped when there is no break point
Regards
NMsreddi
Comment