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

C#

 
GeneralRe: Preventing MDI child form from losing focus Pin
Mycroft Holmes22-Feb-11 19:34
professionalMycroft Holmes22-Feb-11 19:34 
GeneralRe: Preventing MDI child form from losing focus Pin
Dewald22-Feb-11 19:45
Dewald22-Feb-11 19:45 
QuestionGet IP address on a LAN [modified] Pin
Mc_Topaz21-Feb-11 23:14
Mc_Topaz21-Feb-11 23:14 
AnswerRe: Get all IP address on a LAN Pin
Rob Philpott21-Feb-11 23:32
Rob Philpott21-Feb-11 23:32 
GeneralRe: Get all IP address on a LAN Pin
Mc_Topaz21-Feb-11 23:43
Mc_Topaz21-Feb-11 23:43 
GeneralRe: Get all IP address on a LAN Pin
Rob Philpott22-Feb-11 1:39
Rob Philpott22-Feb-11 1:39 
AnswerRe: Get IP address on a LAN Pin
OriginalGriff21-Feb-11 23:36
mveOriginalGriff21-Feb-11 23:36 
Questionhandle data in GUI (datagridview) and database Pin
Ronenb21-Feb-11 21:29
Ronenb21-Feb-11 21:29 
Hi All
I need your advice what is the best solution to handle data
I’m developing online logger application at windows that will be connected to hardware.
The application should handle heavy traffic data( could be up to hundreds of events per second)
The datagridview is active as viewer only (readonly).
I need to develop mechanism of insert the events to DB and display them in the datagridview.
I need your advice if this is correct approach?
I’m thinking of using the flow below

Init()
{
SqlConnection connection = new SqlConnection(connectionstring);

connection.open()
SqlDataAdapter adapter = new SqlDataAdapter("select * from TableName", connection);
DataSet ds = new DataSet();
dataGridView1.DataSource = ds;

);

}
AddRow(data)
{
//Add to database
string insertString = "insert into TableName (Field1, Field2) values (‘Value1’,’Value2’)";

// 1. Instantiate a new command with a query and connection
SqlCommand cmd = new SqlCommand(insertString, connection);

// 2. Call ExecuteNonQuery to send command
cmd.ExecuteNonQuery();



}
//each second the timer event occurs
Timer ()
{
adapter.Fill(ds,idxLastUpdatedRow,100/* update 100 records each time*/ ,tableName);
dataGridView1.refresh()
}


Thanks
Ronen
AnswerRe: handle data in GUI (datagridview) and database Pin
OriginalGriff21-Feb-11 21:48
mveOriginalGriff21-Feb-11 21:48 
GeneralRe: handle data in GUI (datagridview) and database Pin
Mycroft Holmes22-Feb-11 0:10
professionalMycroft Holmes22-Feb-11 0:10 
GeneralRe: handle data in GUI (datagridview) and database Pin
OriginalGriff22-Feb-11 0:14
mveOriginalGriff22-Feb-11 0:14 
GeneralRe: handle data in GUI (datagridview) and database Pin
Ronenb22-Feb-11 1:28
Ronenb22-Feb-11 1:28 
AnswerRe: handle data in GUI (datagridview) and database Pin
PIEBALDconsult22-Feb-11 1:36
mvePIEBALDconsult22-Feb-11 1:36 
GeneralRe: handle data in GUI (datagridview) and database Pin
Ronenb22-Feb-11 7:51
Ronenb22-Feb-11 7:51 
GeneralRe: handle data in GUI (datagridview) and database Pin
PIEBALDconsult22-Feb-11 13:38
mvePIEBALDconsult22-Feb-11 13:38 
GeneralRe: handle data in GUI (datagridview) and database Pin
Ronenb22-Feb-11 20:17
Ronenb22-Feb-11 20:17 
QuestionRemove duplicates Pin
kulldeep verma21-Feb-11 19:48
kulldeep verma21-Feb-11 19:48 
AnswerRe: Remove duplicates Pin
Sunasara Imdadhusen22-Feb-11 1:19
professionalSunasara Imdadhusen22-Feb-11 1:19 
Questionhow to manage an asymmetric key in key container for an enterprise software ? Pin
hani jizzan21-Feb-11 18:12
hani jizzan21-Feb-11 18:12 
RantImplicit Type Casting Pin
Adriaan Davel21-Feb-11 17:42
Adriaan Davel21-Feb-11 17:42 
GeneralRe: Implicit Type Casting Pin
SledgeHammer0121-Feb-11 18:51
SledgeHammer0121-Feb-11 18:51 
GeneralRe: Implicit Type Casting Pin
Adriaan Davel21-Feb-11 19:17
Adriaan Davel21-Feb-11 19:17 
GeneralRe: Implicit Type Casting Pin
PIEBALDconsult22-Feb-11 1:39
mvePIEBALDconsult22-Feb-11 1:39 
QuestionBest way to make Telephone Directory program Pin
shivamkalra21-Feb-11 14:09
shivamkalra21-Feb-11 14:09 
AnswerRe: Best way to make Telephone Directory program Pin
Luc Pattyn21-Feb-11 15:14
sitebuilderLuc Pattyn21-Feb-11 15:14 

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.