From: Martin E. <m.a...@nc...> - 2005-03-11 16:34:56
|
On Friday 11 Mar 2005 15:25, boga wrote: > The problem is that cvs won't merge binary files. [snip] > [ Of course the workaround is to make a diff before cvs update, > then do a cvs update, then apply the diff again, but this is a bit > problematic.... ] And indeed that's exactly what I've done. :o) I've now checked the MDB migration driver based on a patched mdbtools into KDE, so it's now possible to convert an Access database into a Kexi database. (Kexi is KOffice's package, and uses SQLite as it's native file format, see http://www.kexi-project.org/screenshots.html for screenshots. Kexi is also available on Win32, hence the patch I posted earlier.) Testing is welcome. Building it requires installing Kexi from koffice/kexi in KDE CVS, then installing keximdb from kdenonbeta/keximdb. Further information available at: http://www.kexi-project.org/compiling.html#get_sources http://www.kexi-project.org/wiki/wikiview/?MDBDriver or send me a mail; or you could try IRC in #kexi on irc.freenode.net BTW, about those binary tags on files... > You can fix these files with cvs admin -ko write.c Cheers Martin |
From: <bo...@ma...> - 2005-03-16 07:14:09
|
I've tried to use mdb-import for a simple jet4 db. The result was a crash in the following code: (The sample file can be found attached to the bug: http://sourceforge.net/tracker/index.php?=20 func=3Ddetail&aid=3D1163895&group_id=3D2294&atid=3D102294 ) } else { /* is not a temp table */ new_pg =3D mdb_new_data_pg(entry); num_rows =3D mdb_pg_get_int16(mdb, fmt->row_count_offset); pos =3D fmt->pg_size; /* copy existing rows */ for (i=3D0;i<num_rows;i++) { mdb_find_row(mdb, i, &row_start, &row_size); pos -=3D row_size; memcpy(&new_pg[pos], &mdb->pg_buf[row_start], row_size); ^^^^^^^^^^^^^-crash for i =3D=3D 5 _mdb_put_int16(new_pg, (fmt->row_count_offset + 2) + = (i*2), pos); } } Any hints?! For me the num_rows seems to be too large (it's 21 while the table has =20= only 4 rows), but i might be completly wrong. [ And setting the num_rows to 4 solved the crash but the result was =20 still a bit bogus... ] Regards, Mikl=F3s |
From: Sam M. <pa...@gm...> - 2005-03-16 13:10:26
|
What could be causing the result to be 21 is if rows have been deleted from the table and rows added afterwards. 21 could be the index of th e last row. I might be wrong, but it would appear to make sense. Someone with a bit more time might be able to help, Sam On Wed, 16 Mar 2005 08:17:09 +0100, Mikl=F3s Fazekas <bo...@ma...> wrote: > I've tried to use mdb-import for a simple jet4 db. > The result was a crash in the following code: >=20 > (The sample file can be found attached to the bug: > http://sourceforge.net/tracker/index.php? > func=3Ddetail&aid=3D1163895&group_id=3D2294&atid=3D102294 > ) >=20 > } else { /* is not a temp table */ > new_pg =3D mdb_new_data_pg(entry); >=20 > num_rows =3D mdb_pg_get_int16(mdb, fmt->row_count_offset); > pos =3D fmt->pg_size; >=20 > /* copy existing rows */ > for (i=3D0;i<num_rows;i++) { > mdb_find_row(mdb, i, &row_start, &row_size); > pos -=3D row_size; >=20 > memcpy(&new_pg[pos], &mdb->pg_buf[row_start], row_size); > ^^^^^^^^^^^^^-crash for i =3D=3D 5 > _mdb_put_int16(new_pg, (fmt->row_count_offset + 2) + (i*2= ), pos); > } > } >=20 > Any hints?! > For me the num_rows seems to be too large (it's 21 while the table has > only 4 rows), but i might be completly wrong. > [ And setting the num_rows to 4 solved the crash but the result was > still a bit bogus... ] >=20 > Regards, > Mikl=F3s >=20 > |
From: <bo...@ma...> - 2005-03-16 14:24:22
|
Thanks, but i think there were no insert/remove when i created the=20 file. I'll double check. Thanks. Regards, Mikl=F3s On Mar 16, 2005, at 2:10 PM, Sam Moffatt wrote: > What could be causing the result to be 21 is if rows have been deleted > from the table and rows added afterwards. 21 could be the index of th > e last row. I might be wrong, but it would appear to make sense. > Someone with a bit more time might be able to help, > > Sam > > On Wed, 16 Mar 2005 08:17:09 +0100, Mikl=F3s Fazekas <bo...@ma...>=20 > wrote: >> I've tried to use mdb-import for a simple jet4 db. >> The result was a crash in the following code: >> >> (The sample file can be found attached to the bug: >> http://sourceforge.net/tracker/index.php? >> func=3Ddetail&aid=3D1163895&group_id=3D2294&atid=3D102294 >> ) >> >> } else { /* is not a temp table */ >> new_pg =3D mdb_new_data_pg(entry); >> >> num_rows =3D mdb_pg_get_int16(mdb, fmt->row_count_offset); >> pos =3D fmt->pg_size; >> >> /* copy existing rows */ >> for (i=3D0;i<num_rows;i++) { >> mdb_find_row(mdb, i, &row_start, &row_size); >> pos -=3D row_size; >> >> memcpy(&new_pg[pos], &mdb->pg_buf[row_start],=20 >> row_size); >> ^^^^^^^^^^^^^-crash for i =3D=3D 5 >> _mdb_put_int16(new_pg, (fmt->row_count_offset + 2) +=20= >> (i*2), pos); >> } >> } >> >> Any hints?! >> For me the num_rows seems to be too large (it's 21 while the table = has >> only 4 rows), but i might be completly wrong. >> [ And setting the num_rows to 4 solved the crash but the result was >> still a bit bogus... ] >> >> Regards, >> Mikl=F3s >> >> |
From: Brian B. <bri...@gm...> - 2005-03-16 12:34:10
|
The mdb-import functionality is not fully implement yet. It is very much a work in progress, so even if it didn't crash it probably wouldn't work. :-/ Brian On Wed, 16 Mar 2005 08:17:09 +0100, Mikl=F3s Fazekas <bo...@ma...> wrote: > I've tried to use mdb-import for a simple jet4 db. > The result was a crash in the following code: >=20 > (The sample file can be found attached to the bug: > http://sourceforge.net/tracker/index.php? > func=3Ddetail&aid=3D1163895&group_id=3D2294&atid=3D102294 > ) >=20 > } else { /* is not a temp table */ > new_pg =3D mdb_new_data_pg(entry); >=20 > num_rows =3D mdb_pg_get_int16(mdb, fmt->row_count_offset); > pos =3D fmt->pg_size; >=20 > /* copy existing rows */ > for (i=3D0;i<num_rows;i++) { > mdb_find_row(mdb, i, &row_start, &row_size); > pos -=3D row_size; >=20 > memcpy(&new_pg[pos], &mdb->pg_buf[row_start], row_size); > ^^^^^^^^^^^^^-crash for i =3D=3D 5 > _mdb_put_int16(new_pg, (fmt->row_count_offset + 2) + (i*2= ), pos); > } > } >=20 > Any hints?! > For me the num_rows seems to be too large (it's 21 while the table has > only 4 rows), but i might be completly wrong. > [ And setting the num_rows to 4 solved the crash but the result was > still a bit bogus... ] >=20 > Regards, > Mikl=F3s >=20 > |