Get data from Access instead of notepad (urgent)
-
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! :) -
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! :) -
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! :)hi there, if u need to keep the records in Access DB, u need to have basic knowledge of mechanism of accessing to Access DB, such as: ODBC, OleDB, ADO or ADO.NET. u can get more detail and also simple codes from MSDN To query from Access DB, u also need to know SQL query. This can be got from SQL Book Online << >>
-
hi there, if u need to keep the records in Access DB, u need to have basic knowledge of mechanism of accessing to Access DB, such as: ODBC, OleDB, ADO or ADO.NET. u can get more detail and also simple codes from MSDN To query from Access DB, u also need to know SQL query. This can be got from SQL Book Online << >>
Hi hi, If it's using oledbadapter and dataset, i know how to use them and query for data from Access. However, what i need now is how do i automatically store the data downloaded into Access instead of storing in Notepad? How do i get every set of downloaded data to append to my Access db table?? Thank you!!
-
Hi hi, If it's using oledbadapter and dataset, i know how to use them and query for data from Access. However, what i need now is how do i automatically store the data downloaded into Access instead of storing in Notepad? How do i get every set of downloaded data to append to my Access db table?? Thank you!!
after u downloaded data need to be stored into Access DB, u can use sql query that is something like "insert into ur table(field1, field2,..) values (...)" to insert the data into Access DB << >>