Text 19 Aug Playing with C#

Console.WriteLine(“Using DataSets”);

FbDataAdapter da = new FbDataAdapter(); // Create a new DataAdapter

da.SelectCommand = new FbCommand(@”select * from company”, c);  // Assign a Select Command to the DataAdapter

DataSet ds = new DataSet(); // Create a DataSet to Collect the Output

da.Fill(ds); // Use the DataAdapter to Fill the DataSet

DataRow dr = ds.Tables[0].Rows[0];  // Create and Fill a DataRow 

Console.WriteLine(“Data Row Value” + dr[“name”].ToString()); // Pull out the field “NAME” from the table “COMPANY” and print it


Design crafted by Prashanth Kamalakanthan. Powered by Tumblr.