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
Expand|Select|Wrap|Line Numbers
- ///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