Plz tell me how to fill a dataset with a view which exist in sql server instead of table.
and one more thing is it possble to fetch values from a table if it is locked by oledbtransaction.
Printable View
Plz tell me how to fill a dataset with a view which exist in sql server instead of table.
and one more thing is it possble to fetch values from a table if it is locked by oledbtransaction.
You simply use the name of the view instead of the name of a table in your SQL statements.
Not your question, but from experience I will not advice you to use a view as datasource, if the view will return large amounts of data. It can become really slow.
I once had to write an app that refresh olap cubes from views, and heck it was so slow, and everyone blamed my application. It turns out you need SQL Enterprise to index views for performance boost.
If you run into that problem too, rather use a stored procedure. At least sql server optimize it for you.
then how will i fetch value from a particular row as i used to get like
Dataset.Tables[0].Rows[0][0].ToString()
Once you have retrieved the data everything is exactly the same as before.