Search This Blog

Wednesday, November 13, 2013

SqlCommand C#

C# > Data > SqlCommand

SqlCommand is a Transact-SQL statement or stored procedure to execute against a SQL Server database.









Tuesday, November 12, 2013

GridBoundColumn RadGrid Telerik

Telerik > RadGrid > GridBoundColumn


GridBoundColumn is bound to a field in a data source.

Properties


Example:

GridBoundColumn staticColumn = new GridBoundColumn();
staticColumn = new GridBoundColumn();
staticColumn.DataField = "Title";
staticColumn.HeaderText = "Title";
grd.Columns.Add(staticColumn);




Sunday, November 10, 2013

DataTable C#

C# > System.Data   > DataTable

DataTable is a table in memory data.
When accessing DataTable objects in DataSet they are case sensitive.
We can display data from it  in controls such as DataGridView.

Properties:

Columns:         collection of columns
Rows:              collection of rows
DefaultView:   customized view of the table that may include a filtered view, or a cursor position.


Example:

   Create a new DataTable   

    System.Data.DataTable table = new DataTable("myTable");

Other examples:




System.Data namespace C#

C# > System.Data

System.Data namespace contains classes that represent ADO.NET architecture.
ADO.NET efficiently manages data from multiple data sources.

Examples:
  1. Populating DataSet and DataTable




    Friday, November 8, 2013

    Add Columns to DataTable C#

    C# > DataTable  > Add  column

    Using Columns collection we can add columns to DataTable in runtime.

    Example:

    DataTable dt = new DataTable("Product");
    dt.Columns.Add("id",typeof(Int32));
    dt.Columns.Add("name",typeof(string));





    Oracle FOR LOOP

    Oracle > FOR LOOP IN

    The syntax for the FOR Loop In Oracle is:

    FOR loop_counter IN [REVERSE] lowest_number..highest_number
    LOOP
    {.statements.}
    END LOOP;

    Example:

    begin
      for i in 1..10 loop
        DBMS_OUTPUT.PUT_LINE (i);
       end loop ;
    end ;
    /




    Microsoft SQL Server System Views

    Microsoft SQL Server system views provides a collections of system views that expose metadata.