Saturday, December 12, 2015

Windows 10 WiFi issue Fix

By default, Windows 10 is set up to share your Internet connection over Wi-Fi. This is a nifty feature if you want it, and a dangerous one if you don't. To be on the safe side, you should probably just disable it right from the get-go.

Open the Settings app from the taskbar or Start Menu, then open Change Wi-Fi settings and click Manage Wi-Fi settings. Now, uncheck all the boxes under "For networks I select, share them with."

You may also want to slide the toggles to off underneath "Connect to suggested open hotspots" and "Connect to networks shared by my contacts."

bgr.com/2015/07/30/windows-10-upgrade-installation-settings/



JD Edawrds How to change Default Number of Rows Showing on Grid, Web/HTML

The Number of Grid records searched defaults to 10/20 for EnterpriseOne.

You can change this setting by changing the JAS.INI Its found in the E1 system path:
\Exxx\system\OC4J\j2ee\home\applications\webclient.ear\webclient\WEB-INF\classes.

Find the section [OWWEB] in the JAS.ini and add or change the line "GlobalPageSize = xx", where XX is the number of records to show.  e.g. GlobalPageSize = 50





You can actually change it in a INI file on the web server or from Server Manager Console. Web Runtime - Grid Global page size = 10 = 10 rows at a time.


Wednesday, December 2, 2015

Remote table-Valued Function Calls are not allowed

EXEC  [Server].[Database]..sp_executesql N'select * into #temp1 from  [databasename].dbo.fnecon (''TT'', ''10/01/2015'', ''10/30/2015'');'

Friday, October 16, 2015

Scheduling SQL server job C# asp.net



void submitjob()
    {
        SqlConnection DbConn = new SqlConnection(ConnectionString);
        SqlCommand ExecJob = new SqlCommand();
        ExecJob.CommandType = CommandType.StoredProcedure;
        ExecJob.CommandText = "msdb.dbo.sp_start_job";
        ExecJob.Parameters.AddWithValue("@job_name", "Extract_Account_Data");
        ExecJob.Connection = DbConn; //assign the connection to the command.

        using (DbConn)
        {
            DbConn.Open();
            using (ExecJob)
            {
                ExecJob.ExecuteNonQuery();
            }
        }
    }

Tuesday, September 8, 2015

Multiple select Listbox, C# asp.net

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default17.aspx.cs" Inherits="Default17" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:ListBox ID="lstFruits" runat="server" SelectionMode="Multiple">
    <asp:ListItem Text="Mango" Value="01" />
    <asp:ListItem Text="Apple" Value="02" />
    <asp:ListItem Text="Banana" Value="03" />
    <asp:ListItem Text="Guava" Value="04" />
    <asp:ListItem Text="Orange" Value="05" />
</asp:ListBox>
<asp:Button ID="Button1" Text="Submit" runat="server" OnClick="Submit" />
    </div>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
        DataKeyNames="LT,FY,BU,MedCostID" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="LT" HeaderText="LT" ReadOnly="True"
                SortExpression="LT" />
            <asp:BoundField DataField="FY" HeaderText="FY" ReadOnly="True"
                SortExpression="FY" />
            <asp:BoundField DataField="BU" HeaderText="BU" ReadOnly="True"
                SortExpression="BU" />
            <asp:BoundField DataField="MedCostID" HeaderText="MedCostID" ReadOnly="True"
                SortExpression="MedCostID" />
            <asp:BoundField DataField="MCE_FSC1_Change" HeaderText="MCE_FSC1_Change"
                SortExpression="MCE_FSC1_Change" />
            <asp:BoundField DataField="MCE_FSC1_Date" HeaderText="MCE_FSC1_Date"
                SortExpression="MCE_FSC1_Date" />
         
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>"
        ></asp:SqlDataSource>
    </form>
</body>
</html>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Default17 : System.Web.UI.Page
{
    string allItems = "";
    string allItemsql = "";
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Submit(object sender, EventArgs e)
    {
        string message = "";
        foreach (ListItem item in lstFruits.Items)
        {
            if (item.Selected)
            {
                message += item.Text + " " + item.Value + "\\n";

                allItems += "'"+item.Value+"'," ;

            }
        }
        allItemsql = allItems.Substring(0, allItems.Length - 1);

        SqlDataSource1.SelectCommand = "SELECT * FROM [UserData] where MedCostID in (" + allItemsql + ")";

    }
}

Sunday, July 12, 2015

Copy All sheets in WorkBook as value VBA Excel 2010

 Sub CopyAllAsValues()
Dim WO As Workbook, SO As Worksheet           ' old
Dim WN As Workbook, SN As Worksheet           ' new

    Set WO = ActiveWorkbook                   ' this is where we come from
    Set WN = Workbooks.Add                    ' the new sheet with only values

    For Each SO In WO.Worksheets
        Set SN = WN.Worksheets.Add            ' create new sheet
        SN.Name = SO.Name                     ' copy name
        SO.Cells.Copy                         ' copy all cells to clipboard
        SN.[A1].PasteSpecial xlPasteValues    ' paste values at A1
        SN.[A1].PasteSpecial xlPasteFormats   ' paste formats as well at A1
    Next SO
End Sub

http://stackoverflow.com/questions/4194422/how-to-copy-values-only-us

Friday, June 26, 2015

Replace String In File Folder ASPX Excel VBA

Sub ReplaceStringInFile()

Dim objFSO As Object
Dim objFil As Object
Dim objFil2 As Object
Dim StrFileName As String
Dim StrFolder As String
Dim SstrAll As String

Set objFSO = CreateObject("scripting.filesystemobject")
StrFolder = "c:\temp1\"
StrFileName = Dir(StrFolder & "*.aspx")

Do While StrFileName <> vbNullString
    Set objFil = objFSO.opentextfile(StrFolder & StrFileName)
    strAll = objFil.readall
    objFil.Close
    Set objFil2 = objFSO.createtextfile(StrFolder & StrFileName)
    objFil2.Write Replace(strAll, "Title", "xxxxxxxxxx")
    objFil2.Close
    StrFileName = Dir
Loop
End Sub

Wednesday, June 3, 2015

SqlDataSource Timeout issue C# asp.net

SqlDataSource Timeout issue


 <asp:SqlDataSource ID="SqlDataSource1" runat="server" onselecting="dsTest_Selecting"
        ConnectionString="<%$ ConnectionStrings:BUDGETReports %>"
        ></asp:SqlDataSource>




Code behind


 protected void dsTest_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
    {
        e.Command.CommandTimeout = 1000;
    }

Sunday, May 17, 2015

Error: Date is in this Yr but Prior Mth JD Edwards Manual Payment M Batch

How to fix this error for manual payment M- batch type ,even period was open :-


Informational: Call From     : Shweta Sharma
Contact       :
Phone Number  :
Tickler Date  : 05/17/2015
Subject       : Error: Date is in this Yr but Prior Mth
CAUSE . . . .  The date being edited is in the current year but in a prior
               month.
RESOLUTION. .  This is an error if in the General Accounting Constants you
               do not allow PBCO (posted before cutoff) entries.  Change the
               date or change the General Accounting Constants to allow PBCO
               entries.


Solution:-
After spending 2-3 hours, verifying Data , dates etc, looking into code R09801
 Did following Update and posted, worked fine:-

update jde_production.proddta.f0414 set rnpost='' where rnpyid=255846
update jde_production.proddta.f0413 set rmistp='' where  rmicu=964165




Thursday, January 29, 2015

Insert into Table Execute SP

 

declare @field1 varchar(1000)

declare @field2 varchar(1000)

CREATE TABLE #tempTable(FormulaType Varchar(100),co Varchar(5),      Amount float)

declare cur CURSOR LOCAL for

    --select field1, field2 from sometable where someotherfield is null

       select top 10 CustomList_Name,CustomList_Item  from mfdb.dbo.tblMF_Custom

      

 

open cur

 

fetch next from cur into @field1, @field2

 

while @@FETCH_STATUS = 0 BEGIN

 

    --execute your sproc on each row

 

insert into #tempTable(FormulaType,co,Amount)

   execute SP_testfunc  @field1,@field2

   --print @field1

 

    fetch next from cur into @field1, @field2

END

 

close cur

deallocate cur

 

select * from #tempTable

 

 


Sunday, November 9, 2014

Classic asp database connection

<!DOCTYPE html>
<head>
    <title></title>
</head>
<body>
    <%
        'Dim cnn
'Set cnn = Server.CreateObject("ADODB.Connection")
'cnn.open "PROVIDER=SQLOLEDB;DATA SOURCE=SHIVALISAANVI;UID=ituser;PWD=123456;DATABASE=AdventureWorks2008R2 "
%>
        <%

'Dim conn
'Set conn = Server.CreateObject("ADODB.Connection")

'conn.Open "Provider=SQLOLEDB; Data Source = (SHIVALISAANVI); Initial Catalog = AdventureWorks2008R2; User Id = ituser; Password=123456"

'If conn.errors.count = 0 Then   
'   Response.Write "Connected OK"
'End If


      
        %>
    <% 
'declare the variables 
Dim Connection
Dim Recordset
Dim SQL

'declare the SQL statement that will query the database
SQL = "SELECT TOP 10 *   FROM [AdventureWorks2008R2].[Person].[Person]"

'create an instance of the ADO connection and recordset objects
Set Connection = Server.CreateObject("ADODB.Connection")
Set Recordset = Server.CreateObject("ADODB.Recordset")

'open the connection to the database
Connection.Open  "PROVIDER=SQLOLEDB;DATA SOURCE=SHIVALISAANVI;UID=ituser;PWD=123456;DATABASE=AdventureWorks2008R2 "


'Open the recordset object executing the SQL statement and return records 
Recordset.Open SQL,Connection

'first of all determine whether there are any records 
If Recordset.EOF Then 
Response.Write("No records returned.") 
Else 
'if there are records then loop through the fields 
Do While NOT Recordset.Eof   
Response.write Recordset("FirstName") &"  "
Response.write Recordset("MiddleName")&" "
Response.write Recordset("LastName")&" "
Response.write "<br>"    
Recordset.MoveNext     
Loop
End If

'close the connection and recordset objects to free up resources
Recordset.Close
Set Recordset=nothing
Connection.Close
Set Connection=nothing
%>

</body>
</html>

Thursday, November 6, 2014

Fwd: Process Oracle Visual Studios Connection


1. Install Oracle Client 32 Bit

2. in VS 2010 -> View -> Server Explorer

3. Right Click on Data Connection ->  Add Connection ->

in server name ->  //OracleServerName:PortNo/InstenceName

//dc01xxxxxxx03.xxxxxx.ccc:80903/hixxjd

user id and password

 

4. Test connection

gridview -> use director-> Create connection string

 

 

and SQL statement

 

SELECT  * FROM DevUSER(Schema Name).[Table Name] WHERE ROWNUM <= 100

 

 

 


Wednesday, October 1, 2014

Javascript enable/disable 32

about:config

  1. In the address bar, type "about:config" (with no quotes), and press Enter.
  2. Click "I'll be careful, I promise"
  3. In the search bar, search for "javascript.enabled" (with no quotes).
  4. Right click the result named "javascript.enabled" and click "Toggle". JavaScript is now disabled.

 https://support.mozilla.org/en-US/questions/967344