Solved

C# windows form application with SQL connection

Posted on 2010-11-09
2
1,053 Views
Last Modified: 2013-12-17
Hi,
 
I'm developing an application called SysCons.. This application receives data from a serial port and stores it in a database and displays it on the screen..

I have already done with the connection part and everything works fine and also I have a sample database attached to see what kind of data I receive.

This application has been programmed in such a way that on start up when the user presses F10 the application loads the most recent 50 rows from the database and displays it on the screen.

The buffer or temp database table which I have created is called as currentTable which stores the data in a buffer before it is being pushed into the database.

The application is not in history mode when it is first initialized. Now I need an help so that when the user does PAGEUP and PAGEDOWN then the data on the screen should be refreshed. The table which I have created to hold the history data in a buffer is called HistoryTable.

I'm attaching my working application if you want to have a look at it... There is no to worry about serial port and all... Just u can run it without the need of any hardware interfaces. Just change the path of the database.

C-Application.zip
0
Comment
Question by:sairam123
2 Comments
 
LVL 39

Accepted Solution

by:
Kyle Abrahams earned 400 total points
Comment Utility
http://edn.embarcadero.com/article/30129  

add a case for the appropriate keys and call your refresh routine.

case Keys.PgDown,  Keys.PgUp:  Refresh(); break;

private void WinForm_KeyDown(object sender,

             System.Windows.Forms.KeyEventArgs e)

{

  e.Handled = true;



  switch(e.KeyCode) {

    case Keys.Left:   label1.Text = "Left Arrow";   break;

    case Keys.Right:  label1.Text = "Right Arrow";  break;

    case Keys.Up:     label1.Text = "Up Arrow";     break;

    case Keys.Down:   label1.Text = "Down Arrow";   break;

    case Keys.Space:  label1.Text = "Space";        break;

    default:          e.Handled   = true;           break;

  }

}

Open in new window

0
 
LVL 21

Assisted Solution

by:Alpesh Patel
Alpesh Patel earned 100 total points
Comment Utility
Hi,

write code on Form KeyDown, KeyUp or KeyPress event to sense the PageUP and PAge Down key is pressed.

If that is pressed then bind data again.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now