what is execute scalar?
Answers were Sorted based on User's Feedback
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 |
Explain how to create dynamic gridview?
Why ca not we use multiple inheritance and garbage collector paralelly in .net?
What is command class in ado.net?
What do you mean by performing asynchronous operation using command object?
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();
What are the steps in connecting to database?
Explain the difference between ado and ado.net?
What are the Data providers in ADO.Net?
What happens when u try to update data in a dataset in .NET while the record is already deleted in SQL SERVER as backend?
What are the benefits of using of ADO.NET in .NET 4.0?
Which name space is used to get assembly details?
describe about the ado.net object model