Re: access provider



Rodrigo Moya wrote:
> 
> Alvaro wrote:
> >
> > Rodrigo Moya wrote:
> > >
> > > Hi all!
> > >
> > > I've just learnt about the MDBTools project
> > > (http://mdbtools.sourceforge.net), which intends to provide a set of
> > > tools for accessing MDB files (the ones used by MS Access). It's got a
> > > library which we could use for adding an access provider to gnome-db.
> >
> > Great!
> >
> > This a is a big step. I have to work with Windows because I need to
> > export the data from Access to a CSV format file ...
> >
> > The gnome-db provider for Access will be a major step :-D
> >
> > As I can read in the project page:
> >
> > " Ok, how much is done? ... And you can export data out to CSV (comma
> > separated value) format"
> >
> > I am going to try it !!
> >
> great! Remember to have a look at the current providers to see how the
> new gda-server lib is used.

After some tests with it, at the present it core dump very frecuently.
But I have
read the names of the tables from a Access DB, dump the data from a
table with very few rows but when the table isn't very simple it core
dump.

But the API is very clean. Take a look. Only 19 methods and I have read
teh program which
dumps the table names and is only 91 lines of very clean code.

Cheers 

-- Alvaro

--------------------------------------------------------------------------

/* mem.c */
extern MdbHandle *mdb_alloc_handle();
extern void mdb_free_handle(MdbHandle *mdb);
extern void mdb_free_catalog(MdbHandle *mdb);
extern MdbTableDef *mdb_alloc_tabledef(MdbCatalogEntry *entry);

/* file.c */
extern size_t mdb_read_pg(MdbHandle *mdb, unsigned long pg);
extern int    mdb_get_int16(MdbHandle *mdb, int offset);
extern long   mdb_get_int32(MdbHandle *mdb, int offset);
extern MdbHandle *mdb_open(char *filename);

/* catalog.c */
extern void mdb_catalog_dump(MdbHandle *mdb, int obj_type);
extern int mdb_catalog_rows(MdbHandle *mdb);
extern MdbCatalogEntry *mdb_get_catalog_entry(MdbHandle *mdb, int rowid,
MdbCatalogEntry *entry);
extern char *mdb_get_objtype_string(int obj_type);

/* table.c */
extern MdbTableDef *mdb_read_table(MdbCatalogEntry *entry);

/* data.c */
extern void mdb_data_dump(MdbTableDef *table);
extern void mdb_bind_column(MdbTableDef *table, int col_num, void
*bind_ptr);
extern int mdb_rewind_table(MdbTableDef *table);
extern int mdb_fetch_row(MdbTableDef *table);
extern int mdb_is_fixed_col(MdbColumn *col);
extern char *mdb_col_to_string(MdbHandle *mdb, int start, int datatype,
int size);



> 
> _______________________________________________
> gnome-db-list mailing list
> gnome-db-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gnome-db-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]