What is sequence of code in retrieving data from database?
Answers were Sorted based on User's Feedback
Answer / seshu
SQLConnection conn = new
SQLConnection("DataSource=;InitialCatalog=;User Id=;Password=");
SQLCommand cmd=new SQLCommand("select * from tablename",conn);
DataAdapter da=new DataAdapter(cmd);
Dataset ds=new Dataset();
da.fill(ds,"tablename");
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / chandra
system.data.oledb
dim oledb as new oledbconnection
oledbconnection1.open()
dim com as new oledbcommand("select empname from emp where
empid=100".oledbconnection)
dim dr as oledbdatareader=com.executereader()
if dr.read() then
textbox1.text=dr(0)
end if
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / srujana
using data.sqlclient;
sqlconnection cn;
cn=new sqlconnectin("user id=sa;database=pubs;data
source=server");
cn.open();
Is This Answer Correct ? | 2 Yes | 2 No |
i want the asp.net technical questions and answeres
What is marshalling ? Is it a part of asp.net ?
How to add DateTime Control in normal DataGrid Server Control?
Explain server-side scripting and client-side scripting.
What are clr?cts?cls?
4 Answers e4e, HCL, Microsoft, Tata Communications,
How many types of cookies are available in asp?
can i use store procedure in disconnected mode? give me answer
How do you use css in asp.net?
hi i have a problem regarding to datagrid in aspdotnet.i have a datagrid in my application.i have to place add,edit,delete buttons or links what ever it may be. now the problem is if i click on add button then the page has to redirected to another form called "xyz.aspx" and if i click on edit button the page has to redirected to another form called "abc.aspx".i am phasing the problem that if where ever i click on the datagrid the cursor goes to gv1_SelectedIndexChanged event.please tell me the solution about the code.
what is session,cokkies in asp.net??
When would you set a control's AutoPostBack property to true?
Why we use content place holder in asp.net?