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

<<  May 2024  >>
MoTuWeThFrSaSu
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

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

""If everyone is thinking alike, someone isn't thinking.""
- General George Patton Jr