Click here to Skip to main content
15,895,256 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
currently i'm designing application to retrieve the table and show it in my webpage from the sql server 2008 by getting table name from the user.. how can i do it... help me
Posted

1 solution

Good example for beginners:
datagridview-tutorial[^]
 
Share this answer
 
Comments
Ramkumar K 5-Mar-13 6:33am    
Thanks,,.choudhary.sumit .. but i know about it.. my doubt is, i want to get table name from user and display it accordingly... i dont want to display particular table alone... table must be chosed by user only
choudhary.sumit 5-Mar-13 6:38am    
USe parameterized query in that case. if u r passing table name with the textbox1, then replace the "animal" with the "+textbox1.text+" in the above example.
Ramkumar K 5-Mar-13 6:43am    
what about the columns...? some table contains 3 columns and others may have different number of column?.. :(
Ramkumar K 5-Mar-13 6:45am    
consider that in my grid if i included 3 columns only... then if user choses 4 column table means..how can i fit that in grid...
choudhary.sumit 5-Mar-13 6:45am    
ok. post your code here in which you are binding your datasource.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900