Casting jobject Types

I am very new to JNI, so please go easy...
I have a C function that uses parameter passing to return 3 values. The 3 parameters are of type long, short and char. The C function looks like:
myCFn(long id, short session, char response);I want to pass the Objects of the primitive java types corresponding to the C types, to make use of java's passing by reference for objects so that the 3 parameters are modified. The java signature looks like:
native myJavaFn(Long id, Short session, String response)Running javah on this results in the signature:
Java_Klass_myJavaFn(JNIEnv, jobject, jobject, jobject, jobject);My question is am i able to cast the parameters of type jobject to the respective C primitive types by doing the following:
const long cLongVar = (long) javaLongParam;
const short cShortVar = (short) javaShortParam;
const char *cCharVar = (*env)->GetStringUTFChars(env, (jstring)jObjectType, 0);Then call the c method with:
myCFn(cLongVar, cShortV, cCharVar);And have the 3 parameters values changed upon the function returning?
Thanks for any help, hope it makes sense
toby

My question is am i able to cast the parameters of type jobject to the respective C primitive types
Nope. Java primitive types - byte, short, char, int, etc... correspond directly to C++ primitive types. Just take a look at the typedefs for jbyte, jshort, jchar, jint, etc... in the jni header files.
Every other JNI type - jobject, jclass, jstring, jarray, jthrowable, etc... is an opaque type, and you must use methods to operate on those types - http://java.sun.com/j2se/1.4.1/docs/guide/jni/spec/types.doc.html
Both the JNI specification and the JNI Programmer's Guide cover this information and are freely available from java.sun.com.
God bless,
-Toby Reyelts
Check out the free, open-source, JNI toolkit, Jace - http://jace.reyelts.com/jace

Similar Messages

  • Casting jobjects

    Hi,
    i face a problem in casting jobject in JNI. From Java layer i receive a DataType of super class object. but in JNI layer i need to access the methods of subclass, for that i need to cast to subclass.
    I tried to cast the jobject to my DataType. This class only have virtual Methods, so i cannot call those Methods. Then I tried to cast it to an implementation of DataType Class (my Subclasses). If I try to access the Methods of the Subclass I get a segFault.
    Help!?
    Thanks in advance

    Okay you're right, my explanation was not exactly that what i mean. I try it again.
    1. I have a cpp Framework. In this Framework there are some structure those look like:
    class superclass{
    virtual get/set method();
    }then there is more then one subclass:
    class subclass : public superclass{
    //impelmentation of the methods
    get/set methods
    }2. Then I created a Java Wrapper using JNI. This still works. But I want to extend the Framework, with some Java Class. Therefore I want to registrate using the invocation API those Java Classes.
    with the Invocation API i do:
    1. Get the class id (base class)
    2. Get the method id
    3. Call the class.
    4. the return type is an user defined Type and for every Subclass different.
    3. And the Java Method i called looke like this:
    public superclass get(){
    superclass returnValue = new subclass();
    //set some userdefined Value to the return Value
    return superclass;
    }I the Java Method is also everything okay.
    The Problem is in part 2. I want to have the Data from the subclass which are accessable from Java, also accessable in cpp. So if I called the Java-Method which returns the superclass i get an jobject.
    superclass *superCls = (superclass*)callMethod();
    subclass *subCls = dynamic_cast<subclass*>(superCls);The last 2 lines ?? How can i realize that???
    THanks
    Edited by: port54 on Mar 1, 2008 2:52 AM

  • Rules for casting generics type

    I know that there is a section in jsr14 spec about rules of casting generic types, but it seems outdated with
    JLS3.
    It is obvious that e.g. Class<String> cannot be casted to Class<Integer>.
    However in
    <T,V> void foo (Class<T> ct) {
    Class<V> cv = (Class<V>)ct;
    The cast is permitted by the compiler though of course marked as unchecked (The cast should be rejected according to jsr14 spec since none of the types is a subtype of the other).
    So the question is: what are the rules, compiler uses to check casts?

    1. There is an (unsafe) explicit cast from l1 to l2.
    2. There is an implicit cast in the last line, because
    l2 is a List<String>, the line is compiled to the
    equivalent of
    System.out.println(" result:" + (String) l2.get(0));
    // ClassCastException: java.lang.String

  • How to cast object type to integer type?

    Hi,
    Object [] temp;
    Int [] value;
    How can I assign temp to value? (value = temp?)
    In other words how to cast array of type object to array of type integer?
    Thanks a lot.

    Hi,
    Object [] temp;
    Int [] value;
    How can I assign temp to value? (value = temp?)
    In other words how to cast array of type object to
    array of type integer?
    Thanks a lot.That my friend, is (sometimes) illegal. other times use
    value = (Integer[]) temp;
    Pray that temp is holding an Integer array so that you dont throw a runtime exception.
    I am assuming you know the diff between "int" and "Integer".

  • CASTing Table Type to Cursor

    Hi,
    I have req. that A proc is calling B proc which in turn return me a set of records in table type. Then i manipulate the data in A proc and i want to return this set in cursor type.
    could you please help me. here i have pasted my example.
    CREATE OR REPLACE TYPE oemp AS OBJECT
         eno     number(4),
         enm     varchar2(10),
         sal     number(7,2)
    CREATE OR REPLACE TYPE temp AS TABLE OF oemp;
    Proc B:=
    procedure showemp( dno in number, disp out temp)
    is
    l_str varchar2(1000);
    begin
    l_str := 'select oemp(empno, ename, sal) from emp where deptno = :dno';
    execute immediate l_str
    bulk collect into disp
    using dno;
    exception
    when no_data_found then
    null;
    end;
    CREATE OR REPLACE TYPE odemp AS OBJECT
         eno     number(4),
         enm     varchar2(10),
         sal     number(7,2),
    com number(7,2)
    proc A:
    procedure showempdet_cur(idno in number, oshow out cursor_type)
    is
    ishow temp;
    type tde is table of odemp;
    o_emp tde := tde();
    begin
    --Call to Proc A
    showemp(idno, ishow);
    if ishow.count > 0 then
    for i in ishow.first..ishow.last loop
    o_emp.extend;
    o_emp(o_emp.last) := odemp(ishow(i).eno, ishow(i).enm, ishow(i).sal, ishow(i).sal * .1);
    end loop;
    end if;
    -- here I want to return this o_emp table outside as cursor type
    -- i want to use this proc in crystal report which does not accept table type
    --return type
    end;
    hope this will help..I was trying to use CAST with MULTISET option..but some where i am doing wrong..
    help will appreciated.
    Thanks
    RSD

    You can query only sql-collections.
    SQL> create or replace type table_of_odemp as table of odemp;
    SQL> /
    Type created.
    SQL>
    SQL> var c refcursor
    SQL>
    SQL> declare
    SQL>   o_emp table_of_odemp := table_of_odemp();
    SQL> begin
    SQL>   for i in 1..5 loop
    SQL>     o_emp.extend;
    SQL>     o_emp(o_emp.last) := odemp(i, 'Name'||i, i*1000, i*50);
    SQL>   end loop;
    SQL>   open :c for select * from table(cast(o_emp as table_of_odemp));
    SQL> end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> print c
              ENO ENM                  SAL           COM
                1 Name1               1000            50
                2 Name2               2000           100
                3 Name3               3000           150
                4 Name4               4000           200
                5 Name5               5000           250

  • ClassCast Exception while casting to type String

    Dear Java users
    While coding a parse routine in a session EJB , I created a vector and added some elements to it.
    Naturally these elements are of type object.
    Now, while extracting elements out of the vector I tried to cast them to the actual type that the elements are.
    Most of the elements are of type String and some of type Long and Double.Note that these are all Object wrappers not primitives.
    The code compiles fine, however at run time I get the following error:
    java.lang.ClassCastException : java.lang.String
    I tried to do the casting two ways: (String) object and object.toString(). In both cases I got the same error.
    Here is a snippet of my code where I get the error:
    RETAIL_TRANX retail_db = retail_home.create(columns.elementAt(0).toString(),
    columns.elementAt(1).toString(),................
    Any ideas on why this is happening and how best should I cast to String.
    Thank you for any help you can provide
    Best
    Naveen

    RETAIL_TRANX retail_db = retail_home.create(columns.elementAt(0).toString(),
    columns.elementAt(1).toString(),................
    I'd say that the code above calls the toString() implemented in the Object class because that's what elementAt() returns. If you want String objects as arguments to the create method, you want the toString() implemented in the subclasses String, Long, and Double. To achieve this, try the following:
    RETAIL_TRANX retail_db = retail_home.create(((String)columns.elementAt(0)).toString()...
    This code casts the Object class object returned by elementAt to a String first and then it calls the toString() method on the String object resulting from the cast. The toString() that executes should be the one in the String rather than Object class.
    This is going to fail if elementAt() doesn't return an object that can be cast to a String. In this case, what you might want to do first is test the type of object returned with the instanceof operator. Then cast to the appropriate type, in each case calling toString() after the cast has been made.
    Regards,
    Steve

  • Interfaces casts are type-checked differently to class casts?

    hi,
    this is a multipost of
    http://forum.java.sun.com/thread.jspa?threadID=677488&tstart=0
    as i'm hoping some compiler guys are hanging around in here :)
    I'm just wondering why interfaces are type-checked differently to class casts when casting between siblings in the inheritance hierarchy.
    e.g. casting a String to an Integer fails, but declaring
    interface IString {
       String toUpperCase();
    interface IInteger {
       int intValue();
    } and casting between IString and IInteger works fine?
    any help appreciated,
    thanks,
    asjf

    Unless you have specific memory usage requirements so that you must use arrays, just use a java.util.List:
    public abstract class Type<A extends Arg> {
        protected abstract List<A> method();
       // or if the only needs to read it can be more convenient to have
        protected abstract List<? extends A> method2();
    public class Sub extends Type<SubArgs> {
        protected List<SubArgs> method() { ... }
        // sub class can be more specific for method2 if it wants to
        protected List<SubArgs> method2() { ... }
    }

  • Cast between types

    Hi
    I am new to pixel bender. I am a CG artist with a very little developper background...
    I understand pixel bender language is strongly typed. OK fine....
    But i would like to understand the difference between
    (for instance)
    dst.a  = float(0.0);
    and
    dst.a = pixel1(0.0);
    Am i free to write both syntaxes. Indeed both run without exceptions in my very simple sample script.
    Regarding memory usage or efficiency, what is the true difference between theses two types
    furthermore
    i understand pixel4 is a kind of convention for output. Like image4 for input. Ok Fine.
    But pixel4(0.0) == float4(0.0); returns true
    so, i would like to understand the true meanings of theses types to build effectives pixel bender fragments
    I am sorry but english is not my native bytecode
    hope you understand what i mean
    thanks for clues
    MLK
    ++

    Thanks Royi A
    So i will use pixel values when it makes sense for anyone who read my code.
    And i will use float values for arithmetics purposes.
    Thanks for your reply. really ^^ I was not sure....
    To describe the background, i am trying a PB to remap texture on CG render. It requires 2 inputs, the uv channel and the texture. The uv channel is a special map rendered with cg soft (maya, max, xsi, etc.) where uv space is mapped in the 32 bits u(0.0 , 1.0) v(0.0 , 1.0) space
    where red channel stands for u
    green channel stands for v
    bleu channel stands for pixel coverage between geometry
    alpha stands for cropping and acceleration structure.
    To tell things speedy (frenchy syntax) : i query the uv map to retrieve the alpha, blue, red and green channels, then i sample the second input (the texture to remap) to write output accordingly. In fact i come from uv space to screen space mapping.
    Because the result is very aliased, i use (actually) a graph to propagate output to a fragment for B-spline super sampling.
    That is, the super sampling is done after transformations. It is a screen space super sampling. it is not ideal :/  but i don't know how to deal with super sampling before transformations with keeping "full pixel datas" ... :/  I don't know how to keep track of image4 pixels... because of paralellism of evaluatepixel()
    I publish parameters to select nodeRenderID, offset and tile texture onto the geometry. Actually the filter needs to be applied several time to remap serveral geometry on a single picture (based on renderID)
    In fact this filter is similar to autodesk combustion 3D-texmap operator with screen space mitchell-netravali sampling. If you see what i mean... ^^
    I don't do it for fun, i do it because my customer needs to remap his customer's picture on CG product-render in real time with flash. I hope my PB will export to pbj regarding limitations ; graph not allowed :$  I will deal with it later. One thing at a time.
    I will try 2 filters in pipeline.... well really i don't know if PB is my solution. lot of work to be done !! ^^ But i try it !! Hope it helps. I can't do it in ActionScript without heavy payload on customer's cpu. That's why i try PB
    If i can achieve the result I will distribute it for free on adobe exchange when it's done : A texmap filter with screen space anti aliasing for flash and toshop as least
    again, excuse me for my frenchy bytecode
    MLK

  • Casting data types

    Been trying to cast string to integer. Net beans doesn't seem to like it. Any help. Tried x = (int) y; where x is integer variable and y is string. Works if y is char and number is only thing in it. Help.

    Some classes have method decode(String), like Integer, Color, Font...
    You can use: Integer.decode(mystring);

  • Casting one type to another type

    For this block statement:
           public static String methodEx(MyClass  objRef)
               if (objRef  !=  null)
                  StringBuffer dat = new StringBuffer();
                  for(int i=0;i < 40;i++)
                         dat.append( "myData" + i );
           return dat.toString();
           }I assume this line: return dat.toString();
    is casting the StringBuffer object reference (dat) to a String object reference?

    I assume this line: return dat.toString();
    is casting the StringBuffer object reference
    (dat) to a String object reference?Nope. Casting is when you don't really change the data, but rather you change the name of the "box" that its in. For instance the code below casts a long variable as an int:
       long longVar = 500L;
       int intVar = (int)longVar;toString is a method that takes the StringBuffer data, and changes it to something completely different, a String, and no casting is involved. Another way that I look at it, casting is almost a passive process while the toString method above is an active process.

  • What cast type are used for?

    In the example attached to this question is a simple VI application that cast, using type cast of LabVIEW, one value to different other type. My understanding of type cast, in C, C++ and to my best knowledge, was an implicit adaptation of a numerical value in a specific format to an other format. The value should remain the same. Unless the type in which the value is assigned is not enough large or adapted to contain such a number ex:
    I8 = 500;
    U32 = -1;
    But in my example all the assigned indicator are large enough.
    I have the same problem in LabVIEW 5.1.1 and 6.1
    If someone could only tell me what it is used for?
    Best regards,
    Nitrof
    Attachments:
    Type_cast.vi ‏26 KB

    The type cast function is really helpful for typecasting "unusual" data to a more convienient data format. It can also be used to coerce data, like in your example, but coercion is usually not always a good thing because it can cause bad values.
    There are lots of good examples of typecasting.
    For example, I use the typecast function to change refnums to unsigned 32 integers (U32), just so I can pass the refnums between VI's easier.
    Another VERY common typecast is if you want to display the ASCII value of a character. Run the string character "A" into a typecast, and set the output type as a Unsigned 8 bit number (U8), and you will see 0x41. Take a look at my example VI's to see what I mean.
    David
    Attachments:
    Type_cast_Example5.vi ‏16 KB
    Type_cast_Example6.vi ‏18 KB

  • Object array type casting?

    Hi. I still can't get the hang of array type casting. Is it possible to type caste an array of objects? I tried the following
    LabelledPanel[] comp = (LabelledPanel[])(content.getComponents());
    in my program and I got the ClassCastException.
    Exception occurred during event dispatching:
    java.lang.ClassCastException: [Ljava.awt.Component;
    LabelledPanel is a descendent of JPanel and getComponents() supposed to return Component[]

    java does support casting with arrays. The following code will work:
    String [] strings = new String[] { "1", "2" };
    Comparable [] comps = (Comparable[])strings;
    Object [] objects = (Object [])strings;That is, you can cast following the normal rules of assignment. You are having problems because your casting violates the normal rules of assignment- you're trying to cast a type into a differnt type that it does not extend or implement.
    the toArray() in the Collections API really has nothing to do with casting. That method converts the current Collection into an array of the same type. Since all arrays extend java.lang.Object, it returns the new array as an Object, which you then cast into the specific type.
    You may want to read the language guidlines on casting if you are having problems with it:
    http://java.sun.com/docs/books/jls/second_edition/html/jIX.fm.html
    you can also look at the documenation for Class.isAssignableFrom , which explains casting more briefly.

  • Casting primitive wrap type variable to primitive

    We have this code:
    float f = 22.2f;
    System.out.println((int)f);
    Which prints out "22".
    Float f = 22.2f;
    System.out.println((int)f);
    When i changed the variabile type from float to Float, code throw up a compile a error, that Float type cannot be casted to int. Can somebody tell me what's going on? Isnt compiler supposed to do unboxing the variable to primitive float and then primitive float to be casted to an int?
    System.out.println((int)f.floatValue());
    Isnt that what the compiler is supposed to do? Code which works perfectly fine.
    Thank for your help.

    Hello vcraescu,
    I think you are wondering why the compiler does not convert from Float to float (unboxing) and subsequently from float to short (your cast), so the bug report probably does not help you too much.
    Casts come into play when the compiler can not assure that the statement is semantically correct. The bytecode would be the same with or without the cast (if the compiler would accept omitting casts).
    Casting primitives:
    int i = 0;
    short s = (short)i;Purpose of the cast: The compiler has no idea whether the two higher bytes are relevant and you therefore need to specify that they are not.
    Casting reference types:
    With reference types there are two types of casts, the upcast and the downcast.
    class Exampe {
         public static void example(Object... objects) {
              for (Object object : objects) {
                   System.out.print(object);
                   System.out.print(' ');
              System.out.println();
         public static void main(String[] args) {
              Object[] objects = { "String", 123, 1.23 };
              example(objects);
              example((Object) objects);
    }The purpose of this (up)cast is that you want the object to be treated as beeing of a more general type.
    org.w3c.dom.Node node;
    switch(node.getNodeType()) {
         case org.w3c.dom.Node.ELEMENT_NODE:
              org.w3c.dom.Element element = (org.w3c.dom.Element) node;
         case org.w3c.dom.Node.TEXT_NODE:
              org.w3c.dom.Text element = (org.w3c.dom.Text) node;
         default:
    }These casts tell the compiler that you are certain the object node is of a more specific type.
    My point is that all these casts have a distinct purpose. Your cast on the other hand does not. Looking at your code I see a conversion from a wrapper to a primitive, not necessarily the loss of precision connected with it and that is what this cast should be about.
    With kind regards
    Ben Schulz

  • DataNavigator: numeric type cast

    I have a simple data form of jTextField1, jTextField2 and TextField3.
         jTextField1's document = nBCachedRowSet1: id (integer, primary key)
         jTextField2's document = nBCachedRowSet1: name (string type)
         jTextField3's document = nBCachedRowSet1: price (numeric type)
    I'm using DataNavigator to manipulate all records.
    The problem occured when I edit jTextField2 (name) and update it.
    The error message is ...
    ERROR: Unable to identify an operator '=' for types 'numeric' and 'double precision'
    You will have to retype this query using an explicit cast
    java.sql.SQLException: acceptChanges Failed
    at sun.jdbc.rowset.CachedRowSet.acceptChanges(CachedRowSet.java:791)
    at org.netbeans.lib.sql.NBCachedRowSet.acceptChangesInternal(NBCachedRowSet.java:712)
    This message told me to cast NUMERIC type BUT I have no idea.
    HOW to cast
    WHERE to code
    WHAT type to cast to ?

    private void initComponents() {
    connectionSource1 = new org.netbeans.lib.sql.ConnectionSource();
    try {
    nBCachedRowSet1 = new org.netbeans.lib.sql.NBCachedRowSet();
    } catch (java.sql.SQLException e1) {
    e1.printStackTrace();
    dataNavigator1 = new org.netbeans.lib.sql.DataNavigator();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();
    connectionSource1.setDatabase("jdbc:postgresql://localhost/drugstore004");
    connectionSource1.setDriver("org.postgresql.Driver");
    connectionSource1.setPassword("028a061f882763ad48ddbc977f45e2eca7c8cc685ab9", true);
    connectionSource1.setUsername("Sup");
    nBCachedRowSet1.setCommand("select * from trade");
    nBCachedRowSet1.setConnectionSource(connectionSource1);
    try {
    nBCachedRowSet1.setTableName("trade");
    } catch (java.sql.SQLException e1) {
    e1.printStackTrace();
    nBCachedRowSet1.addInsertRowListener(new org.netbeans.lib.sql.InsertRowListener() {
    public void rowInserted(javax.sql.RowSetEvent evt) {
    nBCachedRowSet1RowInserted(evt);
    addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowClosing(java.awt.event.WindowEvent evt) {
    exitForm(evt);
    dataNavigator1.setRowSet(nBCachedRowSet1);
    getContentPane().add(dataNavigator1, java.awt.BorderLayout.NORTH);
    jTable1.setModel(new org.netbeans.lib.sql.models.TableModel(nBCachedRowSet1, new org.netbeans.lib.sql.models.TableModel.Column[] {
    new org.netbeans.lib.sql.models.TableModel.Column("id", "Id", false),
    new org.netbeans.lib.sql.models.TableModel.Column("name", "Name", true),
    new org.netbeans.lib.sql.models.TableModel.Column("admin", "Admin", true),
    new org.netbeans.lib.sql.models.TableModel.Column("formular", "Formular", true),
    new org.netbeans.lib.sql.models.TableModel.Column("company", "Company", true),
    new org.netbeans.lib.sql.models.TableModel.Column("price", "Price", true),
    new org.netbeans.lib.sql.models.TableModel.Column("addiction", "Addiction", true),
    new org.netbeans.lib.sql.models.TableModel.Column("minimum", "Minimum", true),
    new org.netbeans.lib.sql.models.TableModel.Column("min_unit", "Min unit", true),
    new org.netbeans.lib.sql.models.TableModel.Column("unit_size", "Unit size", true),
    new org.netbeans.lib.sql.models.TableModel.Column("measure_unit", "Measure unit", true),
    new org.netbeans.lib.sql.models.TableModel.Column("form", "Form", true),
    new org.netbeans.lib.sql.models.TableModel.Column("shape", "Shape", true),
    new org.netbeans.lib.sql.models.TableModel.Column("life_span", "Life span", true),
    new org.netbeans.lib.sql.models.TableModel.Column("priority", "Priority", true),
    new org.netbeans.lib.sql.models.TableModel.Column("picture", "Picture", true),
    new org.netbeans.lib.sql.models.TableModel.Column("register", "Register", true),
    new org.netbeans.lib.sql.models.TableModel.Column("barcode", "Barcode", true),
    new org.netbeans.lib.sql.models.TableModel.Column("verifydate", "Verifydate", true),
    new org.netbeans.lib.sql.models.TableModel.Column("remark_ds", "Remark ds", true),
    new org.netbeans.lib.sql.models.TableModel.Column("remark_mk", "Remark mk", true),
    new org.netbeans.lib.sql.models.TableModel.Column("remark_db", "Remark db", true)
    jTable1.setSelectionModel(new org.netbeans.lib.sql.models.SQLListSelectionModel (nBCachedRowSet1));
    jScrollPane1.setViewportView(jTable1);
    getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
    pack();
    All code are created by "JDBC Application Wizard" (Sun One Studio 4 Community Edition).
    This is table "trade" structure (PostGreSQL)
    drugstore004=# \d trade
    Table "trade"
    Column | Type | Modifiers
    id | integer | not null default nextval('"trade_id_seq"'::text)
    name | character varying(255) | not null
    admin | integer | not null default 1
    formular | integer | not null default 1
    company | integer | not null default 1
    price | numeric(7,2) |
    addiction | smallint |
    minimum | smallint |
    min_unit | integer | not null default 1
    unit_size | smallint |
    measure_unit | integer | not null default 1
    form | integer | not null default 1
    shape | integer | not null default 1
    life_span | smallint |
    priority | integer | not null default 1
    picture | character varying(100) |
    register | character varying(50) |
    barcode | character varying(50) |
    verifydate | date |
    remark_ds | character varying(255) |
    remark_mk | character varying(255) |
    remark_db | character varying(255) |
    Primary key: trade_pkey
    Unique keys: trade_name_key
    Triggers: RI_ConstraintTrigger_113874,
    RI_ConstraintTrigger_113880,
    RI_ConstraintTrigger_113886,
    RI_ConstraintTrigger_113892,
    RI_ConstraintTrigger_113898,
    RI_ConstraintTrigger_113904,
    RI_ConstraintTrigger_113910,
    RI_ConstraintTrigger_113921,
    RI_ConstraintTrigger_113923,
    RI_ConstraintTrigger_113942,
    RI_ConstraintTrigger_113944,
    RI_ConstraintTrigger_113957,
    RI_ConstraintTrigger_113959,
    RI_ConstraintTrigger_113966,
    RI_ConstraintTrigger_113968
    drugstore004=#
    When I edit column "name" (some record where column "price" is null), their is not error.
    But when I edit column "name" where "price" have some price data in it, .... the same error as shown above has come.
    (No Trigger involved in this test because I just add some characters in column "name")
    Some code should be add in "RowChanged" to do some type casting for column "price" but....how?

  • Casting through JNI

    Hello everyone,
    I'm having myself a little problem. I hava a program in C++ which uses some Java classes through JNI. When i'm invoking a method on a class in Java i get back an object of some type A. But what i need in my C++ program is an object of type B so what i'm looking for is a mechanism to cast my jobject from type A to type B.
    Someone knows how to do this?
    Thanks in advance,
    Bram

    you might want to paste some source code examples in this case.
    you're java objects with be of the base jobject type in JNI/C++ - so you shouldn't need to cast. What method are you using in JNI to invoke?

Maybe you are looking for

  • A JNLP based Java application is not running on JDK/JRE 1.7

    I am planning to upgrade users to java 7 up40. The generated command line that I am calling via the Process is working find when I run using jre1.6 but it doesn't work when I call javaw via jre1.7. Very strange that if i update xbootclasspath to use

  • Text in accordionwidget 'wobbles' in the different states

    Staggered text. I cannot seem to keep the text in textboxes in place in the different states. What do I do wrong? I work with a Wacon tablet pen. Do I translocate textboxes in different states little bits unnoticed? To keep the text in place I try to

  • Can I use two apple tv's with one itunes library?

    I have been looking for a way to store my DVD's on a hard drive and watch them via my Apple TV as they are taking up too much space on my shelves. My first thought was to buy a large external hard drive and rip the dvd's using Handbrake for my stream

  • Javax midi on Windows XP pro

    I am having problems getting the default seuqnecer in the Javax.sound.midi library to play back midi files in time. I have JRE 1.4 and am using a Creative Soundblaster Live card. The timing gives the midi file a 'limp'. Does anyone have the same prob

  • How do I send someone a link so they can view my files?

    I don't understand this "free" storage.  I put some files on the cloud because I received a message about sharing file with others, but I don't see any way to do this, unless I upgrade to one of the plans.  Since I don't have a need for this often, I