•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 402,054 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,400 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 641 | Replies: 1
![]() |
•
•
Join Date: Feb 2008
Posts: 68
Reputation:
Rep Power: 1
Solved Threads: 2
hi all,,,
well i am using asp.net 2005 and sql server 2005...
i hav a database called as ABC,,i am using a gridview and a dropdown list inmy application.
What i want is ,,the dropdown list should be populated wiyh all the table names available in ABC database and on the click of a submit button it the attributes of that table should be displayed in tht grid view.....
can ne1 help me out in solving ths prob,,,ASAP,,
thnks in advance
well i am using asp.net 2005 and sql server 2005...
i hav a database called as ABC,,i am using a gridview and a dropdown list inmy application.
What i want is ,,the dropdown list should be populated wiyh all the table names available in ABC database and on the click of a submit button it the attributes of that table should be displayed in tht grid view.....
can ne1 help me out in solving ths prob,,,ASAP,,
thnks in advance
Johnny.G
THe first part is easy.
You can get all the tables from the database through this query:
Just populate the dropdown with the output from this query.
On selection of the dropdown, get all columns and display them in the grid.
This query will help you in this
Hope this helps!
You can get all the tables from the database through this query:
SELECT * FROM sysobjects WHERE type = 'U'
On selection of the dropdown, get all columns and display them in the grid.
This query will help you in this
select column_name from information_schema.columns where table_name = '<table name>' order by ordinal_position
Hope this helps!
Last edited by bala24 : Jun 18th, 2008 at 5:38 am.
Michelangelo
"The best place to find a helping hand is at the end of your own arm"
"The best place to find a helping hand is at the end of your own arm"
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the ASP.NET Forum
- Previous Thread: Providing Popup reminders for events
- Next Thread: Failed to access IIS metabase.


Linear Mode