Software Development Network>> SQL Server>> List of tables in use by a view
An easy way is to call the "sp_depends @objname" stored procedure. Within Management Studio, you can also right-click on an object and choose "View Dependencies"Peter
Database db = srv.Databases["test"];
string a =
List of tables in use by a view
Qwavel
An easy way is to call the "sp_depends @objname" stored procedure. Within Management Studio, you can also right-click on an object and choose "View Dependencies"
Peter
Mathieu Descorbeth
Database db = srv.Databases["test"];
string a =
"sp_depends " + objname;db.ExecuteWithResults(a);
There are other ways of using SMO to get the dependency information, but I do not have the code available.
Peter
haus_baus