Parameters DataType Problem

if i create a parameter of type Date in crystal reports and the then try to select records based on the value of this parameter, i am simply not able to do this because when i go to select record section of report then i select the field of sql table, select comparison operator ,when i try to select the parameter created above, its not there in the list because parameter is of type Date and the sql field is of type smalldatetime.
i want the report's parameter to be date only but there is no datatype of Date in sql server.
Solution?

If the date parameter isn't showing up in the list of available options in the Selection Expert... Try adding it to the formula manually:
{TableName.SmallDateField} > {?DateParameter}
HTH,
Jason

Similar Messages

  • BAPI parameters mismatch problem

    Hi All,
    I have been assigned to object wherein i need to insert bapi BAPI_GOODSMVT_CREATE in function module ZQM06_FM_TASK_GOODS_MOVEMENT. The problem is that i need to fill the structure that i can pass it to BAPI but the import parameters of FM ZQM06_FM_TASK_GOODS_MOVEMENT contain  structure that is mismatching. I mean to say that the FM is importing VIQMEL data and from that data i need to fill up structure that would be paased to Bapi BAPI_GOODSMVT_CREATE .
    As of now i am not able to map data into structure from VIQMEL so is there any FM or BAPI available for which i can pass VIQMEL data and it returnns me sales order data which in turn i can pass it to the specified bapi BAPI_GOODSMVT_CREATE ?
    Your response is highly appreciable.
    Thanks & Regards,
    Parag

    Hi Parag,
    There is no any such function module to pass the data from Bapi to normal function modules.
    If the structure of the Function modules are different, only way is finding the matching fields of the both function modules.
    Check what all are the matching fields and populate internally after calling the Bapi BAPI_GOODSMVT_CREATE fm. within the function module code itself. Then commit your work. It will definitely work.
    But increases the program overhead for you populating and checking all the fields. It is the way to solve this issue.
    Because BAPI structures some times will not match with standard structures.
    First you try to populate the Item data, with structure BAPI2017_GM_ITEM_CREATE. if this is done correctly you can handle the rest.
    Regards,
    Santosh Kumar M.

  • Datatype problem in project euler

    Today I had nothing to do, so I participated in Project Euler http://projecteuler.net with Labview. I'm at question 10 now. The question itself isn't much of a challenge, but the problem I'm having is that the datatypes are to small for the value I would like to put in there. The value first goes up, then changes from + to - and then goes back to zero. This all happens while I'm just adding up to the value.
    I guess there is a sollution to this problem but I don't seem to find it. Is there someone who can and will help me please?

    Well, the link you gave said problem 10 was "Find the sum of all the primes below two million", a little different problem than 2^1000.
    In order represent 2^1000 at full resolution, you would need a 1000 bit number!  Of course a U64 won't be able to hold it.  A double will hold it and it comes to about 1.07...e301, so 301 decimal digits.  But a double won't store the full resolution.
    In order to do what you want, you will have to set up your own math functions using 125+ bytes.  You will have to do the multiplication and do all of your own carries.  That why they made it a problem, to challenge you to figure out the algorhitm to do it.  Otherwise going 2^1000 in any programming language is a trivial exercise.

  • Datatype Problems between Java and COBOL

    I am calling a COBOL stored procedure from a Java Servlet. The COBOL stored procedure needs compressed numeric values and Java sends it Integer values. I'm getting an error saying my parameters don't match up. I'm wondering if it's because COBOL needs a compressed value. Has anyone else dealt with this or a similar problem? Please HELP!!!!
    Thanks so much.

    I need to add more information...
    I am using JDBC. I am passing in 4 parameters from my Java code: 2 shorts and 2 ints. In the COBOL parameter definition they are 2 SMALLINTs and 2 INTEGERs. In the COBOL stored proc the 2 SMALLINTs are S9(04) comp and the 2 INTEGERs are S9(09) Usage comp. Example values that I am passing in are:
    (short) 2000
    (short) 22
    (int) 1749
    (int) 164
    The stored procedure is on a DB2 database. Hopefully this gives you a little more information to go on...
    Thanks.

  • Problem of LOV, Datatype Problem

    hi experts
    When i applied an LOV on Supplier ID field which is foreign key, i am getting this error please see the Snapshot of form.
    http://1.bp.blogspot.com/-JsNiNnjdoyg/T5KGcPpzlCI/AAAAAAAAAOk/a51eItBrDWM/s1600/Capture-1.PNG
    Datatype of supplierID in Child Table is Integer while in parent table it is type of DBSequence. I have also apply sequence in database.
    One Very Important thing is that i am using lot of LOVs in My project but i am not getting this type of error in any LOV. I am using same techniques in other LOVs. I have not any
    problem in database.
    Please help me to solve this problem.
    Thanks.........Regards
    Muhammad Nasir

    In Record group of second LOV(EMPLOYEES) insert where-clause like:
    where emp.DEPTNO = :DEPTNO_you get_from_first_lov
    P.S. Please, do better if you write in lowercase, It would be more readable

  • Datetime Datatype problem in Forms

    Hi,
    I have just faced a problem some moment ago in Oracle Forms . Firstly , informed you that i am using Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Ok, i have a field named ENTRY_TIMESTAMP. I kept 'Datetime' datatype there in forms level. Now if i change anywhere on that particular form, ENTRY_TIMESTAMP datatype changed from 'Datetime' to 'Date'. You can also check it by making a form of this scenario.
    I don't know , is it a bug or any others code/process is responsible for this kind of changing ?
    Any idea ?????????????

    shuvro wrote:
    Hi,
    I have just faced a problem some moment ago in Oracle Forms . Firstly , informed you that i am using Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Ok, i have a field named ENTRY_TIMESTAMP. I kept 'Datetime' datatype there in forms level. Now if i change anywhere on that particular form, ENTRY_TIMESTAMP datatype changed from 'Datetime' to 'Date'. You can also check it by making a form of this scenario.
    I don't know , is it a bug or any others code/process is responsible for this kind of changing ?
    Exactly i don't know, is it bug ? but thinking so as same case happened for form version 6i
    But it not happened for form version *10.1.2.3* To upgrade you need patchset from support.oracle.com / metalink.
    If your have valid support contact then you can able to download.
    Hope this helps
    Hamid
    If someone's response is helpful or correct, please mark it accordingly.*

  • Oracle Spatial datatype problems - HELP!!

    Can anyone help with this problem. I am using Pro*C/C++ to create a DLL which I am then
    linking to another C based application. I am attempting to use Pro*C/C++ to read/write
    Oracle Spatial Objects. I have no problem writing Pro*C/C++ code or accessing the
    functions in the DLL. My problem is returning values from the DLL functions to my
    application. So far the only values I seem able to return are character strings.
    Below are two versions of the same function. One that returns a char string and a second
    that returns nothing. I would like the second function to work and to return an integer
    value for "g_type". Any ideas??? By the way "g_type" is the return value in question. I am
    using Oracle Pro*C/C++ 8.1.5 and the V8 Oracle Call Interface for the datatype conversion.
    Header files for the Object types have been generated by the Object Type Translator.
    THIS FUNCTION WORKS AS EXPECTED. THE PARAMETER G_TYPE RETURNS THE ANTICIPATED STRING VALUE
    int Read_Geometry
    int gid,
    char *g_type,
    char *errMsg
    char err_msg[128];
    sword retcode;
    int tester;
    size_t buf_len, msg_len;
    SDO_GEOMETRY geom = (SDO_GEOMETRY )0;
    SDO_GEOMETRY_ind geom_ind = (SDO_GEOMETRY_ind )0;
    exec sql at db_name allocate :geom:geom_ind;
    exec sql at db_name select geometry into :geom:geom_ind from test81 where gid=:gid;
    if (SQLCODE !=0)
    exec sql whenever sqlerror continue;
    buf_len = sizeof (err_msg);
    sqlglm(err_msg, &buf_len, &msg_len);
    strcpy(errMsg,err_msg);
    return ERROR;
    else
    retcode = OCINumberToInt(err,&geom->sdo_gtype, sizeof(g_type), OCI_NUMBER_SIGNED,&tester);
    if (retcode == OCI_ERROR)
    sprintf(errMsg,"Convert failed");
    return ERROR;
    else
    sprintf(g_type,"%d", tester);
    sprintf(errMsg,"gType=%s",g_type);
    return SUCCESS;
    return SUCCESS;
    THIS FUNCTION DOES NOT WORK. THE FUNCTION EXECUTES BUT THE PARAMETER G_TYPE RETURNS NOTHING?????????
    int Read_Geometry
    int gid,
    int g_type,
    char *errMsg
    char err_msg[128];
    sword retcode;
    size_t buf_len, msg_len;
    SDO_GEOMETRY geom = (SDO_GEOMETRY )0;
    SDO_GEOMETRY_ind geom_ind = (SDO_GEOMETRY_ind )0;
    exec sql at db_name allocate :geom:geom_ind;
    exec sql at db_name select geometry into :geom:geom_ind from test81 where gid=:gid;
    if (SQLCODE !=0)
    exec sql whenever sqlerror continue;
    buf_len = sizeof (err_msg);
    sqlglm(err_msg, &buf_len, &msg_len);
    strcpy(errMsg,err_msg);
    return ERROR;
    else
    retcode = OCINumberToInt(err,&geom->sdo_gtype, sizeof(g_type), OCI_NUMBER_SIGNED,&g_type);
    if (retcode == OCI_ERROR)
    sprintf(errMsg,"Convert failed");
    return ERROR;
    else
    return SUCCESS;
    return SUCCESS;
    Header file is as follows
    struct SDO_GEOMETRY
    OCINumber sdo_gtype;
    OCINumber sdo_srid;
    struct SDO_POINT_TYPE sdo_point;
    SDO_ELEM_INFO_ARRAY * sdo_elem_info;
    SDO_ORDINATE_ARRAY * sdo_ordinates;
    typedef struct SDO_GEOMETRY SDO_GEOMETRY;
    struct SDO_GEOMETRY_ind
    OCIInd _atomic;
    OCIInd sdo_gtype;
    OCIInd sdo_srid;
    struct SDO_POINT_TYPE_ind sdo_point;
    OCIInd sdo_elem_info;
    OCIInd sdo_ordinates;
    typedef struct SDO_GEOMETRY_ind SDO_GEOMETRY_ind;

    Hi,
    From a quick look I can't see anything wrong. You might want to compare this with the example in $ORACLE_HOME/md/demo/examples.
    Also, note that in 9i there will probably be an occi (C++ OCI) available, should this be useful to you.

  • WP8 c++/Direct3D Launch Parameters (ProtocolActivatedEventArgs problem)

    Hi,
    I need another help with WP8 app developing. I need to associate native c++/Direct3D app with file extension. It should not be problem - what I need is to read launch parameters to get file path. Problem is that ProtocolActivatedEventArgs
    is not working, it is not contain any parameters. I even found some blog post and some guy has information that there is a mistake in MSDN documentation, but he don't have solution for this problem. (http://sanjeev.dwivedi.net/?p=369)
    Can you please help me? How to solve that - open my app by clicking on *.gpx file.
    Thanks

    Hi Franklin,
    thanks for your answer, but unfortunately it doesn't help - since I need that on C++/Direct3D project. As you can see in NavigationContext manual
    there is no support for C++, especially "standard" C++ without component extension (C++/CX).
    But I finally figure it out, with one small disadvantage - it needs to be targeted to WP8.1 universal app (for the future release of Windows 10 is actually an advantage :) ).
    So here is the solution demo:
    hr = m_view->add_Activated(Microsoft::WRL::Callback<ActivatedHandler>(
    this, &Foo::OnActivated).Get(),
    &m_activated_token);
    HRESULT Foo::OnActivated(ICoreApplicationView* , IActivatedEventArgs* args)
    // Here we can check if app is allready runnig (args->get_PreviousExecutionState) ...
    ActivationKind kind;
    if (!args || FAILED(args->get_Kind(&kind)))
    return false;
    ComPtr<IActivatedEventArgs> activatedArgs(args);
    switch (kind)
    case ActivationKind_Protocol:
    ComPtr<IProtocolActivatedEventArgs> protocolArgs;
    if (FAILED(activatedArgs.As(&protocolArgs)))
    break;
    ComPtr<ABI::Windows::Foundation::IUriRuntimeClass> startUri;
    if (FAILED(protocolArgs->get_Uri(&startUri)))
    break;
    HSTRING uriHstring;
    unsigned int length;
    startUri->get_AbsoluteUri(&uriHstring);
    // lets handle uriHstring in our way...
    break;
    case ActivationKind_File:
    ComPtr<IFileActivatedEventArgs> fileActivatedArgs;
    if (FAILED(activatedArgs.As(&fileActivatedArgs)))
    break;
    ComPtr<ABI::Windows::Foundation::Collections::IVectorView<ABI::Windows::Storage::IStorageItem*>> list;
    HRESULT hr = fileActivatedArgs->get_Files(list.GetAddressOf());
    ComPtr<ABI::Windows::Storage::IStorageItem> item;
    if (FAILED(list->GetAt(0, item.GetAddressOf())))
    break;
    ComPtr<ABI::Windows::Storage::IStorageFile> file;
    if (FAILED(item.As(&file)))
    break;
    // lets handle file in our way...
    break;
    return hr;

  • Strange Datatype Problem

    Can anyone explain why I can't get these values to insert into my tables using a created data page in one of my APEX applications.  The error I get is "ORA-01481: invalid number format model".  I am able to insert these values manually by inserting a row in the object browser.  This happens when importing a CSV or a tab separated list.  I'm using APEX 4.1
    31581500+1+1
    1704791
    1
    345480.55
    345480.55
    260523.04
    260523.04
    31865742+1+1
    1822774
    2
    64849.39
    129698.78
    55424.11
    110848.22
    31865796+1+1
    1822777
    2
    119627.78
    239255.56
    103052.4
    206104.8
    The columns are Unit_ID,Work_ID,quantity,cost1,cost2,cost3,cost4
    Unit_ID and Work_ID are both Varchar2(30) and the quantity and costs are all number.  Strange thing is that I have similar values that pass and are inserted no problem within the same csv.  A few examples of values that do work are:
    11703473+1+2
    1982416
    1
    15551.87
    15545.87
    21296.56
    11296.56
    25503474+1+3
    1973321
    1
    25552.87
    25235.87
    31392.56
    22216.56
    51403445+5+1
    1963732
    1
    35553.87
    35225.87
    41216.56
    21291.56
    42703476+1+4
    1954543
    1
    35554.87
    45515.87
    21292.56
    11236.56
    Looking at it it seems the ones over 100k are failing but as far as I know I have no such restriction.  My precision and scales in the object browser are blank.
    Thanks,
    -Steve

    this was my format.
    <textarea name="problem" rows=8 cols=34>
    <%=sEntries[6]%>
    </textarea>
    you where right...thx
    i changed code to
    <textarea name="problem" rows=8 cols=34>
    <%=sEntries[6]%></textarea>(in 1 row)
    now it works !
    nice greetings

  • Inconsistent datatypes problem (ORA-00932)

    Hi all,
    Given the following two tables , located in two different schemas :
    CREATE TABLE schema1.national_desc
    (     ENT CHAR(18 CHAR),
         COD_MAJ CHAR(1 CHAR),
         SID_DESC_COD_ADD NUMBER(8,0),
         ID_LANG CHAR(2 CHAR) DEFAULT 'FR',
         SID_COD_ADD NUMBER(8,0),
         ID_TYP_COD_ADD CHAR(1 CHAR),
         COD_ADD CHAR(3 CHAR),
         L_DESC NCLOB,
         DAT_MAJ DATE DEFAULT SYSDATE,
         DAT_MAD DATE,
         LL_DESC NCLOB,
         CONSTRAINT pk_national_desc PRIMARY KEY (SID_DESC_COD_ADD, ID_LANG)
    CREATE TABLE schema2.european_desc
    (     ENT CHAR(18 CHAR),
         COD_MAJ CHAR(1 CHAR),
         SID_DESC_COD_ADD NUMBER(8,0),
         ID_LANG CHAR(2 CHAR),
         SID_COD_ADD NUMBER(8,0),
         ID_TYP_COD_ADD CHAR(1 CHAR),
         COD_ADD CHAR(3 CHAR),
         L_DESC NCLOB,
         CONSTRAINT pk_european_desc PRIMARY KEY (SID_DESC_COD_ADD, ID_LANG)
    )we try this query :
    SELECT
    '1' origine,
    sid_cod_add,
    l_desc desc_cod_add,
    TO_CHAR (dat_mad, 'dd/mm/yyyy') dat_mad,
    TO_CHAR (dat_maj, 'dd/mm/yyyy') dat_maj
    FROM
    N24510
    WHERE
    dat_maj > '01/01/2010'
    AND id_lang='FR'
    UNION
    SELECT
    '0',
    sid_cod_add,
    l_desc,
    NULL,
    NULL
    FROM
    F24510
    where
    id_lang='FR'and Oracle complains with this error : ORA-00932.
    We have tried to "cast" the L_DESC column with TO_CHAR but some column value exceeds 4000 chars.
    Casting with TO_CLOB give the same first error.
    Any idea ?
    Stephan
    Oracle 10Gr2 - 10.2.0.3.0
    Linux 64bits

    Hi ,
    Thanks for your reply. We have finally find the problem :)
    Instead of UNION, we perform an UNION ALL. With UNION Oracle had to check unicity
    between rows containing NCLOB columns...
    Hopefully, in our case UNION ALL does the trick !
    Stephan

  • Table(cast  - invalid datatype problem

    Hi All,
    Basic scenario:
    PACKAGE
    create or replace
    PACKAGE C2_PAYMENT_DOC IS
    TYPE bin_array IS TABLE OF NUMBER
    INDEX BY BINARY_INTEGER;
    FUNCTION test_fun(l_doc_id IN integer) RETURN bin_array;
    PACKAGE_BODY
    create or replace
    package body C2_PAYMENT_DOC as
    FUNCTION test_fun (l_doc_id IN integer) RETURN bin_array IS
    l_gross bin_array;
    begin
    c2_purchase_invoice.get_inv_gross_amount(l_doc_id, l_gross(1));
    return l_gross;
    end;
    END;
    QUERY
    select * from Table(Cast(c2_payment_doc.test_fun(1) As bin_array));
    Result of the query is ORA-00902: invalid datatype
    How can I make the select statement valid?
    Thanks in advance,
    Bartek

    You can not use local collection types in SQL. You must create type bin_array as SQL nested table type. Also, depending on version you might not need to cast:
    SQL> CREATE OR REPLACE
      2    TYPE bin_array
      3      AS TABLE OF NUMBER
      4  /
    Type created.
    SQL>  create or replace
      2   PACKAGE C2_PAYMENT_DOC IS
      3  FUNCTION test_fun(l_doc_id IN integer) RETURN bin_array;
      4  end;
      5  /
    Package created.
    SQL> create or replace
      2  package body C2_PAYMENT_DOC as
      3 
      4  FUNCTION test_fun (l_doc_id IN integer) RETURN bin_array IS
      5  l_gross bin_array := bin_array();
      6  begin
      7      l_gross.extend;
      8      l_gross(1) := l_doc_id;
      9  return l_gross;
    10  end;
    11  END;
    12  /
    Package body created.
    SQL> select * from Table(Cast(c2_payment_doc.test_fun(1) As bin_array));
    COLUMN_VALUE
               1
    SQL> select * from Table(c2_payment_doc.test_fun(1))
      2  /
    COLUMN_VALUE
               1
    SQL> SY.

  • Sybase ODBC driver - numeric or decimal datatype problem

    Hello!
    I have Sybase Adaptive Server Enterprise 15.0.2 and Oracle 10.2.0 ("show release" in SQL*plus prints 1002000100) on the same machine (OS = Windows XP, name = Workstation). I wanna load correct information from the table in Sybase via Oracle database link.
    Well, I've edited tnsnames.ora, listener.ora. Also I've created initmysybase.ora in hs\admin directory. And, of course, set up DSN (using Sybase ODBC driver) via odbcad32.exe - and named it "mysybase".
    Table ("test", user = guest) definition in Sybase is:
    column "id" - int, column "data_num" - numeric(10, 5), column "data_dec" - decimal(10, 5). And it's content is: (1, 1.12345, 5.54321). I've set up a database link.
    My problem is that whenever I do the SELECT statement (SELECT * FROM "guest.test"@mysybase) I get 0 (zero) for both data_num and data_dec columns.
    Status of investigation:
    The "describe" command in SQL*plus returns:
    id NOT NULL NUMBER(10)
    data_num NUMBER(10,5)
    data_dec NUMBER(10,5)
    UPDATE statement works perfectly.
    I've downloaded a trial version of ODBC drivers from www.datadirect.com and all works fine.
    So, I believe that maybe there are some bugs in ODBC driver from Sybase, or maybe I should configure smth.
    My initmysybase.ora:
    HS_FDS_CONNECT_INFO = mysybase
    # HS_FDS_TRACE_LEVEL = DEBUG
    HS_FDS_TRACE_LEVEL = ON
    HS_NLS_NUMERIC_CHARACTER = ",."
    HS_LANGUAGE = American
    tnsnames.ora:
    mysybase =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = WORKSTATION)(PORT = 1521))
    (CONNECT_DATA =
    (SID = mysybase)
    (HS = OK)
    listener.ora:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = WORKSTATION)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = mysybase)
    (SID_NAME = mysybase)
    (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
    (PROGRAM = hsodbc)
    So, maybe anybody know how to solve this problem?
    Thanks,
    Yury

    I've played with HS_LANGUAGE option but without success.
    Well, this is the export from the registry:
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\mysybase]
    "Driver"="C:\\sybase\\DataAccess\\ODBC\\dll\\sybdrvodb.dll"
    "dsprincipal"=""
    "secondaryport"=""
    "logintimeout"="10"
    "dsn"="mysybase"
    "restrictmaximumpacketsize"="0"
    "initializationstring"=""
    "database"=""
    "packetsize"=""
    "ignoreerrorsifrspending"="0"
    "dsservicename"=""
    "server"="WORKSTATION"
    "serverinitiatedtransactions"="1"
    "quotedidentifier"="0"
    "charset"="ServerDefault"
    "ansinull"="0"
    "encryptpassword"="0"
    "fetcharraysize"="25"
    "language"=""
    "buffercachesize"="20"
    "trustedfile"=""
    "port"="5000"
    "userid"="sa"
    "hasession"="0"
    "tightlycoupledtransaction"="0"
    "serverprincipal"=""
    "enableserverpacketsize"="1"
    "applicationname"=""
    "description"=""
    "dsurl"=""
    "userprincipal"=""
    "dynamicprepare"="0"
    "crc"="0"
    "secondaryserver"=""
    "textsize"=""
    "clienthostproc"=""
    "clienthostname"=""
    "codepagetype"="oem"

  • Problems accessing parameters, files - problems in general.

    I've been posting my problems to comp.lang.java.programmer but Google Groups is exceedingly slow to update and I've been stuck on this for nearly two whole days:
    I am developing what will be a series of web utilities for our company and our client's company. Unfortunately I am hampered by the fact that my Java is not that good having come from a C++ background.
    My current setup is Windows XP, JDK 1.3.1.07 (which is what our client is running), Tomcat 4.1 for testing on my local box.
    I've been middling around with small examples and decided to do something slightly more complex. What I am trying to do is access a file that is described in web.xml as a parameter. However when ever I run the program it is unable to find the file. All the documentation I have (web-based plus a Professional Java Server Programming J2EE Edition - way over my head) either skims across it/takes it as read it will be set up correctly/doesn't touch it at all.
    I thought I was trying to access the wrong directory so I mapped the file to the root of C and still can't access it - it always comes back as null. Also between attempts I restart the Tomcat server so it always loads in the web.xml file.
    This is my web.xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
      <display-name>Welcome to Tomcat</display-name>
      <description>
         Welcome to Tomcat
      </description>
      <servlet>
        <servlet-name>LogIn</servlet-name>
        <servlet-class>website.LogIn</servlet-class>
        <init-param>
          <param-name>passwordFile</param-name>
          <param-value>C:\\passwords.txt</param-value>
        </init-param>
      </servlet>
      <servlet-mapping>
        <servlet-name>LogIn</servlet-name>
        <url-pattern>/logged</url-pattern>
      </servlet-mapping>
    </web-app>And the Java:
    package website;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    *  Handles the login to the administrators section of the website
    public class LogIn extends HttpServlet
        private String passwordFile;
        /** Read the password file from the location specified
         *  by the passwordFile initialization parameter.
        public void init(ServletConfig config) throws ServletException
            super.init(config);
            passwordFile = config.getInitParameter("passwordFile");
            System.out.println(passwordFile);
            if (passwordFile == null)
                System.out.println("The \"passwordFile\" property must be set to a file name");
            try
            catch (Exception e)
                System.out.println("Error: Unable to read passwordFile.");
        public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
        public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    }It was suggested on comp.lang.java.programmer to check the path that the system was thinking I was searching which I did by inserting this code fragment:
         // initialise the servlet and load password(s)
    //     super.init(config);
    //     passwordFile = config.getInitParameter("passwordFile");
         // added code
         passwordFile = "passwords.txt";
         File f = new File( passwordFile );
         System.out.println( f.getAbsolutePath() );
         // added code.
            ...This lead me to learn that the directory being returned was:
    C:Program Files\Apache Group\Tomcat 4.1\passwordFile.txt
    Which is strange since I would of thought that the lowest directory
    that is visible to the class would of been ROOT (hence it's name).
    Does this mean if I copy the passwordFile.txt to the above directory
    it would work? Actually no. I still can't get the filename as a
    parameter from web.xml which is frustrating. If you could give me any
    pointers on what might be wrong then that would be cool.
    I thought I could move forward by accessing the file directly. But no: An addition of f.exists() to check that the file exists returns false. I've now got a copy of passwords.txt in every single directory from the classes directory all the way down to C:\ and it still doesn't work.
    I hope someone can help out here since this is very frustrating to be stuck on something so basic as file handling.
    Graham Reeds,
    http://omnieng.co.uk | [email protected]

    I can see how this is frustrating but it should be fixable. The last example you posted won't work because you have "passwords.txt" instead of "c:/passwords.txt".
    If you're still looking for a solution could you cut and paste the following code into your servlet code and then post the results?
    // Check that init param is read correctly
    String filename = config.getInitParameter("passwordfile");
    System.out.println("config param = " + filename);
    // try filenames
    String[] filenames = new String[] {"c:/passwords.txt", "c:\\passwords.txt", "passwords.txt"};
    for (int i=0; i < filenames.length; ++i) {           
       File file = new File(filenames);
    System.out.println("File " + filenames[i] + " - exists = " + file.exists());
    System.out.println("Abs path = " + file.getAbsolutePath());
    This is based on the file c:\passwords.txt existing - if I have the wrong filename, please adjust. Also, you may need to change <i> to [[i]i] in a couple of places.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

  • Jsp parameters - url problem

    hello,
    I have a problem with the maximum length of an url.
    I have to submit a parameter (which is a list of elements) from a jsp to a servlet. But, for IE, there's a maximum length of the url and it doesn't allow a such longer parameter (for netscape, it's ok).
    I would like to have a button on my jsp which open another jsp which use the parameter of the first jsp. I have thought to use javabeans but I don't know how to keep a same javabean in several JSPs...
    Can you give me some ideas please ?

    // JSP 1
    <form name=fastaForm action=/EHTDb_interface/servlet/EXHServlet>
    <input type=hidden name=clNames value=<%=clNames%>>
    <!-- clNames is a String of 1 to several hundreds of characters long-->
    </form>
    // SERVLET (/EHTDb_interface/servlet/EXHServlet)
    String clNames = (String) request.getParameter("clNames");
    String redirect = "/result/fasta.jsp";
    Fasta f = new Fasta (clNames);
    request.setAttribute("fasta", f.getFasta());
    RequestDispatcher dispatcher;
    dispatcher=getServletConfig().getServletContext().getRequestDispatcher(redirect);
    dispatcher.forward(request, response);
    //JSP 2
    <% HashMap hmFasta =(HashMap) request.getAttribute ("fasta"); %>

  • Bind on parameters performance problem

    For some reason when I select bind on parameters in toplink I get a major performance hit for certain queries. I've enabled the toplink performance profiler to log the sql queries.
    I wrote a little Java class that executes these queries using a statement and using a preparedstatement. The prepared statement is fast, so I'm thinking something in toplink is slowing it down. Does anyone have any ideas?
    With bind:
    Begin profile of{ReadAllQuery(model.RKTask)
    INFO [Log4JSessionLog.log()]: SELECT DISTINCT t1.ID, t1.ESTSTARTDATE, t1.HASMSGS, t1.HASRESOLVABLE, t1.PROGSTAT, t1.CSI, t1.ENTEREDBYID, t1.TASKCONSTRAINT, t1.PLANNEDCOMPLETIONDATE, t1.BILLINGRECORDID, t1.PARENTLAG, t1.HANDOFFDATE, t1.PLANNEDREVENUE, t1.INDENT, t1.LASTNOTEID, t1.ESTCOMPLETIONDATE, t1.DURTYPE, t1.MASTERTASKID, t1.WORKPERDAY, t1.CPI, t1.PLANNEDCOST, t1.GROUPID, t1.WORKINGDAYS, t1.MILESTONEID, t1.NUMOPENOPTASKS, t1.CATEGORYID, t1.ORIGINALDURATION, t1.HASNOTES, t1.HASEXPENSES, t1.TEMPLATETASKID, t1.ACTUALDURMINUTES, t1.ENTRYDATE, t1.ACTUALCOMPLETIONDATE, t1.ISCRITICAL, t1.ACTUALSTARTDATE, t1.PARENTID, t1.PERCENTCOMPLETE, t1.RESOURCESCOPE, t1.LASTUPDATEDATE, t1.PROJECTEDCOMPLETIONDATE, t1.CUSTOMERID, t1.ACTUALCOST, t1.APPROVALID, t1.ORIGINALWORKREQUIRED, t1.URL, t1.DURUNIT, t1.COMPLETIONPENDINGDATE, t1.PLANNEDSTARTDATE, t1.DURMINUTES, t1.EAC, t1.AUDITTYPES, t1.COSTAMOUNT, t1.EXTREFID, t1.RESERVEDTIMEID, t1.NAME, t1.ACTUALREVENUE, t1.PARENTLAGTYPE, t1.COSTTYPE, t1.TASKNUMBER, t1.PRIORITY, t1.ASSIGNEDTOID, t1.HASTIMEDNOTIFICATIONS, t1.PROJECTID, t1.ACTUALWORK, t1.WORKREQUIRED, t1.SPI, t1.LASTUPDATEDBYID, t1.STATUS, t1.APPROVALREQUIRED, t1.ROLEID, t1.NUMBEROFCHILDREN, t1.REVENUETYPE, t1.TRACKINGMODE, t1.HASDOCUMENTS, t1.BILLINGAMOUNT, t1.DESCRIPTION, t1.PROJECTEDSTARTDATE, t1.CONSTRAINTDATE FROM T_PROJECTS t0, T_ASSIGNMENTS t2, T_TASKS t1 WHERE ((((((t0.STATUS = ?) AND (t1.STATUS IN (?, ?))) AND (t1.PLANNEDSTARTDATE <= ?)) AND (t2.ASSIGNEDTOID = ?)) OR ((t1.ACTUALCOMPLETIONDATE BETWEEN ? AND ?) AND (t2.ASSIGNEDTOID = ?))) AND ((t0.ID = t1.PROJECTID) AND (t2.TASKID = t1.ID)))
    bind => [CUR, NEW, INP, 1207375200000, 21824, 1206943200000, 1207461599999, 21824]
    Begin profile of{ReadAllQuery(model.RKAssignment)
    INFO [Log4JSessionLog.log()]: SELECT DISTINCT t0.ID, t0.PROJECTID, t0.AVGWORKPERDAY, t0.ASSIGNMENTPERCENT, t0.ROLEID, t0.ASSIGNEDTOID, t0.OPTASKID, t0.ISPRIMARY, t0.WORKREQUIRED, t0.WORKINGDAYS, t0.CUSTOMERID, t0.WORKPERDAY, t0.TASKID FROM T_ASSIGNMENTS t3, T_PROJECTS t2, T_TASKS t1, T_ASSIGNMENTS t0 WHERE (((t0.TASKID = t1.ID) AND (((((t2.STATUS = ?) AND (t1.STATUS IN (?, ?))) AND (t1.PLANNEDSTARTDATE <= ?)) AND (t3.ASSIGNEDTOID = ?)) OR ((t1.ACTUALCOMPLETIONDATE BETWEEN ? AND ?) AND (t3.ASSIGNEDTOID = ?)))) AND ((t2.ID = t1.PROJECTID) AND (t3.TASKID = t1.ID)))
    bind => [CUR, NEW, INP, 1207375200000, 21824, 1206943200000, 1207461599999, 21824]
    Profile(ReadAllQuery,
    class=model.RKAssignment,
    number of objects=2,
    total time=5742,
    local time=5742,
    sql prepare=1,
    sql execute=5736,
    logging=1,
    time/object=2871,
    }End profile
    Begin profile of{ReadAllQuery(model.RKPredecessor)
    INFO [Log4JSessionLog.log()]: SELECT DISTINCT t0.SUCCESSORID, t0.PREDECESSORID, t0.LAGDAYS, t0.DEPENDENCYTYPE, t0.ISCP, t0.LAGTYPE, t0.ISENFORCED FROM T_ASSIGNMENTS t3, T_PROJECTS t2, T_TASKS t1, T_PREDECESSORS t0 WHERE (((t0.SUCCESSORID = t1.ID) AND (((((t2.STATUS = ?) AND (t1.STATUS IN (?, ?))) AND (t1.PLANNEDSTARTDATE <= ?)) AND (t3.ASSIGNEDTOID = ?)) OR ((t1.ACTUALCOMPLETIONDATE BETWEEN ? AND ?) AND (t3.ASSIGNEDTOID = ?)))) AND ((t2.ID = t1.PROJECTID) AND (t3.TASKID = t1.ID)))
    bind => [CUR, NEW, INP, 1207375200000, 21824, 1206943200000, 1207461599999, 21824]
    Profile(ReadAllQuery,
    class=model.RKPredecessor,
    total time=5754,
    local time=5754,
    logging=1,
    sql execute=5753,
    }End profile
    Profile(ReadAllQuery,
    class=model.RKTask,
    number of objects=1,
    total time=17760,
    local time=6264,
    profiling time=1,
    cache=1,
    query prepare=1,
    sql execute=6258,
    object building=4,
    logging=1,
    sql generation=3,
    time/object=17760,
    }End profile
    Without Bind
    Begin profile of{ReadAllQuery( model.RKTask)
    INFO  [Log4JSessionLog.log()]: SELECT DISTINCT t1.ID, t1.ESTSTARTDATE, t1.HASMSGS, t1.HASRESOLVABLE, t1.PROGSTAT, t1.CSI, t1.ENTEREDBYID, t1.TASKCONSTRAINT, t1.PLANNEDCOMPLETIONDATE, t1.BILLINGRECORDID, t1.PARENTLAG, t1.HANDOFFDATE, t1.PLANNEDREVENUE, t1.INDENT, t1.LASTNOTEID, t1.ESTCOMPLETIONDATE, t1.DURTYPE, t1.MASTERTASKID, t1.WORKPERDAY, t1.CPI, t1.PLANNEDCOST, t1.GROUPID, t1.WORKINGDAYS, t1.MILESTONEID, t1.NUMOPENOPTASKS, t1.CATEGORYID, t1.ORIGINALDURATION, t1.HASNOTES, t1.HASEXPENSES, t1.TEMPLATETASKID, t1.ACTUALDURMINUTES, t1.ENTRYDATE, t1.ACTUALCOMPLETIONDATE, t1.ISCRITICAL, t1.ACTUALSTARTDATE, t1.PARENTID, t1.PERCENTCOMPLETE, t1.RESOURCESCOPE, t1.LASTUPDATEDATE, t1.PROJECTEDCOMPLETIONDATE, t1.CUSTOMERID, t1.ACTUALCOST, t1.APPROVALID, t1.ORIGINALWORKREQUIRED, t1.URL, t1.DURUNIT, t1.COMPLETIONPENDINGDATE, t1.PLANNEDSTARTDATE, t1.DURMINUTES, t1.EAC, t1.AUDITTYPES, t1.COSTAMOUNT, t1.EXTREFID, t1.RESERVEDTIMEID, t1.NAME, t1.ACTUALREVENUE, t1.PARENTLAGTYPE, t1.COSTTYPE, t1.TASKNUMBER, t1.PRIORITY, t1.ASSIGNEDTOID, t1.HASTIMEDNOTIFICATIONS, t1.PROJECTID, t1.ACTUALWORK, t1.WORKREQUIRED, t1.SPI, t1.LASTUPDATEDBYID, t1.STATUS, t1.APPROVALREQUIRED, t1.ROLEID, t1.NUMBEROFCHILDREN, t1.REVENUETYPE, t1.TRACKINGMODE, t1.HASDOCUMENTS, t1.BILLINGAMOUNT, t1.DESCRIPTION, t1.PROJECTEDSTARTDATE, t1.CONSTRAINTDATE FROM T_PROJECTS t0, T_ASSIGNMENTS t2, T_TASKS t1 WHERE ((((((t0.STATUS = 'CUR') AND (t1.STATUS IN ('NEW', 'INP'))) AND (t1.PLANNEDSTARTDATE <= 1207375200000)) AND (t2.ASSIGNEDTOID = 21824)) OR ((t1.ACTUALCOMPLETIONDATE BETWEEN 1206943200000 AND 1207461599999) AND (t2.ASSIGNEDTOID = 21824))) AND ((t0.ID = t1.PROJECTID) AND (t2.TASKID = t1.ID)))
    Begin profile of{ReadAllQuery( model.RKAssignment)
    INFO  [Log4JSessionLog.log()]: SELECT DISTINCT t0.ID, t0.PROJECTID, t0.AVGWORKPERDAY, t0.ASSIGNMENTPERCENT, t0.ROLEID, t0.ASSIGNEDTOID, t0.OPTASKID, t0.ISPRIMARY, t0.WORKREQUIRED, t0.WORKINGDAYS, t0.CUSTOMERID, t0.WORKPERDAY, t0.TASKID FROM T_ASSIGNMENTS t3, T_PROJECTS t2, T_TASKS t1, T_ASSIGNMENTS t0 WHERE (((t0.TASKID = t1.ID) AND (((((t2.STATUS = 'CUR') AND (t1.STATUS IN ('NEW', 'INP'))) AND (t1.PLANNEDSTARTDATE <= 1207375200000)) AND (t3.ASSIGNEDTOID = 21824)) OR ((t1.ACTUALCOMPLETIONDATE BETWEEN 1206943200000 AND 1207461599999) AND (t3.ASSIGNEDTOID = 21824)))) AND ((t2.ID = t1.PROJECTID) AND (t3.TASKID = t1.ID)))
    Profile(ReadAllQuery,
    class=model.RKAssignment,
    number of objects=2,
    total time=178,
    local time=178,
    sql execute=153,
    logging=11,
    time/object=89,
    objects/second=11,
    }End profile
    Begin profile of{ReadAllQuery( model.RKPredecessor)
            INFO  [Log4JSessionLog.log()]: SELECT DISTINCT t0.SUCCESSORID, t0.PREDECESSORID, t0.LAGDAYS, t0.DEPENDENCYTYPE, t0.ISCP, t0.LAGTYPE, t0.ISENFORCED FROM T_ASSIGNMENTS t3, T_PROJECTS t2, T_TASKS t1, T_PREDECESSORS t0 WHERE (((t0.SUCCESSORID = t1.ID) AND (((((t2.STATUS = 'CUR') AND (t1.STATUS IN ('NEW', 'INP'))) AND (t1.PLANNEDSTARTDATE <= 1207375200000)) AND (t3.ASSIGNEDTOID = 21824)) OR ((t1.ACTUALCOMPLETIONDATE BETWEEN 1206943200000 AND 1207461599999) AND (t3.ASSIGNEDTOID = 21824)))) AND ((t2.ID = t1.PROJECTID) AND (t3.TASKID = t1.ID)))
    Profile(ReadAllQuery,
    class=model.RKPredecessor,
    total time=91,
    local time=91,
    logging=1,
    sql execute=90,
    }End profile
    Profile(ReadAllQuery,
    class=model.RKTask,
    number of objects=1,
    total time=336,
    local time=67,
    profiling time=2,
    query prepare=1,
    sql execute=62,
    object building=3,
    logging=1,
    sql generation=2,
    time/object=336,
    objects/second=2,
    }End profile

    Iam quessing it could be a combination of 3 things.
    1st the Airport Extreme Base should be the Master and the Express should be the Remote.
    2nd the speed of the XP machine is 1.2Ghz the Mac is 800Mhz and slower.
    in prosessing speed.
    3rd The iMac has an Airport Card that is 802.11b which is slower in transfer rate than the 801.11g of the XP.
    Cheers Don

Maybe you are looking for

  • Error while setting arch/dump locations in RAC

    Hi, In 10201, I'm facing below issue in a RAC env. SQL> alter system set log_archive_dest_1='LOCATION=/ESN/arch01/ESNPRD' scope=both; alter system set log_archive_dest_1='LOCATION=/ESN/arch01/ESNPRD' scope=both ERROR at line 1: ORA-32008: error while

  • TEXT IS TINY--HOW TO ENLARGE?E-MAIL ACCESS PAGE.

    WHILE FORWARDING AN E-MAIL TO A # OF PEOPLE IN ADDRESS BOOK I KEPT HOLDING THE CONTROL KEY DOWN. SUDDENLY ALL THE TEXT BECAME SMALL. HOW DO I RESTORE IT TO NORMAL? THE ENTIRE PAGE SHRUNK BUT I RESTORED IT TO FULL SCREEN, BUT TEXT IS STILL VERY SMALL.

  • Simultaneously use digital AV adaptor and bluetooth audio

    Can I use the digital AV adaptor with the iPhone 6 plus to project video at the same time use bluetooth for audio?

  • A possible bug in RMAN CATALOG command in 10g on Linux (SLES9 SP3)

    Hi, I ran into this issue while using RMAN command "CATALOG DATAFILECOPY <filename> TAG <tagname>". In this instance, RMAN is actually trying to write 8K data at block 1. Since a copy is being cataloged, it doen't make any sense to modify it. Please

  • Output types

    i want to send purchase order data from sap toxi ..how to configure output types in nace transaction