1's compliment?

As part of a BCC calculation, I need to "Take the last 2 characters of
the 1's compliment".  But I'm having so much trouble with this one
that I'm not even sure how to word the question correctly.
Essentially I have ASCII code for 12 characters.  I need to sum
the HEX values of these 12 characters.  I then need to convert
this HEX value into a Binary number and "flip" all the bits.  Then
add one, and keep the two least significant digits.  
I've spent the last four hours trying different things here, and I'm
getting nowhere.  Any suggestions are greatly appreciated.
Patrick Allen

It's confusing for me too KC.  
BCC apparently stands for Binary Cross Check.
To send a serial command to this particular controller (IAI RCP2) I
need to add the ASCII codes for 12 data characters.  This will
give me a HEX number.  (IE 2FA)
I then need to convert that number to binary and "flip" all the bits.  (IE any zero becomes a one and vice versa)  
Then, add one.  
Then convert back to HEX and keep the two least significant digits.  
Although this seems like a pretty convoluted way to get a check bit, it
does work for me when I do it manually on a calculator.  
I'm very new to this type of communication, so I'm not sure if this is
what would be called a "twos complement" or not.  So far nothing
I've tried has worked correctly for me.  
Patrick Allen

Similar Messages

  • Error while compling a Function:

    Hi,
    I am unable to complie a function as shown below:
    CREATE OR REPLACE FUNCTION GET_SUBS_TYPE_KEY(
    SUBNO VARCHAR2 DEFAULT NULL
    RETURN SUBS_TYPE_KEY_1 PIPELINED AS
    V_SUBNO VARCHAR2(40);
    V_PAID VARCHAR2(10);
    V_SUBS_TYP_KEY VARCHAR2(10);
    V_VAL1 VARCHAR2(255);
    CURSOR C1_REC IS SELECT SUBNO,PREPOST_PAID,SUBS_TYPE_KEY
    FROM CTVA_ETL.RA_CRM_USER_INFO,DIM_SUBSCRIBER_TYPE
    WHERE SUBSTR(DIM_SUBSCRIBER_TYPE.SUBS_TYPE_DESC,1,4)=RA_CRM_USER_INFO.PREPOST_PAID
    --WHERE MSISDN='8615025400109'
    --WHERE MSISDN IN ('8615025400068','8615025400083','8615025400101','8615025400132','8615025400109')
    GROUP BY SUBNO,PREPOST_PAID,SUBS_TYPE_KEY;
    BEGIN
    OPEN C1_REC;
    LOOP
    FETCH C1_REC INTO V_SUBNO SUBNO_TYP_1,V_PAID,V_SUBS_TYP_KEY SUBS_TYP_KEY;
    --DBMS_OUTPUT.PUT_LINE('THE MSISDN VALUE'||V_MSISDN);
    EXIT WHEN C1_REC%NOTFOUND;
    IF V_PAID='PREP' THEN
    V_SUBS_TYP_KEY ='2';
    ELSIF V_PAID='POST' THEN
    V_SUBS_TYP_KEY ='2';
    ELSE
    V_SUBS_TYP_KEY ='-99';
    LOOP
    PIPE ROW ( SUBS_TYPE_KEY(C1_REC.SUBNO_TYP_1 ,C1_REC.SUBS_TYP_KEY ));
    END LOOP;
    END LOOP;
    RETURN;
    CLOSE C1_REC;
    END;
    its giving error in the SUBNO_TYP_1 Type

    Un-formatted code is nothing but garbage. So always format your code.
    CREATE OR REPLACE FUNCTION get_subs_type_key(
                             subno VARCHAR2 DEFAULT NULL) RETURN subs_type_key_1 pipelined
    AS
         v_subno      VARCHAR2(40);
         v_paid           VARCHAR2(10);
         v_subs_typ_key  VARCHAR2(10);
         v_val1           VARCHAR2(255);
         CURSOR c1_rec
         IS
         SELECT subno,
                prepost_paid,
                subs_type_key
           FROM ctva_etl.ra_crm_user_info,
                dim_subscriber_type
          WHERE SUBSTR(dim_subscriber_type.subs_type_desc, 1, 4) = ra_crm_user_info.prepost_paid
          GROUP BY subno,
                prepost_paid,
                subs_type_key;
    BEGIN
         OPEN c1_rec;
         LOOP
              FETCH c1_rec INTO v_subno subno_typ_1, v_paid, v_subs_typ_key; <<-- Here i removed subs_typ_key Only god knows why you had it there.
              --DBMS_OUTPUT.PUT_LINE('THE MSISDN VALUE'||V_MSISDN);
              EXIT WHEN c1_rec % NOTFOUND;
              IF v_paid = 'PREP'
              THEN
                   v_subs_typ_key = '2';
              ELSIF v_paid = 'POST'
              THEN
                   v_subs_typ_key = '2';
              ELSE
                   v_subs_typ_key = '-99';
                   LOOP
                        pipe ROW(subs_type_key(c1_rec.subno_typ_1,   c1_rec.subs_typ_key));
                   END LOOP;
              ENDIF; <<-- Here i closed your IF statement
         END LOOP;
         RETURN;
         CLOSE c1_rec;
    END;

  • Problem with Pro*C/C++ complie in linux

    I install Oracle8.1.7 in my Mandrake 7.2 ( like redhat7.1) , and it works well except with proc not works well.
    when I complie the precomp demo program, it gives much errors. I note the proc config file length was zero.
    The following is errors I get when do:
    cd precomp/demo/proc
    make -f demo_proc.mk sample1
    it print very large errors, like follow:
    Pro*C/C++: Release 8.1.7.0.0 - Production on PGFZNe 7TB 6 11:46:04 2001
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    System default option values taken from: /home/u01/precomp/admin/pcscfg.cfg
    Error at line 33, column 11 in file /usr/include/stdio.h
    # include <stddef.h>
    ..........1
    PCC-S-02015, unable to open include file
    Error at line 38, column 11 in file /usr/include/stdio.h
    # include <stdarg.h>
    ..........1
    PCC-S-02015, unable to open include file
    Error at line 29, column 10 in file /usr/include/bits/types.h
    #include <stddef.h>
    .........1
    PCC-S-02015, unable to open include file
    Error at line 14, column 10 in file /usr/include/_G_config.h
    when I run proc without file, it print options as following:
    Pro*C/C++: Release 8.1.7.0.0 - Production on Mon Jul 9 11:19:38 2001
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    System default option values taken from: /home/u01/precomp/admin/pcscfg.cfg
    Option Name Current Value Description
    auto_connect no Allow automatic connection to ops$ account
    char_map charz Mapping of character arrays and strings
    close_on_commitno Close all cursors on COMMIT
    code kr_c The type of code to be generated
    comp_charset multi_byte The character set type the C compiler supports
    config default Override system configuration file with another
    cpp_suffix none Override the default C++ filename suffix
    dbms native v6/v7/v8 compatibility mode
    def_sqlcode no Generate '#define SQLCODE sqlca.sqlcode' macro
    define none Define a preprocessor symbol
    duration transaction Set pin duration for objects in the cache
    dynamic oracle Specify Oracle or ANSI Dynamic SQL Semantics
    errors yes Whether error messages are sent to the terminal
    errtype none Name of the list file for intype file errors
    fips none FIPS flagging of ANSI noncompliant usage
    header none Specify file extension for Precompiled Headers
    hold_cursor no Control holding of cursors in the cursor cache
    iname none The name of the input file
    include none Directory paths for included files
    intype none The name of the input file for type information
    lines no Add #line directives to the generated code
    lname none Override default list file name
    ltype none The amount of data generated in the list file
    maxliteral 1024 Maximum length of a generated string literal
    maxopencursors 10 Maximum number of cached open cursors
    mode oracle Code conformance to Oracle or ANSI rules
    nls_char none Specify National Language character variables
    nls_local no Control how NLS character semantics are done
    objects yes Support object types
    oname none The name of the output file
    oraca no Control the use of the ORACA
    pagelen 80 The page length of the list file
    parse full Control which non-SQL code is parsed
    prefetch 1 Number of rows pre-fetched at cursor OPEN time
    release_cursor no Control release of cursors from cursor cache
    select_error yes Control flagging of select errors
    sqlcheck syntax Amount of compile-time SQL checking
    sys_include none Directory where system header files are found
    threads no Indicates a multi-threaded application
    type_code oracle Use Oracle or ANSI type codes for Dynamic SQL
    unsafe_null no Allow a NULL fetch without indicator variable
    userid none A username/password [@dbname] connect string
    varchar no Allow the use of implicit varchar structures
    version recent Which version of an object is to be returned
    PCC-F-02135, CMD-LINE: User asked for help
    How can I do to solve this problem now?
    Note: I need pro*c/c++ to works well in my project.
    Thank you very much for your kindly help!
    chen chuanwen: [email protected]
    null

    Sorry! I have not explain it clearly.
    To solve it , you do following :
    1. locate stdarg.h ( or find /usr -name stdarg.h ), assume you find a stdarg.h in /usr/lib/gcc-lib/XXX/XXX/include/stdarg.h
    2.ln -s /usr/lib/gcc-lib/XXX/XXX/include/stdarg.h /usr/include/stdarg.h or cp /usr/lib/gcc-lib/XXX/XXX/include/stdarg.h /usr/include
    ( above 2 step was to make Pro*C can find stdarg.h in /usr/include )
    3. for file stddef.h do like step 1,2
    4. append a line in your Pro*C config file:
    CODE=ANSI_C
    null

  • While compling the form error occurs

    Hi,
    while compling the form error occurs like this
    (Error 0 ,At line 0,column 0
    Automatic recompile of procedure body pro_query failed)
    it is not allowing form to compile for runing it ,what to do to solve this problem?
    any idea please help
    Regards
    VN

    Hi,
    while compling the form error occurs like this
    (Error 0 ,At line 0,column 0
    ORA-00600:internel error code,arguments:(17069),(55243136),(),(),(),(),() )
    (Error 0 ,At line 0,column 0
    Automatic recompile of procedure body pro_query
    failed)
    it is not allowing form to compile for runing it
    ,what to do to solve this problem?
    any idea please help
    Regards
    VN

  • WRT54G - Is there anyway to add a separate VPN/Firewall device to complement this product

    I have a WRT54G v.2 device and I hate to throw it out.  My dilemma is that I'm in need of a VPN/Firewall device as well.  So I would like to know if there is a device that I can purchase from Linksys that will provide the VPN/Firewall features as a complement to my existing WRT54G?  I'd appreciate any info someone might be able to provide.
    Regards.

    Hi,
    you have options between the RV series of VPN routers and the BEFSX41 and the BEFVP41.however you will have to change your network a bit.Your main router will have to be either of the VPN routers.The DHCP of the wrt will have to be disabled and you will also need to change the ip of the wrt from 192.168.1.1 to 1962.168.1.2
    The connection will be.modem to internet port of the VPN router and then from port 1 of the VPN router to port 1 on the wrt.Do not use the internet ports of the wrt.

  • Bit Complement in an Expression Node

    I can use bit complement in a formula node but not the expression node. The
    "~" tilde is the only text in the expression node. The error is "~#" with
    # being the error. The input is a U8. Thanks in advance for any help.

    Hi Catherine,
    I've tried your suggestion earlier and tried it again after your
    post but it still doesn't work. I am new to expression nodes so maybe my
    syntax is incorrect. To do the same in C language I think it looks like
    this: "a = ~ b;". I made a picture and a copy of the error. Let me know
    if you see anything wrong. Thanks!
    Error on line 1 is marked by a '#' character: "~#"
    [Image]
    Pat S.
    cfpautx wrote:
    > Hello Pat,
    > The way to fix this problem is fairly simple, if you change your
    > inputs and outputs to I8, u16 or I16 it will run correctly.
    > Regards,
    > Catherine Petronino
    > National Instrument
    > www.ni.com/ask

  • ERROR WHILE COMPLING CLIENT

    I am not ablr to complie client bean, i have created 2 directories beans,client under beans dir i have put home,remote,bean classes. named it as beans package. in client directory i am refering this classes by importing the beans package, but it gives error like package beans does not exist. client & beans both directory are placed in simplesessionapp directory.
    error screen shot is
    E:\8333\ch08\SimpleSessionApp>javac -d . client/*.java
    client/SimpleSessionClient.java:3: package beans does not exist
    import beans.SimpleSession;
    ^
    client/SimpleSessionClient.java:4: package beans does not exist
    import beans.SimpleSessionHome;
    ^
    client/SimpleSessionClient.java:13: cannot find symbol
    symbol : class SimpleSessionHome
    location: class client.SimpleSessionClient
    SimpleSessionHome home = (SimpleSessionHome) PortableRemoteObject.narro
    w(ref,SimpleSessionHome.class);
    ^
    client/SimpleSessionClient.java:13: cannot find symbol
    symbol : class SimpleSessionHome
    location: class client.SimpleSessionClient
    SimpleSessionHome home = (SimpleSessionHome) PortableRemoteObject.narro
    w(ref,SimpleSessionHome.class);
    ^
    client/SimpleSessionClient.java:13: cannot find symbol
    symbol : class SimpleSessionHome
    location: class client.SimpleSessionClient
    SimpleSessionHome home = (SimpleSessionHome) PortableRemoteObject.narro
    w(ref,SimpleSessionHome.class);
    ^
    client/SimpleSessionClient.java:14: cannot find symbol
    symbol : class SimpleSession
    location: class client.SimpleSessionClient
    SimpleSession simpleSession = home.create();
    ^
    6 errors
    a
    //import beans.SimpleSession;
    //import beans.SimpleSessionHome;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    public class SimpleSessionClient {
    public static void main(String [] args) {
       try {
             InitialContext jndiContext = new InitialContext();
             Object ref = jndiContext.lookup("ejb/beans.SimpleSession");
             SimpleSessionHome home = (SimpleSessionHome) PortableRemoteObject.narrow(ref,SimpleSessionHome.class);
             SimpleSession simpleSession = home.create();
            for (int i=0;i<args.length;i++) {
           String returnedString = simpleSession.getEchoString(args);
    System.out.println(returnedString);
    } //close for loop
    }catch(Exception e) {
    e.printStackTrace();
    } //close catch
    }//close main
    } // close main class
    help me.

    I hope this question is not too simple. Does your CLASSPATH contain the path to the beans package .class file location, or the jar file that contains them?

  • Problem in compling with G++ compiler

    Hi ,
    I have written one application in java which is calling the C API and after processing it is giving result to the Java application.
    Now i have changed the extension of the C API to .cpp then i am compiling the same source code using the g++ complier but it is giving error in the function where i am calling my Java function in C API .
    Can any one tell me is there is any thing wrong i am doing ...
    For compiling the C API i am using the command  (It is compling fine )
    gcc -o libpixim.so -shared piximImager.c -I /home/java/include -I /home/java/include/linux
    For compiling the C++ API
    g++ -o libpixim.so -shared piximImager.cpp -I /home/java/include -I /home/java/include/linux
    But it is giving error ....

    I know both langugaes are not same but c is a sub part of C++ if it is compling in C then with C++ complier it also should compile.
    I am found the solution for that
    ie
    g++ -o libpiximImager.so -shared  -I /home/narendra/javatest/j2sdk1.4.2_15/include/ -I /home/narendra/javatest/j2sdk1.4.2_15/include/linux/  -lc
    I have miss to put the -lc option

  • Ubiquity complement for Firefox last version. When will it be available?

    JDownloader asks me to load Ubiquity complement but it is unavailable for Firefox last version.
    Do you have any idea when it will be available?

    Excellent!
    Can this be downloaded from OTN?
    At http://www.oracle.com/technology/software/products/ias/bpel/index.html
    I only see: "Oracle BPEL Designer for Eclipse 3.0"
    Or did you try and use BPEL Designer for Eclipse 3.1, using that version and was fortunate enough to get it working ;-)

  • Complement on Cover Art for Main Lightroom Page

    Would really like to complement Adobe on the cover art found on the main Adobe Photoshop Lightroom 2 marketing page. Very understated, professional, elegant.
    Just found it extemely interesting. The stark contrast in marketing style from before. A class act. Very nice!
    Cheers

    Hey.. got this back to another email I had sent itunes support about artwork...
    looks like it's getting fixed.
    Dear Jim,
    Thank you for contacting the iTunes Music Store regarding your podcast's artwork. I appreciate your patience in this matter.
    There was an issue with the Music Store which affected several podcasts, including your own. Our engineers have identified the issue and it has now been resolved. Your podcast's artwork should appear on the Music Store within 24 hours.
    In the meantime, please continue to ping the iTunes server using one of the methods described in our technical specifications:
    http://www.apple.com/itunes/podcasts/techspecs.html
    I apologize for any inconvenience this may have caused you and your podcast's subscribers. Thank you for using the iTunes Music Store.
    Sincerely,
    Andres
    iTunes Music Store Support
    http://www.apple.com/support/musicstore/ww/

  • Error message while compling the following code.can some body help me?

    Hi all,
    I wrote a simple program which connects to oracle 9i which uses thin driver,
    the following code is
    import java.io.*;
    import java.sql.*;
    import oracle.jdbc.*;
    import oracle.sql.*;
    import javax.sql.*;
    class JdbcVersion
    public static void main (String args[])
    throws IOException, SQLException
         //Register Oracle's Driver
         DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
         //Build the connection string.
         String connString ="jdbc:oracle:thin:@(description=(address_list=" +
    "(address=(protocol=tcp)(port=1521)(host=home-f831b673e0))" +
    "(address=(protocol=tcp)(port=1521)(host=home-f831b673e0)))" +
    "(connect_data=(sid=PLSExtProc))" +
    "(source_route=yes))";
    Connection conn = DriverManager.getConnection(connString, "<username>", "<password>");
    // Create Oracle DatabaseMetaData object
    DatabaseMetaData meta = conn.getMetaData();
    // gets driver info:
    System.out.println("JDBC driver version is " + meta.getDriverVersion());
    and after compling this code i am getting an error message that
    C:\>java JdbcVersion
    Exception in thread "main" java.sql.SQLException: Io exception: Software caused
    connection abort: recv failed
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at JdbcVersion.main(JdbcVersion.java:24)..
    can any one help me in this regards??

    hi nthali,
    now i wote a simple code as you suggested....and again encontering with new problem
    import oracle.jdbc.*;
    import java.sql.*;
    public class Test {
    public Test() {
    public static void main(String[] args) {
    Test test1 = new Test();
    test1.test();
    public void test(){
    try{
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:Oracle:thin:@localhost:PNPKEY:'scott':'tiger'");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("select * from player");
    while(rs.next()){
    System.out.println(rs.getString("id"));
    // System.out.println(rs.getString("name"));
    catch(Exception e){
    e.printStackTrace();
    this is java code...
    and while running it is giving me an error like this....
    C:\work>java Test
    java.sql.SQLException: invalid arguments in call
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at Test.test(Test.java:14)
    at Test.main(Test.java:9)...
    can you help me??? in this problem...please??

  • Complie Error for menus (Swing)

    I'm receiving the following complie error. Also, listed is the area for code that is getting the error.
    Thank you for any help that you can provide.
    Error Message:
    P5AWT should be declared abstract; it does not define menuSelected(javax.swing.event.MenuEvent) in P5AWT
    public class P5AWT extends JFrame
    Program:
    public class P5AWT extends JFrame
         implements ActionListener, MenuListener
    private JTextField inputfile;
    private JTextField outputfile;
    private JTextArea ta;
    private JMenuItem newMT, openMT, saveAsMT, exitMT;
    String curFile, filename = "";
    int numstaff;
    Employee[] staff;
    public P5AWT()
    super ("P5AWT Starter Program");
    addWindowListener(new WindowAdapter()
    { public void windowClosing(WindowEvent e) { System.exit(0); }} );
    JMenuBar mb = new JMenuBar ();
    setMenuBar(mb);
    JMenu fileMenu = new JMenu ("File");
    mb.add(fileMenu);
    fileMenu.add (newMT = new JMenuItem ("New", new MenuShortcut(KeyEvent.VK_N)));
    newMT.addMenuListener( new NewCommand());
    fileMenu.add (openMT = new JMenuItem ("Open", new MenuShortcut(KeyEvent.VK_O)));
    openMT.addMenuListener( new LoadFileCommand());
    fileMenu.add (saveAsMT = new JMenuItem ("Save As"));
    saveAsMT.addMenuListener( new SaveAsFileCommand());
    fileMenu.add (exitMT = new JMenuItem ("Exit"));
    exitMT.addMenuListener( new CloseCommand());
    JPanel p3 = new JPanel();
    p3.setLayout(new FlowLayout(FlowLayout.CENTER));
    ta = new JTextArea(20, 60);
    p3.add(ta);
    setLayout(new FlowLayout(FlowLayout.CENTER)); // this overides everything, why?
    add(p3);
    }

    menuSelected is a Abstract method. That means if you implement the MenuListener Class you SHOULD define the menuSelected() event.
    I am not correct with the Method names but logically it seems that tis is the problem.
    Another thing, use setJMenuBar() instead setMenuBar()
    Regards ,
    Karan

  • Complement with Airport Express?

    Greetings,
    I have a Cat6 cabled home. The outside internet is pulled inside to the laundry room on the first floor where it then disperses into 4 other rooms. I currently use a Netgear WNDR4500 1000GB wirelss router in this area to share, but unfortunatley upstairs the wireless signal has some interference over the 5G/2.4G.
    For the upstairs media room I use a 1000GB switch to connect other peripherals such as PS3, Apple TV, TV etc, but I was wondering if it was possible to complement with an Airport express to strengthen WiFI since the other routers is "hidden" in a laundry room? If so, do I connnect the Airport Extreme to the LAN port and just have my computers find the device, or do I have to add a completely secondary network in my home? (In other words, is it better to turn off the WiFi on the Netgear router and just use it as wired and use the AE as Wifi only)
    Do I need to create to different gateways? Confused...

    You have me confused too......just kidding - you have a somewhat complicated issue so I will just throw out some thoughts and see what sticks - first of all, you can't strengthen a signal either wirelessly or via ethernet - it would be the same or less strength depending on many factors - you could extend it to a different area for more coverage - but keep in mind that Apple products can't extend a non-Apple router wirelessly - they can only join the network so you have ethernet capability but no wireless brodacast - you can however connect to the router via ethernet and "create" a wireless network in a remote area with the your same network name or a different name - are you really confused now? - if so do this - to have a true roaming network, you need to replace the Linksys with the Extreme and use additional Extremes and/or Expresses wired and/or wired in remote areas - this is the Ideal setup in my opinion - see what you think and get back to me.

  • Error complie "Exception in thread "main" java.lang.NoClassDefFoundError"

    Dear All,
    I have the following problem can not compile the code below.
    Here my settings and the code.
    Thanks for the help.
    My java version.
    ===============================================
    D:\bea\jdk150_22\bin>java -version
    java version "1.5.0_22"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_22-b03, mixed mode)
    ===============================================
    I use a bat to compile the code
    ===============================================
    set JDK_HOME=D:\bea\jdk150_22
    set PATH=%JDK_HOME%\bin;%PATH%
    set CLASSPATH=%CLASSPATH%;D:\oracle\product\10.2.0\client_1\jdbc\lib\classes12.jar
    rem ---- compile
    javac GetDBOracle.java
    rem ---- testing
    java GetDBOracle
    rem ---- add to jar
    jar cf GetDBOracle.jar GetDBOracle.class
    ===============================================
    My java code
    ===============================================
    import java.sql.*;
    import java.io.*;
    public class GetDBOracle {
    public static String GetDBOracle(String Parm1, String Parm2) throws SQLException
    String myResult = "";     
    // Load Oracle driver
    DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
    // Connect to the local database
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:ORCL", "ORC", "ORC2010");     
    // Query the employee names
    Statement stmt = conn.createStatement ();
    ResultSet rset = stmt.executeQuery ("SELECT JAVA_GET_VALUE('"Parm1"','"Parm2"') FROM DUAL");
    // Print the name out
    while (rset.next ()) {
    myResult = rset.getString (1);
    //close the result set, statement, and the connection
    rset.close();
    stmt.close();
    conn.close();     
    return myResult;
    public static void main(String args[])
    try {
    System.out.println(GetDBOracle("XXI", "12000"));
    } catch (Exception e) {
    System.out.println(e.getMessage());
    ===============================================
    Erro
    ===============================================
    Exception in thread "main" java.lang.NoClassDefFoundError: GetDBOracle
    ===============================================

    What happened to this Error complie "Exception in thread "main" java.lang.NoClassDefFoundError" ?

  • Errors in compling InsuranceLogin.java

    I got 2 erros in compling the InsuranceLogin.java (updated)
    Class javax.servlet.http.HttpSessionBindingListener not found in interface oracle.ifs.adk.security.IfsHttpLogin.
    package ifsdevkit.sampleapps.insurance;
    ^
    Class javax.servlet.http.HttpSessionBindingEvent not found in import.
    import javax.servlet.http.HttpSessionBindingEvent;
    ?

    Thanks Mark. Now it works.
    One more question. I search through the posting archieve and found out a reply by Alison Stokes (Oracle iFS Product Management) to "Changes in *.js and *.jsp files are not effective", saying that
    "If you are attempting to modify the jsps comprising Oracle iFS' Web UI, this is not supported for release 1.0."
    Does it mean I can't modify the container.jsp file that defines the iFS's WebUI? Actually, I was asked to modify the looking of this body frame to contain more custom attributes. Can I do that?
    Thanks.

Maybe you are looking for