Friday, January 17, 2020

DRDO MTS - Multi Tasking Staff


DRDO-MTS

Vacancies for MULTI TASKING STAFF

Qual: 10th/ITI                 Age: 18-25 Years   
Exam Fee for Gen: 100 (Nil for SC/ST and Female)
Last Date: 23-01-2020

Wednesday, May 15, 2019

SSC MTS - Multi Tasking Staff

Staff Selection Commission's new vacancy is
Multi Tasking Staff


Eligibility Criteria :
Qualification : 10th/SSC pass
Age Limit : 18-25 years
Exam Fee : 100 for General Candidates and Nil for SC/ST and Female candidates


Friday, August 18, 2017

Measurement of Land

1 Gajam = 1 Sq Yard = 9 sq feet
100 gajams =100Sq.yard = 900 Sq.ft
1 cent = 435.600142084 sq.feet (ft2)
1 cent = 6.05 Ankana / 48 Sq.Yards/ 48 gajams
100 cents = 1 acre
1 foot = 12 inch = 30.48 cm

Thursday, July 17, 2014

How to merge worksheets into one worksheet in excel?

Following VBA code can help you to get data from all worksheets of active workbook together
into a new single worksheet. At the same time, all of the worksheets must have the same field
structure, same column headings and same column order

-Hold down ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window
-Click Insert -> Module, and paste the following code in the Module Window

Sub Combine()
Dim J As Integer
On Error Resume Next
Sheets(1).Select
Worksheets.Add
Sheets(1).Name = "Combined"
Sheets(2).Activate
Range("A1").EntireRow.Select
Selection.Copy Destination:=Sheets(1).Range("A1")
For J = 2 To Sheets.Count
Sheets(J).Activate
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select
Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
Next
End Sub

-Then press F5 to run the code, and all the data in the workbook has been merged into
a new worksheet named Combined.

Note:
-Your data must start from A1
-Your data must have the same structure

Wednesday, July 2, 2014

Format to first letter upper case

Globalization can help to chnage the first letter to upper case, Here is how in C#:

string test = "Test UppEr";
string formatted = System.Globalization.CultureInfo.CurrentUICulture.TextInfo.ToTitleCase(test);

Result will be "Test Upper"

Wednesday, June 25, 2014

gridview - date fromat string in asp.net gridview

gridview date format string

DataFormatString="{0:dd/MM/yyyy}"

Tuesday, June 24, 2014

To get the list of tables in sql server

SELECT * FROM information_schema.tables
OR
SELECT sobjects.name FROM sysobjects sobjects WHERE sobjects.xtype = 'U'

-The list of other object types you can search for

C: Check constraint
D: Default constraint
F: Foreign Key constraint
L: Log
P: Stored procedure
PK: Primary Key constraint
RF: Replication Filter stored procedure
S: System table
TR: Trigger
U: User table
UQ: Unique constraint
V: View
X: Extended stored procedure

Get the list of stored procedures in sql server

SELECT * FROM SYS.procedures WHERE NAME NOT LIKE 'SP_%DIAGRAM%' ORDER BY modify_date desc

OR

SELECT * FROM sys.all_objects where type='p' and NAME NOT LIKE 'SP_%DIAGRAM%' ORDER BY create_date desc

Thursday, June 19, 2014

Select data from sql and bind to datalist

Private Sub FillDataList()
        Try
            Dim strConString As String = String.Empty
            Dim SqlQuery As String = String.Empty
            Dim sqlda As SqlDataAdapter
            Dim SqlDs As New DataSet
            strConString = System.Configuration.ConfigurationManager.ConnectionStrings("CnString").ConnectionString
            SqlQuery = "SELECT TOP 6 * FROM SampleTable"

            sqlcon = New SqlConnection(strConString)
            sqlcmd = New SqlCommand(SqlQuery, sqlcon)
            sqlda = New SqlDataAdapter(sqlcmd)
            sqlcon.Open()
            sqlda.Fill(SqlDs, "Stf")

            DataList1.DataSource = SqlDs.Tables(0)
            DataList1.DataBind()

            sqlcon.Close()
            sqlcmd.Dispose()
            sqlcon.Dispose()
        Catch ex As Exception
            lblMsg.Text = ex.ToString()
        End Try
    End Sub

Update sql table data using asp.net

Private Sub UpdateTest()
        Try
            Dim SqlCmd As SqlCommand
            Dim SqlCon As SqlConnection
            Dim strConString As String
            Dim SqlQuery As String = String.Empty

            strConString = System.Configuration.ConfigurationManager.ConnectionStrings("Cn").ConnectionString
            SqlQuery = "UPDATE Staff SET TEST='HI' WHERE ID = 12"

            SqlCon = New SqlConnection(strConString)
            SqlCmd = New SqlCommand(SqlQuery, SqlCon)
            SqlCon.Open()
            SqlCmd.ExecuteNonQuery()

            SqlCon.Close()
            SqlCmd.Dispose()
            SqlCon.Dispose()
        Catch ex As Exception
            lblMsg.Text = "Error"
        Finally
            SqlCon.Close()
            SqlCmd.Dispose()
            SqlCon.Dispose()
        End Try
    End Sub

Tuesday, May 27, 2014

Error : RegisterForEventValidation can only be called during Render();

To resolve the above error, add the following.

<%@ Page Language="C#" EnableEventValidation = "false"%>

.ColumnName and .ColumnName have conflicting properties: DataType property mismatch while megrge datasets

by using the following code block, we can avoid the error

VB.Net Code

ds1.Tables(0).Merge(ds2.Tables(0), True, MissingSchemaAction.Ignore)

how to Merge two datasets in asp.net

we can merge two datasets using the following code

VB.Net Code

Dim ds1 As New DataSet
Dim ds2 As New DataSet

If ds1 .Tables(0).Rows.Count > 0 Or ds2.Tables(0).Rows.Count > 0 Then
ds1.Tables(0).Merge(ds2.Tables(0), True, MissingSchemaAction.Ignore)
                gvResults.DataSource = ds1
                gvResults.DataBind()
End If

Sunday, March 16, 2014

Failed to map the path '/' in report viewer in VS2010 and framework 2.0

just found the solution for the above problem

launch your Visual Studio with "Run as Administrator" and it will work.

Friday, February 28, 2014

how to to get the particular column of a dataset returned in asp.net

some times when we are working with excel sheet data,
we might experience the changes in column names,
in that case we can simply use the following code to access the particular column of a returned dataset

VB.Net code

Dim ds As New DataSet
ds.Tables(0).Columns(0)
ds.Tables(0).Columns(1)
and so on..

how to add a column to a dataset returned in asp.net

some times we need to append some columns to retunred dataset,
in that case we can use the following code to work out.

VB.Net code

Dim ds As New DataSet
ds.Tables(0).Columns.Add("UploadBy")

Thursday, February 6, 2014

asp.net calender control - how to bind data to a calender control in asp.net

we can bind the data to a calender control using DayRender Event


VB.Net code

Protected Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar1.DayRender
        Dim nextDate As DateTime
        Dim hl As HyperLink

        Dim TblCell As TableCell = CType(e, DayRenderEventArgs).Cell
        TblCell.Height = CType(88, Web.UI.WebControls.Unit)
        TblCell.Width = CType(200, Web.UI.WebControls.Unit)

        Try
            If Not CType(Session("dsEvents"), DataSet) Is Nothing Then
                For Each dr As DataRow In CType(Session("dsEvents"), DataSet).Tables(0).Rows
                    nextDate = CType(dr("VisitationDate"), DateTime)
                    If Not e.Day.IsOtherMonth Then
                        If nextDate = e.Day.Date Then
                            hl = New HyperLink
                            If CType(dr("Branch"), String) <> "" Then
                                hl.Text = "
" & CType(dr("Branch"), String)
                            Else
                                hl.Text = "
" & CType(dr("Others"), String)
                            End If
                            hl.NavigateUrl = "ViewDetails.aspx?ID=" & CType(dr("Id"), String)
                            hl.ToolTip = "Click for details."
                            hl.Font.Bold = False
                            hl.ForeColor = System.Drawing.ColorTranslator.FromHtml("#24618E")
                            e.Cell.BackColor = Color.Azure
                            e.Cell.Controls.Add(hl)
                            e.Cell.Wrap = True
                        End If
                    End If
                Next
            End If
            e.Day.IsSelectable = False
        Catch ex As Exception
            Response.Write(ex.ToString())
        End Try
    End Sub

Monday, January 6, 2014

what is scope_Identity in sql server

Scope_Identity is the auto generated Id in current context

usage
DECLARE @ID AS BigInt
Set @ID=Scope_Identity()

Friday, January 3, 2014

how to check the permissions on the database in sql server

to check the permissions on the database that a user connected to,

use the following query block,

SELECT * FROM fn_my_permissions(null,'database')

result

how to concat strings in sql

To concat 2 strings or 2 columns as one in sql server

use the following sql query

SELECT 'SQL'+' SERVER' AS RESULT

return value : SQL SERVER