Hoe can i connect the table into the c# application?

Answer Posted / gaurav

by writing the connection string on the click event of the
button. by connection string i mean it's the ado.net
structure.firstly you have to include the namespace- using
system.data.sqlclient;
now on the click event of the button( eg u have taken a
sumbit button ) you will be writting- sqlconnenection con=
new sqlconnection........then u'll use
datacommand,dataset,string,databind,gridview.
u can also use read for getting the errors in a specified
manner.for this u will be using try and the catch then your
connection string code and then u'll use the finally
function and then close().

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between dataset and datatable in c#?

537


What is the difference between convert and parse in c#?

445


What is string interpolation in c#?

536


How does the lifecycle of Windows services differ from Standard EXE?

510


What is the difference between field and property in c#?

467






What is the main purpose of xml?

471


What is the difference between icomparer and icomparable in c#?

456


Do vs while c#?

481


What are classes in c#?

573


Can you inherit multiple classes in c#?

482


How do you escape c#?

496


What namespace is list in c#?

485


What is indexer c#?

458


How do switch statements work?

474


Is int a class in c#?

495