thanks a lot, nelsonpaixao
that was a very good way for working with text file and reading & writing them
But as I siad I want to bring the content of Pdf file or Doc File to for example richTextFile
I can`t use StreamReader class for working with PDF File & Doc File
who can help me?
In fact I want to open PDF File in my application
private Timer Clock = new Timer();//create a timer
void Clock_Tick(object sender, EventArgs e)
//refresh the time every 1 second
this.winFormTimerLabel.Text = DateTime.Now.ToLongTimeString();
private void Form1_Load(object sender, EventArgs e)
Clock.Interval = 1000;//every 1 second do something
//what the program is supposed to do when 1 second elasped
Clock.Tick += new EventHandler(Clock_Tick);
Clock.Start();//starts the timer
I finally understood where did I went wrong - I did not put in the interval value and I did not start the timer..... silly me
Ok when i created a new Query, they asked me Type of SQL query to use.
SELECT which return rows
SELECT which return single value
At first, i selected "SELECT which return rows" and they asked for 3 arguement. dataTable, string nric and string password.
So i change to "SELECT which return single value"
string result = sa.ValidateLogin(txtUsername.Text, txtPassword.Text);
When i key the correct username and password, the messagebox shows the username. If i enter a wrong username and password, the whole program ended and point to my code and says, NullReferenceException was unhandled.
If the correct username was found, i want to store the results of other columm to my variable i declared. Because my staff table have