how to get the table names via c sharp and column names
also?

Answers were Sorted based on User's Feedback



how to get the table names via c sharp and column names also?..

Answer / ganesh

i dont know the answer pls send it to me..........

Is This Answer Correct ?    0 Yes 2 No

how to get the table names via c sharp and column names also?..

Answer / krishna

create a data reader object and call the method GetName(n)
where n is the index no of the column name.In this way u can
get the name of the column and place it in a label.
Eg: Label1.Text=datareader_obj.GetName(0);
the above code will give you the name of the first colunmn.

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More C Sharp Code Interview Questions

how do i copy textbox contents of 1 form to another form

4 Answers   Wipro,


How to use ASP.NET 2.0's TreeView to Display Hierarchical Data?

1 Answers  


Write a function which accepts list of nouns as input parameter and return the same list in the plural form. Conditions: i) if last letter is r then append s ii) if word ends with y then replace it by ies iii) call this function in main() and produce the required output. for eg:- if chair is input it should give chairs as output.

0 Answers   Mind Tree,


Write a function which accepts a sentence as input parameter.Each word in that sentence is to be reversed. Space should be there between each words.Return the sentence with reversed words to main function and produce the required output. for eg:- i/p: jack jill jung kill o/p: kcaj llij gnuj llik

1 Answers   Mind Tree,


IS Array list is generic or non generic

1 Answers  






write a Program to copy the string using switch case.

0 Answers   Mind Tree, Wipro,


How to pass multiple rows from one gridview to another gridview after clicking the checkbox.

1 Answers   Satyam,


Event Handling in C# Triggering a Button

1 Answers  


Code for Working with Files under a Directory?

1 Answers  


program to reverse the order of digits in a given number of any length.

1 Answers   Mind Tree,


Create a class called Accounts which has data members like ACCOUNT no, Customer name, Account type, Transaction type (d/w), amount, balance D->Deposit W->Withdrawal If transaction type is deposit call the credit(int amount) and update balance in this method. If transaction type is withdraw call debit(int amt) and update balance. Pass the other information like Account no,name,Account Type through constructor. Call the show data method to display the values.

1 Answers   Cognizant,


How to export 2 datatables of a single dataset to 2 different worksheets of a single MSExcel file ?

0 Answers   Eastcom Systems,


Categories
  • ASP.NET Code Interview Questions ASP.NET Code (46)
  • VB.NET Code Interview Questions VB.NET Code (9)
  • C Sharp Code Interview Questions C Sharp Code (51)
  • ADO.NET Code Interview Questions ADO.NET Code (8)