what is execute scalar?

Answers were Sorted based on User's Feedback



what is execute scalar?..

Answer / vaishuparmar

.it's used with aggregate functions.
.there are main 5 aggregate function max,min,sum,avg,and count..
.it returns only one value at a time.
.it fetches the data from the database.
.it returns only first column of first row.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ADO.NET Interview Questions

Explain how to create dynamic gridview?

0 Answers  


Why ca not we use multiple inheritance and garbage collector paralelly in .net?

0 Answers  


What is command class in ado.net?

0 Answers  


What do you mean by performing asynchronous operation using command object?

0 Answers  


How To Update A Column In A DataGrid Using C#.NET? I am getting InvalidCastException as (Specified cast is not valid) while updating 2nd column in a datagrid? Id,firstname,lastname are the three columns of my datagrid respectively. I wanted to edit the second column(lastname) and update it. I did the following code in DataGrid's updatecommand(),but failed to update ! Int varid=(int)DataGrid1.DataKeys[e.Item.ItemIndex]; TextBox lnm=(TextBox)e.Item.Cells[2].Controls[0]; string str=lnm.Text ; SqlCommand cmd=new SqlCommand("update customer set lastname='" + str + "' where id=" + varid + "",con); cmd.ExecuteNonQuery(); DataGrid1.EditItemIndex=- 1; DataGrid1.DataBind();

2 Answers   Mind Tree, TCS,






What are the steps in connecting to database?

3 Answers   IBM, Microsoft,


Explain the difference between ado and ado.net?

0 Answers  


What are the Data providers in ADO.Net?

0 Answers  


What happens when u try to update data in a dataset in .NET while the record is already deleted in SQL SERVER as backend?

5 Answers  


What are the benefits of using of ADO.NET in .NET 4.0?

0 Answers  


Which name space is used to get assembly details?

0 Answers  


describe about the ado.net object model

4 Answers   TCS,


Categories