From: Brian B. <ca...@um...> - 2000-03-14 12:12:38
|
The only problem I see it that the number of rows present may not match the number defined for the table (if you add a column to the table, it does not go back and modify existing data). Can you post the row dump for one where the existing algo fails? It may be the padding problem that someone else saw. Brian On Mon, 13 Mar 2000 kn...@gr... wrote: > The calculation of number of fixed and variable columns doesn't work for > some database material that I have. I have replaced a portion of > data.c:mdb_read_row() with the following (perhaps non-optimal, but more > accurate) algorithm. > > /* find out all the important stuff about the row */ > > num_cols = mdb->pg_buf [row_start]; > var_cols = 0; > fixed_cols = 0; > for (j = 0; j < table->num_cols; j++) > { > col = g_ptr_array_index (table->columns, j); > if (mdb_is_fixed_col (col)) > fixed_cols++; > else > var_cols++; > } > > I also have been finding that a mixture of int / long / varchar is causing > some of the varchars to be included inline and some to be "referenced" > outside the data stream. As a result, I get data something like: > > INT LONG VC VC (26) INT > (00 00) (00 01 7c 01) (31) ("1996-xx-yy-17.54.36.000000") (00 04) > > And the data that the VC above should have (it's a VC 30, by the way) is > further down, after all the rest of the fixed and variable data... > > I'm going to see if I can generate a small database to distribute. > > -- Karl -- > > _______________________________________________ > mdbtools-dev mailing list > mdb...@li... > http://lists.sourceforge.net/mailman/listinfo/mdbtools-dev > |