fdbozzo / foxbin2prg

Visual FoxPro 9 Binary to Text and Text to Binary converter. Replacement for SCCText(X) and TwoFox that is bi-directional (Text is editable)
https://vfpx.codeplex.com/wikipage?title=FoxBin2Prg
MIT License
59 stars 35 forks source link

Tables without indexes cause an error that the "Table ____ is not marked as belonging to the _____ database #58

Closed jstagerGH closed 3 years ago

jstagerGH commented 3 years ago

ℹ Computer information

📝 Provide detailed reproduction steps (if any)

When converting a database table that doesn't have any indexes from a db2 to a dbf, the table no longer belongs to the proper database.

✔️ Expected result

The indexless table should remain attached to the proper database

❌ Actual result

When dbf is created it appears to be tagged to a "_fb2p.dbc" database and no longer part of our "lwdata.dbc". This causes an error when trying to open this table.

📷 Screenshots

image image

lscheffler commented 3 years ago

The _fb2p.dbc is something temporary used I do not really understand. It should not interfere with real DBC.
What version of foxbin2prg was used to create the db2?
If created with an an version pre 1.19.60 , will this happen if you create the db2 with the recent version too?

jstagerGH commented 3 years ago

Hi @lscheffler we have tried with 1.19.51 to create db2 and it worked but using 1.19.62 it causes the error

lscheffler commented 3 years ago

Thank you, I hope I will find the time over the weekend

jstagerGH commented 3 years ago

Thanks @lscheffler, as a workaround we are just going to add an index to the dozen or so tables.

lscheffler commented 3 years ago

FoxBin2Prg creates all tables to this fb2p.dbc and later changes the database with low level file access.
This is called in writeBinaryFile_INDEXES - what is an odd place, and is now ignored by an condition dealing with existing or non existing indexes. There are other issues with this too. I need to think through it.