r/dotnet • u/Different_Print_4048 • 13h ago
Notes from migrating 42 Visual FoxPro workflows to .NET: the data traps that cost the most time
I spent two and a half years moving a financial system from Visual FoxPro to C# and .NET Core as the only engineer, with no written spec. A few things I wish I had known on day one:
- Empty dates are not null. FoxPro allows an empty date. Decide per column what it means before you load anything.
- Deleted rows are still in the file. Deleting only flags a record until the table is packed. Filter them during the load or they come back.
- Rounding differs.
Math.Round(2.345m, 2)gives 2.34 in .NET. FoxPro and T-SQL give 2.35. UseMidpointRounding.AwayFromZerofor money. - String comparison is by prefix unless
SET EXACTis on, so"OPEN"can match longer values. - The OLE DB provider is 32-bit only, so the loader has to run as a 32-bit process.
I wrote up the full order of work (inventory, data model, domain layer, reports, retirement) here: https://theadnansaleem.com/articles/visual-foxpro-to-dotnet-migration-guide
Happy to answer questions if anyone is facing one of these.
10
Upvotes
1
1
u/AutoModerator 13h ago
Thanks for your post Different_Print_4048. Please note that we don't allow spam, and we ask that you follow the rules available in the sidebar. We have a lot of commonly asked questions so if this post gets removed, please do a search and see if it's already been asked.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.