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 |
What is the difference between viewstate and hidden field in asp.net?
Who will magage un-managed code?
What is the main difference between a static page and a dynamic page?
How to include silver light .xap page into asp.net web application and what is the purpose of using silverlight application?
What are sql notifications and sql invalidations?
Any alternative to avoid name collisions other then Namespaces?
Difference between .NET and previous version?
What is dataset ?
18 Answers Infosys, Kuwait University,
What is difference between inproc and outproc?
What does session_start () do?
What is viewstate? What does the "enableviewstate” property do? Whay would I want it on or off?
what is the requirement that .Net web services can access the java application?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)