What does "invalid object name" mean? Is there documentation on that error?
What does "invalid object name" mean? Is there documentation on that error?
I'm working on a new Editor page in .NET MVC when this error pops up. When I go into the Network > XHR
panel I see this.
error: "Invalid object name 'CohortLatestEnrollmentRecord'."
The one forum post related to this error in PHP, which I don't know. Is there a reference that indicates what "invalid object name" means and how to resolve it?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I figured out in my case, I had to pluralize the model name. While the model in both the database and in the MVC model is in singular form, the MVC standard is to pluralize names. Gets me every time.
But my original question still remains: is there documentation on the error "Invalid object name"?
var response = new Editor(db, "CohortLatestEnrollmentRecords", "Id")
In this case, the error is thrown from the database end. We can't reasonably expect DataTables to document errors which may be thrown elsewhere than from DataTables itself.
@tangerine -- Are you saying that the error type "invalid object name" does not exist in the DataTables or Editor error handling code? That the error message is passed through from SQL Server?
What should be happening, is that the server would return JSON in the form:
DataTables would then display that error as an
alert
(assuming you are usingajax
to get the JSON data).The error message text is generated by the SQL server, and Editor doesn't attempt to interpret that at all - it will just return the text given to it.
Allan