How to save C# window form input to MS Access 2007 DB
-
Hi all.. If there any one know how to save input from window form c# to MS Access DB.. After that, I need to retrieve also. Thanks in advance, Kyi Kyi
You could look into SQL queries, parameterised queries, and the System.Data.OleDb namespace. The general sequence of events is something like this:
- Create OleDbConnection
- Put together an SQL query string (hopefully using parameters)
- Create a new DataAdapter, giving it the OleDbConnection and the query string
- Fill a DataTable from the DataAdapter
Then, you make your changes to the table, and Update the DataAdapter.
-
You could look into SQL queries, parameterised queries, and the System.Data.OleDb namespace. The general sequence of events is something like this:
- Create OleDbConnection
- Put together an SQL query string (hopefully using parameters)
- Create a new DataAdapter, giving it the OleDbConnection and the query string
- Fill a DataTable from the DataAdapter
Then, you make your changes to the table, and Update the DataAdapter.
-
Hi all.. If there any one know how to save input from window form c# to MS Access DB.. After that, I need to retrieve also. Thanks in advance, Kyi Kyi
Your Question is too Basic, i think if you can Google , you will definitely find an Answer. But that will be the last thing you should do. The First thing you need to do is to buy a Book , because is covered in any .NET book that has to do with Databases. You cant learn to program on Forums or on the internet. Buy a Book and read it and if you have questions about what you have read , then we can help.
Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/
-
Hi all.. If there any one know how to save input from window form c# to MS Access DB.. After that, I need to retrieve also. Thanks in advance, Kyi Kyi
-
Hi all.. If there any one know how to save input from window form c# to MS Access DB.. After that, I need to retrieve also. Thanks in advance, Kyi Kyi
Hi, use odbc; c# Provide Ado.net , 'oledbconnection' ... // for example to connect access OleDbConnection conObj; conObj = new OleDbConnection(); conObj.ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data source = " + Application.StartupPath + @"\用户.mdb"; conObj.Open(); you can get help from google