Answered by:
To show entire database in asp.net webpage

Question
-
User2059416818 posted
Hi,
Is it possible to display entire database in asp.net webpages?
Thanks,
Best Regards,
Poornima
Friday, January 12, 2018 7:56 AM
Answers
All replies
-
User753101303 posted
Hi,
"display entire database" is quite vague. Most of those tables are used by ASP.NET Identity.
Assuming you need a list of all table names you could use for example the standardized Information_Schema.Tables view or SQL Server system tables. Try https://docs.microsoft.com/en-us/sql/relational-databases/system-information-schema-views/system-information-schema-views-transact-sql
If you need further help some more context and knowing the exact goal could help. You try to create an app for this db or you want to manage remotely a db ?
Friday, January 12, 2018 8:36 AM -
User2059416818 posted
Hi PatriceSc,
Thanks for your reply.
I wish to show list of all tables created by the user in particular database as a tree view.
Don't want to show system table. Instead of touching database i wish to retrieve all tables from database and update by myself.
Regards,
Poornima
Friday, January 12, 2018 9:31 AM -
User283571144 posted
Hi poornima82,
I wish to show list of all tables created by the user in particular database as a tree view.
Don't want to show system table. Instead of touching database i wish to retrieve all tables from database and update by myself.
Do you mean you want to show all the table except system table?
If this is your requirement, I suggest you could try to use below query:
select name from sysobjects where type='U'
Result:
Best Regards,
Brando
Tuesday, January 16, 2018 7:57 AM -
User753101303 posted
You can use views or system tables to list the database content but AFAIK SQL Server doesn't care about who created a table. They are organized in schémas and it cares about permissions only.
Try perhaps https://technet.microsoft.com/en-us/library/ms175941(v=sql.105).aspx if your goal is really to track db schema changes...
Tuesday, January 16, 2018 8:25 AM -
User2059416818 posted
Hi Brando ZWZ,
Thanks for your reply.
I tried your query. It displayed all tables in the database.
But my need is to display only tables of "particular database" as a tree view and not all tables in the database.
I haven't used tree view control before.. something like tree view format i need to display..
Help me to carry out.
Regards,
Poornima
Wednesday, January 17, 2018 7:20 AM