I have a complex view in my sql 2005 database.
The view returns a column that could be null (as the result of a left outer join).
The coulmn that is returned is an integer.
Everything works fine if I run the view from SQL 2005 Management Studio.
My column value is always null if I use ADO.NET's SqlAdapter to return a DataTable.
Has anybody seen this behaviour before?
Any help appreciated.
Regards,
Paul.
Hi Paul,
From you description, I understand that when you query data from the database view, the destination column in the DataSet is always null.
This could be caused by a wrongly configured SqlDataAdapter or the mismatched target DataSet schema.
For example, if you're using a typed DataSet, the target column data type is in another type. In this case, data might be converted incorrectly. Also, please try to check the table mapping and column mapping for the SqlDataAdapter.
HTH.
|||I've solved the problem
I changed the DB Connection to system admin and everything worked ok.
Looks like I've got a permissions issue with one or more of my SQL Functions.
Thanks for the help.
Regards,
Paul.
No comments:
Post a Comment