What is sequence of code in retrieving data from database?

Answers were Sorted based on User's Feedback



What is sequence of code in retrieving data from database?..

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

What is sequence of code in retrieving data from database?..

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

What is sequence of code in retrieving data from database?..

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

Post New Answer

More ASP.NET Interview Questions

Name two properties common in every validation control?

1 Answers  


What is application in asp net?

0 Answers  


What ports must be open for DCOM over a firewall? What is the purpose of Port 135?

0 Answers  


what is view stat how it is use ?

2 Answers   Amazon,


What is an Interface and What is an Abstract Class?

3 Answers  


What is the difference between rest and restful?

0 Answers  


You create an assembly to access data in a relational database. This assembly will be used by several ASP.NET applications on your Web server. You need to ensure that all your applications can access the assembly. Which two actions should you take (Each Answer: presents part of the solution.)? (Choose two) A . Run the Assembly Registration tool (Regasm.exe). B . Run the String Name tool (Sn.exe). C . Run the Installer tool (Intallutil.exe). D . Run the Global Assembly Cache tool (Gacutil.exe).

6 Answers   CPCL, Syntax Softtech,


How many types of validators are there in asp net?

0 Answers  


What is Virtual path in ASP.Net

2 Answers   Proteans,


what is CLR?

3 Answers   PrimeLine,


What is the difference between globalization and localization?

0 Answers  


Is asp.net web forms dead?

0 Answers  


Categories