Powershell : Issues with user input collection from Multiple InPutBox Form

I am having issues with getting user input to pass from a form that a user fills out into variables that I can then use in other methods and commands. (ex; SQL Query, SQL Data Add, ... )
I have attached the Powershell script I am using in it's designed form but I am having issues getting the DataCollection function to grab the content of the InputBox and send it to a variable for later use.
Note: I'm running this at this time from the ISE so I can actually see what is going on.
Any help would be appreciated.
DAS
[System.Reflection.Assembly]::LoadWithPartialName( “System.Windows.Forms”)
[System.Reflection.Assembly]::LoadWithPartialName( “Microsoft.VisualBasic”)
$FormDBA = New-Object System.Windows.Forms.Form
$FormDBA.Size = New-Object System.Drawing.Size(300,500)
$FormDBA.Text = "MIS Data"
$FormDBA.StartPosition = [System.Windows.Forms.FormStartPosition]::CenterScreen;
function DataCapture
$SubSID = $InBoxSID.text
ECHO $SubSID
$InBoxTxtSID = New-Object System.Windows.Forms.Label
$InBoxTxtSID.Location = New-Object System.Drawing.Size(25,15)
$InBoxTxtSID.Text = "Sticker ID : "
$InBoxSID = New-Object System.Windows.Forms.TextBox
$InBoxSID.Location = New-Object System.Drawing.Size(130,10)
$InBoxSID.Size = New-Object System.Drawing.Size(120,20)
$InBoxTxtUSR = New-Object System.Windows.Forms.Label
$InBoxTxtUSR.Location = New-Object System.Drawing.Size(25,55)
$InBoxTxtUSR.Text = "User Name ; "
$InBoxUSR = New-Object System.Windows.Forms.TextBox
$InBoxUSR.Location = New-Object System.Drawing.Size(130,50)
$InBoxUSR.Size = New-Object System.Drawing.Size(120,20)
$InBoxTxtPCN = New-Object System.Windows.Forms.Label
$InBoxTxtPCN.Location = New-Object System.Drawing.Size(25,95)
$InBoxTxtPCN.Text = "PC Name : "
$InBoxPCN = New-Object System.Windows.Forms.TextBox
$InBoxPCN.Location = New-Object System.Drawing.Size(130,90)
$InBoxPCN.Size = New-Object System.Drawing.Size(120,20)
$InBoxTxtDPT = New-Object System.Windows.Forms.Label
$InBoxTxtDPT.Location = New-Object System.Drawing.Size(25,135)
$InBoxTxtDPT.Text = "Department : "
$InBoxDPT = New-Object System.Windows.Forms.TextBox
$InBoxDPT.Location = New-Object System.Drawing.Size(130,130)
$InBoxDPT.Size = New-Object System.Drawing.Size(120,20)
$InBoxTxtPCT = New-Object System.Windows.Forms.Label
$InBoxTxtPCT.Location = New-Object System.Drawing.Size(25,175)
$InBoxTxtPCT.Text = "PC Type : "
$InBoxPCT = New-Object System.Windows.Forms.TextBox
$InBoxPCT.Location = New-Object System.Drawing.Size(130,170)
$InBoxPCT.Size = New-Object System.Drawing.Size(120,20)
$InBoxTxtMAK = New-Object System.Windows.Forms.Label
$InBoxTxtMAK.Location = New-Object System.Drawing.Size(25,215)
$InBoxTxtMAK.Text = "Make : "
$InBoxMAK = New-Object System.Windows.Forms.TextBox
$InBoxMAK.Location = New-Object System.Drawing.Size(130,210)
$InBoxMAK.Size = New-Object System.Drawing.Size(120,20)
$InBoxTxtMOD = New-Object System.Windows.Forms.Label
$InBoxTxtMOD.Location = New-Object System.Drawing.Size(25,255)
$InBoxTxtMOD.Text = "Model : "
$InBoxMOD = New-Object System.Windows.Forms.TextBox
$InBoxMOD.Location = New-Object System.Drawing.Size(130,250)
$InBoxMOD.Size = New-Object System.Drawing.Size(120,20)
$InBoxTxtOPS = New-Object System.Windows.Forms.Label
$InBoxTxtOPS.Location = New-Object System.Drawing.Size(25,295)
$InBoxTxtOPS.Text = "O.S. : "
$InBoxOPS = New-Object System.Windows.Forms.TextBox
$InBoxOPS.Location = New-Object System.Drawing.Size(130,290)
$InBoxOPS.Size = New-Object System.Drawing.Size(120,20)
$InBoxTxtDIS = New-Object System.Windows.Forms.Label
$InBoxTxtDIS.Location = New-Object System.Drawing.Size(25,335)
$InBoxTxtDIS.Text = "Disposed : "
$InBoxDIS = New-Object System.Windows.Forms.TextBox
$InBoxDIS.Location = New-Object System.Drawing.Size(130,330)
$InBoxDIS.Size = New-Object System.Drawing.Size(120,20)
$button = New-Object System.Windows.Forms.Button
$button.Location = New-Object System.Drawing.Size(150,400)
$button.Width = 100
$button.Text = “Ok”
$button.Add_Click({DataCapture})
$FormDBA.Controls.Add($button)
$FormDBA.Controls.Add($InBoxTxtSID)
$FormDBA.Controls.Add($InBoxTxtUSR)
$FormDBA.Controls.Add($InBoxTxtPCN)
$FormDBA.Controls.Add($InBoxTxtDPT)
$FormDBA.Controls.Add($InBoxTxtPCT)
$FormDBA.Controls.Add($InBoxTxtMAK)
$FormDBA.Controls.Add($InBoxTxtMOD)
$FormDBA.Controls.Add($InBoxTxtOPS)
$FormDBA.Controls.Add($InBoxTxtDIS)
$FormDBA.Controls.Add($InBoxSID)
$FormDBA.Controls.Add($InBoxUSR)
$FormDBA.Controls.Add($InBoxPCN)
$FormDBA.Controls.Add($InBoxDPT)
$FormDBA.Controls.Add($InBoxPCT)
$FormDBA.Controls.Add($InBoxMAK)
$FormDBA.Controls.Add($InBoxMOD)
$FormDBA.Controls.Add($InBoxOPS)
$FormDBA.Controls.Add($InBoxDIS)
$FormDBA.ShowDialog()

Change this:
$button = New-Object System.Windows.Forms.Button
$button.Location = New-Object System.Drawing.Size(150,400)
$button.Width = 100
$button.Text = “Ok”
$button.DialogResult='Ok'  #<<<<<-------
#$button.Add_Click({DataCapture})
Remove function andrun like this:
if('Ok' -eq $FormDBA.ShowDialog()){
    $FormDBA.Controls|%{$_.Text}
With names you can get values by control name.
¯\_(ツ)_/¯
This suggestion works for the purpose I needed. 
If I could, I would attach the file instead of pasting the script so you can see what all I am using this to do.
But in short, we have a main form we use to pull records from a database and call up an application at the click of a button for remote assistance.  However, we seem to now need the ability to have this application to edit and add new records into said
database.  That's where this second form came in and also when I hit my issue with the information capture.
At this time I'm getting this to format the information collected so that I can start using using it with SQL commands.

Similar Messages

  • Issue with calling Web Services from Adobe Interactive Forms

    Hi,
    I have created Web Services for remote enabled function module and imported it in the data connection in adobe form. In the adobe form created the button (Drag&Drop from Data Connection) as HTTP submit button. In the submit URL I have given the Web Services link. A program is downloading the pdf form in desktop with fillable as 'N'.
    When I provide the input parameters and click on the button, its promts for SAP user id and password. After that it shows the error as "An error occurred during the submit process. Cannot process content of type text/xml".
    Why this error is coming and how to correct?
    How can we debug web services?
    Thanks and Regards,
    Praveen

    Sherif, this is a wrong forum. Please post on the LiveCycle Designer thread: http://forums.adobe.com/community/livecycle/livecycle_es/livecycle_designer_es

  • How to prevent a solaris user to telnet from multiple computers

    Hello,
    How to prevent Solaris users to telnet from multiple computers? They should be able to telnet from only one PC.
    Please help..

    ora_tech have a good point, i was about to suggest ipfilter, which is a built-in-firewall in Solaris, but using tcp wrappers would probably be easier. It all depends on which level of security you want (blocking the telnet requests in a firewall would generally be safer than blocking them at the tcp wrapper level, since its prevents some processing).
    Since Solaris 10 you can also easily enable tcp wrappers on the inetd services with inetadm, see:
    http://blogs.sun.com/gbrunett/entry/tcp_wrappers_on_solaris_10
    .. for more details..
    .7/M.

  • Issue with Executing OS commands from Stored Procedure

    I am trying to execute the scripts provided at :
    http://github.com/xtender/XT_SHELL
    provided by xtender user.
    As required, I have asked my DBAs to grant privileges by executing the following scripts:
    Begin
      --change to needed permissions and execute
      dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/factiva/ODS/bin/CVIM_Rpt_ExportCSVFile’, 'read,write,execute' );
    end;
    /where CVIM_Rpt_ExportCSVFile is my script residing in the Unix server where my Oracle is installed.
    The error I am facing when I try to execute the following command is:
    select * from table(xt_shell.shell_exec('/var/scripts/CVIM_Rpt_ExportCSVFile',100))
    Exception:the Permission (java.io.FilePermission /var/scripts/CVIM_Rpt_ExportCSVFile execute) has not been granted to ODS. The PL/SQL to grant this is dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/scripts/CVIM_Rpt_ExportCSVFile', 'execute' )I have asked my DBA to also execute the following scripts: - But I still see the same error as above. I am not able to figure out whats going on. Can anyone pls help me out??
    EXEC Dbms_Java.Grant_Permission('ODS', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
    EXEC Dbms_Java.Grant_Permission(ODS', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
    dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/scripts/CVIM_Rpt_ExportCSVFile', 'execute' )

    DUPLICATE
    ===============================================================
    Issue with Executing OS commands from Stored Procedure
    ==============================================================

  • Issue with User decision handler in UWL

    Hi Friends,
      I am facing an issue with user decision hander in UWL. We have modified the XML file to show up the comments box to enter the rejection reason, this is working fine with two approval tasks already but the same thing is not working now with a new task id. In the back end(R/3) everything is the same for both the tasks, in the Portal side my portal consultant says the same. But we were not able to figure out the issue. I even created a new task and tried to use implement the handler changes, but still it is not working. Please advice what could be the issue

    Hi,
    can you elaborate what the issue, what do you mean by not working. you are not getting the reason box, or it's giving error,something like that.
    Hope we'll be more clear then about your requirement.
    venu

  • Is there an issue with streaming videos direct from itunes? I

    Is there an issue with streaming videos direct from itunes? I have good wifi but films just buffer , doesn't happen on flixster on netflix , wonder if there is any tweak to watch a film uninterrupted , because it is very frustrating? Thanks

    Apple appears to be having trouble with the iTunes Store servers right now.
    (81070)

  • How to retrieve input data from a HTML form in the UTF-8 cha

    I encountered the following problem with a JWeb Application:
    I tried to write a JWeb-Application for OAS 4.0, that retrieves
    input data from a HTML form and writes it into an Oracle
    database.
    All processing should be done in the UTF-8 character set.
    The problem is, that the form data retrieved by getURLParameter
    are always encoded in a non-unicode character set and I found no
    way to change this.
    Can anybody tell me what I should do to get the form data in the
    UTF-8 character set?
    null

    Hi
    Try set in the JWEB application's Java environment such
    SYSTEM_PROPERTY: file.encoding=UTF8.
    Andrew
    Thomas Gertkemper (guest) wrote:
    : I encountered the following problem with a JWeb Application:
    : I tried to write a JWeb-Application for OAS 4.0, that
    retrieves
    : input data from a HTML form and writes it into an Oracle
    : database.
    : All processing should be done in the UTF-8 character set.
    : The problem is, that the form data retrieved by getURLParameter
    : are always encoded in a non-unicode character set and I found
    no
    : way to change this.
    : Can anybody tell me what I should do to get the form data in
    the
    : UTF-8 character set?
    null

  • Calling report from a form with user input parameters

    Hello,
    I am new to Oracle reports. I have an application coded in 6i. I am currently running the application in Oracle Forms Builder 9i. There are also few reports which are called from the forms. Since the application was developed in 6i, the report was called using Run_Product. The forms pass a set of user parameters to the report using the parameter list pl_id. The syntax used was Run_Product(REPORTS, 'D:\Report\sales.rdf', SYNCHRONOUS, RUNTIME,FILESYSTEM, pl_id, NULL);
    I learnt that the Run_product doesnt work in 9i and we need to use run_report_object. I have changed the code to use run_report_object and using web.show_document () i am able to run the report from the form. There are 2 parameters that need to be passed from forms to reports. The parameters are from_date and to_date which the user will be prompted to enter on running the form. In the report, the initial values for these parametes are defined. So, the report runs fine for the initial value always. But when i try to change the user inputs for the form_date and to_date, the report output doesnt seem to take the new values, instead the old report with the initial values(defined in the report) runs again.
    Can someone give me the code to pass the user defined parameters to the report from the forms? I have defined a report object in the forms node as REPTEST and defined a parameter list pl_id and added form_date and to_date to pl_id and used the following coding:
    vrepid := FIND_REPORT_OBJECT ('REPTEST');
    vrep := RUN_REPORT_OBJECT (vrepid,pl_id);
    But this doesnt work.
    Also, Should the parameters defined in the forms and reports have the same name?

    Thanks for the quick response Denis.
    I had referred to the document link before and tried using the RUN_REPORT_OBJECT_PROC procedure and ENCODE functions as given in the doc and added the following SET_REPORT_OBJECT_PROPERTY in the RUN_REPORT_OBJECT_PROC :
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,' FROM_DATE='||:BLK_INPUT.FROM_DATE||' TO_DATE='||:BLK_INPUT.TO_DATE||' paramform=no');
    But this also dint work. Please help me understand what difference does setting paramform=no OR paramform=yes make?
    In the report, i have defined the user parameters as FROM_DATE and TO_DATE respectively so that they match the form datablock BLK_INPUT items FROM_DATE and TO_DATE.
    My WHEN_BUTTON_PRESSED trigger is as below:
    DECLARE
    report_id report_object;
    vrep VARCHAR2 (100);
    v_show_document VARCHAR2 (2000) := '/reports/rwservlet?';
    v_connect VARCHAR2 (30) := '&userid=scott/tiger@oracle';
    v_report_server VARCHAR2 (30) := 'repserver90';
    BEGIN
    report_id:= find_report_object('REPTEST');
    -- Call the generic PL/SQL procedure to run the Reports
    RUN_REPORT_OBJECT_PROC( report_id,'repserver90','PDF',CACHE,'D:\Report\sales.rdf','paramform=no','/reports/rwservlet');
    END;
    ... and the SET_REPORT_OBJECT_PROPERTY code in the RUN_REPORT_OBJECT_PROC procedure is as:
    PROCEDURE RUN_REPORT_OBJECT_PROC(
    report_id REPORT_OBJECT,
    report_server_name VARCHAR2,
    report_format VARCHAR2,
    report_destype_name NUMBER,
    report_file_name VARCHAR2,
    report_otherparam VARCHAR2,
    reports_servlet VARCHAR2) IS
    report_message VARCHAR2(100) :='';
    rep_status VARCHAR2(100) :='';
    vjob_id VARCHAR2(4000) :='';
    hidden_action VARCHAR2(2000) :='';
    v_report_other VARCHAR2(4000) :='';
    i number (5);
    c char;
    c_old char;
    c_new char;
    BEGIN
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,report_file_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,report_server_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,report_destype_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,report_format);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,' FROM_DATE='||:BLK_INPUT.FROM_DATE||' TO_DATE='||:BLK_INPUT.TO_DATE||' paramform=no');
    hidden_action := hidden_action ||'&report='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME);
    hidden_action := hidden_action||'&destype='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE);
    hidden_action := hidden_action||'&desformat='||GET_REPORT_OBJECT_PROPERTY (report_id,REPORT_DESFORMAT);
    hidden_action := hidden_action ||'&userid='||get_application_property(username)||'/'||get_application_property(password)||'@'||get_application_property(connect_string);
    c_old :='@';
    FOR i IN 1..LENGTH(report_otherparam) LOOP
    c_new:= substr(report_otherparam,i,1);
    IF (c_new =' ') THEN
    c:='&';
    ELSE
    c:= c_new;
    END IF;
    -- eliminate multiple blanks
    IF (c_old =' ' and c_new = ' ') THEN
    null;
    ELSE
    v_report_other := v_report_other||c;
    END IF;
    c_old := c_new;
    END LOOP;
    hidden_action := hidden_action ||'&'|| v_report_other;
    hidden_action := reports_servlet||'?_hidden_server='||report_server_name|| encode(hidden_action);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,'pfaction='||hidden_action||' '||report_otherparam);
    -- run Reports
    report_message := run_report_object(report_id);
    rep_status := report_object_status(report_message);
    IF rep_status='FINISHED' THEN
    vjob_id :=substr(report_message,length(report_server_name)+2,length(report_message));
    message('job id is'||vjob_id);pause;
    WEB.SHOW_DOCUMENT(reports_servlet||'/getjobid'||vjob_id||'?server='||report_server_name,' _blank');
    ELSE
    --handle errors
    null;
    END IF;
    In the code - " hidden_action := hidden_action ||'&'|| v_report_other; " in the RUN_REPORT_OBJECT_PROC procedure above, how do i make sure that the v_report_other variable reflects the user input parameters FROM_DATE and TO_DATE ??? v_report_other is initialised as v_report_other VARCHAR2(4000) :=''; in the procedure. Will ensuring that the v_report_other contains the user input parameters FROM_DATE and TO_DATE ensure that my report will run fine for the input parameters?
    Thanks in advance.
    Edited by: user10713842 on Apr 7, 2009 6:05 AM

  • Wss3 Issues with user check in files from within excel or word 2010

    I have got a user reporting that he is experiencing (and it is getting more and more often) that when a file is checked out in excel or word, he then edit it, followed by clicking check in on the File tab within either excel or word. He then gets error see
    image below.
    Just wonder if anyone has seen this before? and where do I start...?
    i have checked the site collection is about 12 GB in size, there are quite a few subsites in the area where this user is working, there are about 150 subsites, 3 levels... our wss3 version is 12.0.0.4621

    Yesterday I just had another user report the similar issue with with office complaining that the file was not checked out therefor upload (check-in) was failed.
    Please see the version and build number of MS Office
    Forgot to say, we are all on the same release and updates for MS Office as well as IE.

  • Issues with signal input adaptive filtering, it won't filter the added noise from the input waveform

    Hello,
    I have an issue with my adaptive noise cancellation program. Essentially I want to input a custom wav add noise to it and then filter the noise away in order to gain the custom wav again.
    While doing so I want to read the learning curve and read the adaptive coefficients. Unfortunately I have an issue when it comes to the filtering of the custom wav+noise. It won't filter the signal at all.
    It would be helpful if someone could have a look at it and possibly help me out.
    Thanks!
    Attachments:
    Testing.vi ‏59 KB

    Hey Jan,
    Thanks for the reply. I am currently using the Adaptive Filter Toolkit in order to obtain those VIs. The VIs which are in use are the LMS Adaptive Filter ones. 
    I figured there might be an error with the input of the array. This VI requires a DBL Array but it seems like it can not process it. 
    The "Get Wavefirn Components" works better now but I still have an issue with a time. I put a 9s wav file in but it only computes it in a very short time and I can not play the file while it is computing.
    I added the modified program to the attachments. 
    This program is ought to read a waveform file add noise to it and then use an adaptive filter in order to get the orginal waveform back again and if possible either store or play the final waveform. 
    Thanks for your help.
    Attachments:
    Testing.vi ‏62 KB

  • Issue with opening pdf file from web browser

    I have Acrobat Pro ver 6 and Adobe Reader 9.1 on a computer.  when my user tries to open up a pdf from the web he is getting the following error message:
    "The Adobe Acrobat/Reader that is running can not be used to view PDF files in a WEb Browser.  Adbe Acrobat/Reader version 8 or 9 is required.  Please exit and try again."
    What also happens is that Acrobat Pro ver 6 opens up and nothing is there.
    I am not sure why he is getting that message since Reader 9.1 is installed.
    Can any one shed some light on this for me.
    This user needs to have Acrobat and Reader on his system.  I understand that there are issues with having both.
    Also he has it set up so that any PDF is opening using the Reader 9.1.
    Thanks,

    Your PC's default reader configuration for embedded PDFs has become confused, due to multiple Adobe PDF document solutions installed on one PC.
    Solution 1:
    Go to Start > Run
    Type regedit and click OK.
    Browse to the following key: HKEY_CLASSES_ROOT\Software\Adobe\Acrobat\Exe
    Make sure that the correct Default data value is set for the path where Adobe Reader or Acrobat are installed.
    The default installation values are:
    "C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe"
    or
    "C:\Program Files\adobe\acrobat 6.0\acrobat\Acrobat.exe" (not sure about this path.  Check on your PC to be sure)
    depending on whether Adobe Reader or Adobe Acrobat is installed.
    Solution 2:
    Configure the browser to use Acrobat or Adobe Reader as a helper application.
    If you are using Firefox to browse the web, you can change this setting in Firefox by going to:
    Tools > Options
    Click on the "Applications" Tab.
    The first item in the list should be "Adobe Acrobat Document".  Under the Action list, click the drop down arrow and select the application you want to read PDFs within the web browser.  Click OK, and you should be done.
    If you're using Internet Explorer to view PDFs, try the below steps.
    After you configure Acrobat or Adobe Reader as a helper application, the browser starts the helper application in a separate window and displays PDF files within that window. Acrobat and Adobe Reader both include a preference that lets you specify Acrobat or Adobe Reader as the helper application.
    To configure Acrobat or Adobe Reader as a helper application:
    Start Acrobat or Adobe Reader.
    Choose Edit > Preferences.
    Select Internet on the left.
    Deselect Display PDF In Browser Using [Acrobat application], and then click OK.
    Quit Acrobat or Adobe Reader.
    The next time you select a link to a PDF file in the browser, a dialog box asks what you would like to do with the file. If you select Open It, the browser opens the PDF file in Acrobat or Adobe Reader (the helper application); if you select Save It To Disk, the browser saves the PDF file to your hard drive.

  • Issue with showing input forms for update SQL statement

    Hi guys - I'm currently doing a college project and I'm not overly experienced in the area of Java/JSP but I'm having an issue with a project. I have a JSP project inserting, viewing and deleting rows from a database but having an issue getting the update/modify function working in my project.
    If I hardcode values into my variables and launch the project it updates fine, but I believe theres an issue with how I'm calling the existing rows. I wish for the user to be able to view the rows from the database and modify as they wish. Once they submit the modifications, I want the row to be updated. Can anyone see where the problem might exist in my code below? I hope it's something small, but I'm not able to fix it at the moment and would apreciate anyone's help! :)
    The problem I'm facing at the moment is the input boxes for displaying the current rows from the database are not even showing up..
    ModifyNode.jsp:
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <%@page import="suaspackage.NodeManager" %>
    <jsp:useBean id="AddNode" scope="session" class="suaspackage.NodeManager"/>
    <%@ page language="java" %>
    <%@ page import="java.sql.*" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Suas</title>
        </head>
        <body
        <%! // Class level declarations
            Connection dbCon; // interface type in java SQL
            ResultSet rs; // interface type in java SQL
            String serverName = "localhost";
            String nodeID;
            String valowneremail;
            String valownersms;
            boolean bFirstTime;
            %>
            <%
            bFirstTime = true;
            if(request !=null){
                if(request.getParameter("submit") != null){
                    nodeID = "6";
                    valowneremail = request.getParameter("OwnerEmail");
                    valownersms = request.getParameter("OwnerSms");
                    bFirstTime = false;
                    AddNode.update(nodeID, valowneremail, valownersms);
            %>
            %>
        <%
            try{
            Class.forName("com.mysql.jdbc.Driver"); // SQLServer specifics 1
            dbCon = DriverManager.getConnection( // SQLServer specifics 2
                    "jdbc:mysql://" + serverName + ":3306" + "/suasdb", "root", "9631");
            Statement stmt;
            String sqlString = "select nodeid, node, owneremail, ownersms from nodemanager";
            stmt = dbCon.createStatement();
            rs = stmt.executeQuery(sqlString);
            } catch (ClassNotFoundException e){
                out.write("<B><CENTER><P>");
                out.write("Error loading class for Suas database connection: </P><P>");
                out.write(e.toString());
                out.write("</B></CENTER></P>");
                } catch (SQLException e){
                    out.write("<B><CENTER><P>");
                    out.write("Error accessing Suas database connection: </P><P>");
                    out.write("</B></CENTER></P>");
            if(rs!=null){
        %>
    <jsp:include page="includeheader.jsp" />
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="images/pagemarker_nodemanager.jpg" alt="Node manager" width="176" height="55"></td>
        </tr>
      </table>
             <jsp:include page="includenodemenu.jsp" />
    <TABLE WIDTH="75% BORDER="0" CELLPADDING="5" ALIGN="CENTER">
    <TR BGCOLOR="#9ddc4f">    </TR>
    <br>
    <TR BGCOLOR="#9ddc4f">
      <TH>Node ID</TH>
      <TH>Node</TH>
      <TH>Owner E-Mail Address</TH>
      <TH>Owner SMS Number</TH>
      <TH></TH>
    </TR>
             <%  } else {
                %>
    <% while (rs.next()){
        %>
    <FORM>
    <TR BGCOLOR="#d7eabf">
        <TD><%=rs.getString("nodeid")%></TD>
        <TD><%=rs.getString("node")%></TD>
        <TD><INPUT size="20" type="text" name="OwnerEmail" value="<%=rs.getString("owneremail")%>"</TD>
        <TD><INPUT size="20" type="text" name="OwnerSms" value="<%=rs.getString("ownersms")%>"</TD>
        <TD><INPUT type="submit" name="submit" value="Save"></TD>
    </TR>
    <% }
        %>
        </body>
    </html>
    {code}
    The relevant part of my NodeManger package:
    {code}
        public void update(String updateNodeId, String valEmail, String valSMS) throws ClassNotFoundException, SQLException{
            try{
                String updateSQL;
                String nodeid = updateNodeId;
                String updateowneremail = valEmail;
                String updateownersms = valSMS;
                Connection dbCon;
                Statement stmt;
                ResultSet rs;
                String serverName = "localhost";
                Class.forName("com.mysql.jdbc.Driver"); // SQLServer specifics 1
                dbCon = DriverManager.getConnection( // SQLServer specifics 2
                 "jdbc:mysql://" + serverName + ":3306" + "/suasdb", "root", "9631");
                updateSQL = "update nodemanager SET owneremail='" + updateowneremail + "', ownersms='" + updateownersms + "' WHERE nodeid='" + nodeid + "'";
                stmt = dbCon.createStatement();
                stmt.execute(updateSQL);
            } catch (ClassNotFoundException e){
                throw(e);
            } catch (SQLException e){
                throw(e);
        }{code}
    Edited by: daveomcgee on Apr 9, 2009 8:03 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I support what ThomYork suggests. Learn how to properly separate database/business logic from your view logic. Learn how to use servlets and JSPs together. Read abourt DAO classes. Learn how to build a view in JSPs using taglibs (JSTL to begin with).
    You might think it is too much work, but if you learn this stuff the wrong way now, it is going to be that much harder converting to the clean, readable, reusable and maintainable way later on.

  • Dynamic Link (Adobe Premiere Pro to Encore) issues with burning a DVD from the project file

    Hello,
    I am running Adobe Suite CS 5.1 on my Mac:
    2.8 GHz Quad Core
    6GB Memory
    I've been having issues with a few projects; using Dynamic Link, directly from my project in Premier, to send them to Encore:
    When attempting to burn a DVD, Encore will 'hang up' and not burn; I rarely burn to DVD, usually I'm always encoding for web, and just always use the 'default settings' in Encore.
    A few things to note:
    *In my project I'm using MOV files, from a Canon 7D, and MP4 files, from a Sony EX-1. 
    *I am working off of 3 separate hard drives; very large projects with over 5TBs of media files.
    *I noticed that after inserting a DVD, it caused one of my hard drives to eject; this happened once, as far as I know.
    *This only happens when I use Dynamic Link to send to Encore, via my Premiere Pro project file.
    *My Project settings are always: XDCam HD-1080p/24p
    Please help.
    Thanks

    So you must downrez at some point in the workflow. Some users have problems and/or think they get better quality out of direct PR/AME exports than using DL for this purpose.
    I would test the workflow by creating three short test sequences - one with a clip from one camera, a second from the other, and a third with both in a sequence using the same settings you are using in your edit. I would use the "drag a clip" to the new item method for making each of the first two sequences. By short I mean 30 seconds to 2 minutes with a mixture of still and action.
    Export using whatever method you pick of those recommended, but use CBR 8 instead of VBR etc. Bring the resulting files into Encore. Yes, look at the files exported on the computer, and look at Encore preview, etc, but also burn to a disk and watch on multiple TVs. There are lots of issues in best quality.

  • Powershell Issue with Variable and Equal Signs

    I should have been using $line.grade, but your syntax worked so thanks!

    I've been running a powershell script to create active directory accounts at our school from a csv file. I'm needing to have users placed in a specific OU based on what grade level they are in, which is a field in the csv file and I have passed into the description field in AD. To keep from writing a bunch of if statements, I thought I might could pass the description variable into my organizational unit path, but I'm having syntax issues.Here is the specific line I have issues with.Powershell'ou' = "OU=$line.description, OU=LESStudents,OU=LES,DC=school,DC=k12,DC=state,DC=us"I've tried the single quote, double quotes, escaping the equal sign and some other methods I've seen online, but haven't quite gotten it right. It just isn't recognizing OU=$line.description as a variable.
    Disclaimer - I'm not a programmer and most of this was built...
    This topic first appeared in the Spiceworks Community

  • Producer Consumer & User Events with user input windows

    Hello All,
    I am planning to build Labview code using the Producer Consumer & User events pattern, the application needs multiple user input windows for things like personal data, feature selection etc, there could be around 15 or 20 distincts screen/panels required.
    The main question from me is... Is there a best practive approach to navigating/loading from one window to another etc, and also providing a way to to retrun to the previous window.
    Also I may need need to be running some slow logging and control hardware in the background while navigating some of the screens, this seems like the producer consumer vi will be running in the background while the user input causes a load/display window event.
    A simple Producer Consumer multiple winjdoow example would be very welcome. Thanks.
    Regards Chris

    I will second Mike's suggestion to use a central VI with subpanel(s).  It is usually less confusing than multiple windows.  Typically, the selection/navigation mechanism is on the left of the main panel, global info (like help) on the right, and the subpanel(s) in the center.
    The advantage of subpanels/subVIs is that you can launch your subVIs and keep them active in the background, even though they are not being used.  This means they will keep their state information and load into the subpanel almost instantaneously the next time you need them.  For a short tutorial on subpanels, check out this link.  Scroll down to the fourth reply for working code.  The original code posted is broken.
    Communication between your VIs or loops is typically done with either queues or event structures.  State information in each should be shift registers in the respective VIs.  If you have the time, I would highly recommend you learn how to use LabVIEW classes.  The command pattern is tailor made for this kind of application.
    Finally, avoid global data if you can.  Global data is anything that you can get to from anywhere (globals, functional globals, etc.).  Use of these can speed your development, but can also lead to sloppy design which will cause you major problems later.  If you really need globally available data, use a data value reference.  It is unnamed and requires a reference, which tends to enforce better programming practice.  Yes, there are instances where you truly need globally available, named data, but they are fairly rare.  You should only use them if you are experienced and really know what you are doing.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

Maybe you are looking for

  • MS Office Pro 2013 Deployment through SCCM 2012 R2

    Hi Friends, I have deployed MS Office Pro 2013 through SCCM 2012. But from Windows 7 Client Machines It's not Installing. Noticed following error in Software Center. I'm testing two deployments before bring into production. Test Machine 1 :  Purpose

  • Wifi problems on my MacBook Pro

    I recently bought a MacBook Pro and I've noticed that there seems to be a problem with the web browser/intermet connection... I turn on my Mac and the internet works fine, it's fast and loads everything but then the web pages won't load and the blur

  • How do i connect a Mac Pro desktop to apple tv

    How do i connect a Mac Pro desktop to apple tv

  • Constructor has been deprecated

    Hi , I'm getting the following warning...because of this piece of code Date dtExpiryDate = new Date(strExpiryDate); Warning(149,33): constructor Date(java.lang.String) in class java.util.Date has been deprecated Can some one help me how to resolve th

  • Refund for wrong diagnosis?

    My macbook pro had no issue when i went to bed but it went blank at the login screen when i tired to switch it on in the morning. So I took it to the authorized apple service center in New Delhi, India and they charged me Rs 2500 (approximately 56 US