Translate

Wednesday, 22 March 2017

mysql get current process

SELECT* FROM INFORMATION_SCHEMA.PROCESSLIST;
#or
SHOW FULL PROCESSLIST;
#after that kill the id by this query;
KILL 6718;COMMIT;

Monday, 20 February 2017

retrieve the view definition from a SQL Server using query

select definition
from sys.objects     o
join sys.sql_modules m on m.object_id = o.object_id
where o.object_id = object_id( 'dbo.vw_demo')
  and o.type      = 'V'

Wednesday, 15 February 2017

Serial no in sql query

select  ROW_NUMBER() OVER (ORDER BY customer_id) AS 'SL No',   * from MstCustomer

Friday, 29 July 2016

c# - delete image from folder after deleting the record containing image

Use Name Space : using System.IO;
C# code
----------------
string filePhisicalPath = Server.MapPath("~/Images/MyFileName.pdf");
        FileInfo objFile = new FileInfo(filePhisicalPath);
        if (objFile.Exists)
        {
            objFile.Delete();
        }

Friday, 20 May 2016

set default button in asp.net

<form id="form1" runat="server" DefaultButton="btnLogin">

 <asp:TextBox ID="txtUserName" runat="server" ToolTip="Enter Your User Name"
              TabIndex="1"  placeholder="User Name"></asp:TextBox>

      <asp:TextBox ID="txtpassword" runat="server" ToolTip="Enter Your PassWord Name"
                               TabIndex="2" placeholder="Password" TextMode="Password"></asp:TextBox>

 <asp:Button ID="btnLogin" runat="server" Text="Sign In"  TabIndex="3"
                                                   OnClientClick="return Validate()" OnClick="btnLogin_Click" />

  </form>