Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to read new bit column #32

Closed
dcs619 opened this issue Jan 17, 2016 · 1 comment
Closed

Unable to read new bit column #32

dcs619 opened this issue Jan 17, 2016 · 1 comment

Comments

@dcs619
Copy link

dcs619 commented Jan 17, 2016

I have a schema update coming to a database I'm tracking and I can't get OrcaMDF to read the new column (it always returns null). The new column is a nullable bit, exactly like an existing column.

TL;DR NoteTypeActive always reads correctly, NoteArchived will not.

Here's the schema for the table:

image

Here's a screenshot of some data:

image

Here's my code to read the field:

image

I'm using Boolean? to read the row value according to this document. I've also tried int?, bool?, and string without any success.

For context, I've used OrcaMDF to import millions of records and never had any issues. I'm at a loss to explain why the schema change would cause the data type to seemingly break. I'm running SQL Server 2012 on WS 2012.

@dcs619
Copy link
Author

dcs619 commented Mar 1, 2017

I realize this code/issue is a few years old, but after I hit another issue (#29) I decided to dig around a bit. There's definitely an issue with OrcaMDF reading tables on the first page.

I was able to "fix" it by truncating/re-inserting data in the problem table (from SQL, not OrcaMDF). This resets the page pointer which OrcaMDF then reads correctly. I also took the opportunity to change the data type for certain fields from bit to varchar which will read all values consistently.

Thanks for being open source! Closing issue.

@dcs619 dcs619 closed this as completed Mar 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant