Blog Home  Home Feed your aggregator (RSS 2.0)  
Software Code Help - Tuesday, August 11, 2009
Blog
 
# Tuesday, August 11, 2009
In case, when you are facing colspan problem in datagarid paging section, then use this code to correcting colspan problem.
 
protected void dGrid_PreRender(object sender, EventArgs e)
        {
            try
            {
                DataGrid dgSidDetails = (DataGrid)sender;
                //Fix for numbering being in a left aligned column
                //For some reason, the ColumnSpan property is ignored andnot rendered
                    //unless set using the Attributes
                    if (dgSidDetails.AllowPaging == true && dgSidDetails.AutoGenerateColumns ==    false)
                    {
                        //Get the Table
                        System.Web.UI.WebControls.Table tab =
                            (System.Web.UI.WebControls.Table)dgSidDetails.Controls[0];
                        //Change the Top Pager
                        if (dgSidDetails.PagerStyle.Position == PagerPosition.Bottom ||
                            dgSidDetails.PagerStyle.Position == PagerPosition.TopAndBottom)
                        {
                            tab.Rows[tab.Rows.Count -
                                1].Cells[0].Attributes.Add("colspan",
                                tab.Rows[1].Cells.Count.ToString());
                        }
                        //Change the Bottom Pager
                        if (dgSidDetails.PagerStyle.Position == PagerPosition.Top ||
                            dgSidDetails.PagerStyle.Position == PagerPosition.TopAndBottom)
                        {
                            tab.Rows[0].Cells[0].Attributes.Add("colspan",
                                tab.Rows[1].Cells.Count.ToString());
                        }
                    }
            }
            catch (Exception ex)
            {

            }
        }
Tuesday, August 11, 2009 12:29:41 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   Interview Question ASP.NET  | 
# Friday, August 07, 2009
SELECT COUNT(*) AS Total FROM syscolumns WHERE (name = 'clientID')
Friday, August 07, 2009 12:34:54 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   Interview Question SQL  | 
# Thursday, August 06, 2009

'Count': Counts the number of non-null values.


'Count (*)': Counts the number of rows in the table, including null values and duplicates.

Thursday, August 06, 2009 12:33:31 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   Interview Question SQL  | 
You can create local and global temporary tables. Local temporary tables are visible only in the current session; global temporary tables are visible to all sessions. Prefix local temporary table names with single number sign (# table_name), and prefix global temporary table names with a double number sign (##table_name).
Thursday, August 06, 2009 12:32:53 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   Interview Question SQL  | 

Views or tables participating in a view created with the SCHEMABINDING clause cannot be dropped. If the view is not created using SCHEMABINDING, then we can drop the table.

Thursday, August 06, 2009 12:31:58 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   Interview Question SQL  | 

Stored procedures are nested when one stored procedure calls another. You can nest stored procedures up to 32 levels.

Thursday, August 06, 2009 12:31:01 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   Interview Question SQL  | 
# Wednesday, August 05, 2009
Maharshi Dayanand Saraswati University (MDS) Rohtak, online counseling for B.Ed course from  5th August - 17th August 2009 on http://www.hrybedcounselling2009.nic.in/

From 16th August - 19th August 2009, the candidates can download their admission letters and report at the respective allotted colleges for verification of documents and depositing the fees.

MDU Rohtak B.Ed Counselling details are available on MDU Rohtak Website -

http://mdurohtak.com/

Direct Link to MDU Rohtak B.Ed Counselling Details -

http://mdurohtak.com/Site/Details.aspx?pid=H&id=12
Wednesday, August 05, 2009 5:39:02 AM (GMT Daylight Time, UTC+01:00)  #    Comments [2]   General  | 
# Wednesday, July 15, 2009

• The sp_recompile system stored procedure forces a recompile of a stored procedure the next time it is run.

• Creating a stored procedure that specifies the WITH RECOMPILE option in its definition indicates that SQL Server does not cache a plan for this stored procedure; the stored procedure is recompiled each time it is executed. Use the WITH RECOMPILE option when stored procedures take parameters whose values differ widely between executions of the stored procedure, resulting in different execution plans to be created each time. Use of this option is uncommon, and causes the stored procedure to execute more slowly because the stored procedure must be recompiled each time it is executed.

• You can force the stored procedure to be recompiled by specifying the WITH RECOMPILE option when you execute the stored procedure. Use this option only if the parameter you are supplying is atypical or if the data has significantly changed since the stored procedure was created.

Wednesday, July 15, 2009 2:04:06 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   Interview Question SQL  | 

You can use the sp_procoption system stored procedure in master database to mark the stored procedure to automatic execution when the SQL Server will start.

Wednesday, July 15, 2009 2:03:04 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   Interview Question SQL  | 

There are four different type of stored procedure given below:

1. Temporary Stored Procedures - SQL Server supports two types of temporary procedures: local and global. A local temporary procedure is visible only to the connection that created it. A global temporary procedure is available to all connections. Local temporary procedures are automatically dropped at the end of the current session. Global temporary procedures are dropped at the end of the last session using the procedure. Usually, this is when the session that created the procedure ends. Temporary procedures named with # and ## can be created by any user.

2. System stored procedures are created and stored in the master database and have the sp_ prefix.(or xp_) System stored procedures can be executed from any database without having to qualify the stored procedure name fully using the database name master. (If any user-created stored procedure has the same name as a system stored procedure, the user-created stored procedure will never be executed.)

3. Automatically Executing Stored Procedures - One or more stored procedures can execute automatically when SQL Server starts. The stored procedures must be created by the system administrator and executed under the sysadmin fixed server role as a background process. The procedure(s) cannot have any input parameters.

4. User defined stored procedure - These stored procedure is created by user.

Wednesday, July 15, 2009 2:02:16 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   Interview Question SQL  | 
Copyright © 2010 SoftwareCodeHelp. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: