I have this slight technicality going on.
Here is my screenshot:

I have caught this error exception runtime error. Users who are familiar with DAO and ADODB Access libraries can provide me some assistance.
Regards,
JohnCTX
I have this slight technicality going on.
Here is my screenshot:

I have caught this error exception runtime error. Users who are familiar with DAO and ADODB Access libraries can provide me some assistance.
Regards,
JohnCTX
You do a loop on columns with Fields[i]...
For example, a test where I read the second column (index = 1, named "LastName") of an "Employees" table =>
string sMyDocumentsPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
string sPath = sMyDocumentsPath + "\\Employees.mdb";
string sPassword = "toto";
DBEngine dbEngine = new DBEngine();
try
{
Database db = dbEngine.OpenDatabase(sPath, true, false, ";PWD=" + sPassword);
if (db != null)
{
Recordset rst = db.OpenRecordset("SELECT * FROM Employees WHERE Salary >= 40000");
while (!rst.EOF)
{
// Second column
comboBox1.Items.Add(rst.Fields[1].Value);
//comboBox1.Items.Add(rst.Fields["LastName"].Value);
rst.MoveNext();
}
}
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show("Database Error : " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
In addition, users who choose to use the Data Access Object library assembly reference need to download and install the Microsoft Access 2010 Runtime utility.
Otherwise, they will keep getting a myriad of runtime and compile error messages stating that these libraries are not registered within the Visual Studio IDE.
Does that make sense?
Regards,
JohnCTX
I looked my executable using DAO and it is just linked with DAO360.dll (C:\Program Files (x86)\Common Files\Microsoft Shared\DAO\dao360.dll)
For testing, I unregistered/registered the DLL (with regsvr32) and then I needed to add again Interop.DAO.dll to be able to re-compile my program
6 people are following this question.
Exporting an XSL, XML file formats from Microsoft Access to Visual Studio IDE
saving data from 2nd form to the same master table in win form application
How to display images with different sizes with keeping their aspect ratio in listview?
I want to create a simple seat reservation for my application