I have to read a table from .accdb file and migrate it to a database. I can't install MS Access on the server where the migration will be executed! Currently I use ODBC
OdbcConnection DbConnection = new OdbcConnection("DSN=SAMPLE_ISAM");
DbConnection.Open();
OdbcCommand DbCommand = DbConnection.CreateCommand();
DbCommand.CommandText = "SELECT Attachments FROM SomeTable";
OdbcDataReader DbReader = DbCommand.ExecuteReader();
while (DbReader.Read())
{
object att = DbReader["Attachments"];
}
DbReader.Close();
DbCommand.Dispose();
DbConnection.Close();
SAMPLE_ISAM is pointed to the accdb file. This works well for the simple data types, but for attachments it gets only the file name(I also need the bytes).
As I said MS Access can't be installed so Interop DAO is not an option.
Is there any way to get the attachments? Other technologies and programing languages are also acceptable.