-
Retrieve two tables of data at a time by using data reader
One interview I faced a Q:how can i retrieve two tables of data at a time by using data reader?Data reader read and forward only, how is
it possible to get 2 tables of data at a time -
-
How to update a column in DataGrid using C#
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];...
-
What is the basic difference between Dataset and Typed Dataset ?
When would you use Typed dataset?
-
What is difference in an Abstract Class and an Interface.
Abstract class can contain method definations also.Interfaces are essentially having all method prototypes no definitionIn short Interface is a abstract class having all methods abstract
-
-
-
What is difference in Record set and Dataset
Recordset provides data one row at a time.Dataset is a data structure which represents the complete table data at same time.Recordset has the logic to update and manipulate dataDataset is just a data store and manipulation is done through DataAdapters in .NET.
-
-
-
Add a field at run time to a table in ado.net
Imports System.Data.SqlClientPublic Class Form1Dim cn As New SqlConnection("server=.;database=atten;uid=sa;pwd=sa;")Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click'savecn.Open()Dim query, query1, query2 As StringDim regnum As Integerquery1 = "select max(reg) from sdetail"Dim cmd1 As New SqlCommand(query1, cn)regnum = cmd1.ExecuteScalarTextBox1.Text...
-
-
-
-
-
-
-
What are the Advantages of ADO.Net?
ADO.NET Does Not Depend On Continuously Live ConnectionsDatabase Interactions Are Performed Using Data CommandsData Can Be Cached in DatasetsDatasets Are Independent of Data SourcesData Is Persisted as XMLSchemas Define Data Structures
ADO.NET Interview Questions
Ans