
mdbtools.mdb_export Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ome-mdbtools Show documentation
Show all versions of ome-mdbtools Show documentation
Java API to handle Microsoft MDB format (Access). Used by Bio-Formats for Zeiss LSM metadata in MDB files.
/*
* #%L
* Fork of MDB Tools (Java port).
* %%
* Copyright (C) 2008 - 2016 Open Microscopy Environment:
* - Board of Regents of the University of Wisconsin-Madison
* - Glencoe Software, Inc.
* - University of Dundee
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
* #L%
*/
package mdbtools;
import mdbtools.libmdb.*;
public class mdb_export
{
public static boolean is_text_type(int x)
{
return x==Constants.MDB_TEXT || x==Constants.MDB_MEMO || x==Constants.MDB_SDATETIME;
}
public static void main(String[] args)
{
args = new String[2];
args[0] = "/home/whoever/Downloads/test.mdb";
args[1] = "user";
int rows;
int i, j, k;
// char[] buf = new char[2048];
MdbHandle mdb;
MdbCatalogEntry entry;
MdbTableDef table;
MdbColumn col = null;
/* doesn't handle tables > 256 columns. Can that happen? */
Holder[] bound_values = new Holder[256];
String delimiter = ",";
boolean header_row = true;
boolean quote_text = true;
int opt;
// char *s;
String filename = args[0];
String tablename = args[1];
mem.mdb_init();
try
{
mdb = file.mdb_open(new mdbtools.jdbc2.File(args[0]));
Catalog.mdb_read_catalog(mdb, Constants.MDB_TABLE);
for (i=0;inum_cols;j++)
// {
// free(bound_values[j]);
// }
}
}
// mdb_free_handle(mdb);
// mdb_exit();
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy