Hi All,
I'm attempting to load some data from my Access DB. I get the ISAM issue at objConn.Open();
Could someone help me out. Below is my code...
void Page_Load() {
OleDbConnection objConn;
OleDbCommand objCmd;
OleDbDataReader objRdr;
string strSQL;
strSQL = "SELECT tblEvents.courseName, tblGolfCourses.courseAddress, tblGolfCourses.courseCity, tblEvents.eventBeginDate, ";
strSQL = strSQL + "tblEvents.eventEndDate, tblEvents.eventFee, tblGolfCourses.courseWebPage ";
strSQL = strSQL + "FROM tblEvents INNER JOIN tblGolfCourses ON tblEvents.courseName=tblGolfCourses.courseName;";
objConn = new OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;" + "Date Source=C:\\Pittsburgh Golfers Tour\\PGTDatabase.mdb");
objCmd = new OleDbCommand(strSQL, objConn);
objConn.Open();
objRdr = objCmd.ExecuteReader();
myRepeater.DataSource = objRdr;
myRepeater.DataBind();
objRdr.Close();
objConn.Close();
// lblDate.Text = DateTime.Now.ToString();
}
Any suggestions would be most appreciated.
TIA,
Tim
I'm attempting to load some data from my Access DB. I get the ISAM issue at objConn.Open();
Could someone help me out. Below is my code...
void Page_Load() {
OleDbConnection objConn;
OleDbCommand objCmd;
OleDbDataReader objRdr;
string strSQL;
strSQL = "SELECT tblEvents.courseName, tblGolfCourses.courseAddress, tblGolfCourses.courseCity, tblEvents.eventBeginDate, ";
strSQL = strSQL + "tblEvents.eventEndDate, tblEvents.eventFee, tblGolfCourses.courseWebPage ";
strSQL = strSQL + "FROM tblEvents INNER JOIN tblGolfCourses ON tblEvents.courseName=tblGolfCourses.courseName;";
objConn = new OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;" + "Date Source=C:\\Pittsburgh Golfers Tour\\PGTDatabase.mdb");
objCmd = new OleDbCommand(strSQL, objConn);
objConn.Open();
objRdr = objCmd.ExecuteReader();
myRepeater.DataSource = objRdr;
myRepeater.DataBind();
objRdr.Close();
objConn.Close();
// lblDate.Text = DateTime.Now.ToString();
}
Any suggestions would be most appreciated.
TIA,
Tim