dummie

dummie

  • NA
  • 12
  • 0

Get data from Access instead of Notepad (URGENT)

Sep 13 2005 10:53 PM

Hi

I want to get data from Access instead of notepad.
Here are the codes to get data from notepad by entering IC number (equivalent to ID number). The records are stored in 'Folder'.


public void btnGo_Click_1(object sender, System.EventArgs e)// -->User can select the file by entering the IC Nunber in textbox and program will check for file existence and null file
{
enable();
/** [Retrieve IC Number from tboxEnterICNo] **/
strFileName2 = tboxEnterICNo.Text;
path = @"Folder\"+strFileName2+".txt";
/** [Check for file existence] **/
if(File.Exists("Folder\\"+strFileName2+".txt"))// -->If file exists, open DisplayGraph form and display the graph
{
displaygraph.names = path;// -->copies the path to DisplayGraph form
displaygraph.ShowDialog();// -->Opens DisplayGraph form to display graph
}//End of if-condition
else
{
MessageBox.Show("File does not exist! Please create a new profile.", "Invalid File Type", MessageBoxButtons.OK, MessageBoxIcon.Error );
}// -->End of else-condition
}// -->End of btnGo_Clicks module


How should i go about to keep the records in Access and also specify retrieving of the queried data from an Access table instead?

I need some help about what to do and how the codes look like.
Thank you very much!