Tuesday, September 10, 2013

bulk insert loads my data, but my code crashes when trying to read or compare a text value

The issue was we would do a regular export from SQL Server of a table with an ID field and a varchar field. The export went fine. Then we did an import using bulk insert... the rowterminator was \n. Everything loaded fine. The issue arose when we ran code that compared values in the text field. The result caused a crash because it couldn't return an exact match.

The end result was we changed the rowterminator to another character. For some reason, we were getting phantom characters in the text field. We couldn't see them in the database or in the code. But, if we went into the database and retyped the value, it worked.

Best

Monday, September 9, 2013

error occurred while validating. HRESULT = '8000000A'

I resolved this issue by doing the following:

1. Checked out the project in Teamsite so it could write the new files
2. Restarted my computer. I had seen that somewhere before
3. Right click on Detected Dependencies and refreshed them.
4. Rebuilt the project.

Until I restarted I couldn't refresh the dependencies, there was always an error.