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

<<  December 2025  >>
MoTuWeThFrSaSu
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

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

"Fill the unforgiving minute with sixty seconds worth of distance run."
Rudyard Kipling