string sAccessFilePath = SuspenseMgrAccess

by ssi 4. May 2013 17:46

 

 

Properties.Settings.Default.AccessFilePathAndname;

if (File.Exists(sAccessFilePath))
{
ConnectionString = SuspenseMgrAccess.Properties.Settings.Default.AccessConnectionString;
OleDbConnection objConn = new System.Data.OleDb.OleDbConnection(ConnectionString);

String QueryString = "SELECT * FROM tbl_Loan";
OleDbCommand Cmd = new OleDbCommand(QueryString, objConn);

objConn.Open();
OleDbDataReader reader = Cmd.ExecuteReader();

OleDbDataAdapter dataAdapter = new OleDbDataAdapter(QueryString, objConn);
OleDbCommandBuilder commandBuilder = new OleDbCommandBuilder(dataAdapter);
DataTable table = new DataTable();
dataAdapter.Fill(table);

dataGridView1.DataSource = table;
objConn.Close();
}

Tags: , ,

Blog | CSharp

Add comment

biuquote
  • Comment
  • Preview
Loading

Calendar

<<  September 2025  >>
MoTuWeThFrSaSu
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

View posts in large calendar

RecentComments

None

Development Team @ Shelbysys

We develop custom database applications for our clients. Our development tool of choice is MS Visual Studio. 

Quotations

""All glory is fleeting.""
General George S. Patton, Jr