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

Code for Reading and writing from a file?

0 Answers   IBM, Xoriant,


Code for IP Address Comparison and Conversion in C#?

0 Answers  


program for string reverse(eg:- i am boy -> boy am i)

8 Answers   Black Pepper, Infosys, Mind Tree,


Write a program which has a function and that function should take 2 or 3 or any number of strings and it should return the largest common prefix of all those strings. If there is no common prefix it should return an empty string. for eg:- INPUT OUTPUT glo {glory,glorious,glod} gl {glad,glow} {calendar,phone} empty string

2 Answers   Mind Tree,


How to Create Files by Using the FileInfo Class?

1 Answers  


how to change password in .net with c # with ado.net and also SQL server 2008 change password

1 Answers  


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

1 Answers   Mind Tree,


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

2 Answers   Sify,


"c sharp" code for factorial using static variables

9 Answers  


write a Program to copy the string using switch case.

0 Answers   Mind Tree, Wipro,


Write a program. there are 1..n numbers placed in an array in random fashion with one integer missing. find the missing number.

1 Answers   Infosys, Mind Tree,


c# code to Count number of 1's in a given range of integer (0 to n)

0 Answers  


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)