Oracle, Null and empty Strings

Currently I'm facing problems with a class, which contains a String, which
is set to "" (empty String).
When the class is persistent, oracle writes null to the table column
(which seems to be common oracle behaviour) and when retrieving the class,
the field is set to null as well, giving me a lot of null-pointer
exceptions.
Anyway ... I can cope with that (just a lot of extra work)
far worse is the problem, wenn searching objects, that have this field set
to "" oder null.
Oracle can't find the records because JDO creates Querys "where
string=null" or "where string=''" , where oracle expects "where string is
null" to find the records.
Is there a workaround or solution ?

Yeah, that would work as well, thx, but since I have to cope with
null-Strings now everywhere in my program, it doesn't hurt just to forbid
empty strings on the program side.
In future times I'll test on Oracle first, then porting to DB/2 - this way
I suppose work is far less to garant compability.
Nevertheless ... having to set the bankcode into quotes is a kodo bug in
my opinion.
Kodo knows the type of classfields (in this case string) and shouldn't
send the parameter as a BigDecimal to the database.
Given that, and having only bankcodes of null (only neccesary when using
Oracle), the method would look like:
public Collection getAccounts (String bankCode)
throws Exception
return getAccounts (Account.class, "bankcode=="+bankcode);
which is how a transparent persistent layer, um, should be , um , I mean
... just transparent ;-D
Marc Prud'hommeaux wrote:
Stefan-
Couldn't you just do something like:
public Collection getAccounts (String bankCode)
throws Exception
String filter;
if (bankCode == null || bankCode.length () == 0)
filter = "(bankCode == null || bankCode == "")";
else
filter = "bankCode == "" + bankCode + """;
return getAccounts (Account.class, filter);
If I understand the problem correctly, this should work for all the
databases.
In article <[email protected]>, Stefan wrote:
What operations are you performing to cause this SQL to be issued? You
say you are having trouble removing objects, but this is clearly not a
DELETE statement. Is this the SQL that is issued when looking up
objects by identity?I'm not removing objects, I was removing just quotes from parameters ;-)
A string column... is it also represented as a string field in your class?Yeah ... just to give you an impression of the code:
First we have a class, representing a bank account:
public class Account {
private AccountMgr myAccountMgr;
private String bankCode;
private String id;
Note, that in nearly all cases bankCode will be a number or null.
I have a second class "AccountMgr", which does all of the persistant stuff
(seaching, making persistent etc.)
This class has two methods, one versatile (protected) to retrieve accounts
by a given filterString and one who just returns accounts by bankCode,
building the expected filterstring. Here is my current working version:
public class AccountMgr {
public Collection getAccounts(String bankCode) throws Exception {
if (bankCode!=null) {
if (bankCode.equals("")) {
throw new Exception("check code, bankCode='' not allowed to get
same behavior from DB2 and Oracle");
// if set, quote the bankCode
bankCode="""+bankCode+""";
return getAccounts(Account.class,"bankCode=="+bankCode);
protected Collection getAccounts(Class accountClass, String filterAdd)
throws Exception {
PersistenceManager pm = MyHelper.getPersistenceManager();
String filter="";
if (filterAdd!=null && !filterAdd.trim().equals("")) {
filter+=filterAdd + " && ";
filter += "myAccountMgr==_accMgr";
Query query = pm.newQuery(accountClass, filter);
query.declareParameters("AccountMgr _accMgr");
return (Collection) query.execute(this);
As you can see, in the first method I have to set the bankCode into
quotes, when it's not null.
This is because otherwise a filter like "bankCode=1234" will be translated
in a way, where 1234 is send as a BigDecimal to the database:
[...] executing statement <4239745>: (SELECT [...] FROM JDO_ACCOUNT t0
WHERE t0.BANKCODE = ? : [reused=1;params={(BigDecimal) 1234}]
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com

Similar Messages

  • Null and empty string not being the same in object?

    Hello,
    I know that null and empty string are interpreted the same in oracle.
    However I discovered the strange behaviour concerning user defined objects:
    create or replace
    TYPE object AS OBJECT (
    value VARCHAR2(2000)
    declare
    xml xmltype;
    obj object;
    begin
    obj := object('abcd');
    xml := xmltype(obj);
    dbms_output.put_line(xml.getStringVal());
    obj.value := '';
    xml := xmltype(obj);
    dbms_output.put_line(xml.getStringVal());
    obj.value := null;
    xml := xmltype(obj);
    dbms_output.put_line(xml.getStringVal());
    end;
    When creating xml from object, all not-null fields are transformed into xml tag.
    I supposed that obj.value being either '' or null will lead to the same result.
    However this is output from Oracle 9i:
    <OBJECT_ID><VALUE>abcd</VALUE></OBJECT_ID>
    <OBJECT_ID><VALUE></VALUE></OBJECT_ID>
    <OBJECT_ID/>
    Oracle 10g behaves as expected:
    <OBJECT><VALUE>abcd</VALUE></OBJECT>
    <OBJECT/>
    <OBJECT/>
    However Oracle 9i behaviour leads me to the conclusion that oracle
    must somehow distinguish between empty string and null in user defined objects...
    Can someone clarify this behaviour?
    Thus is it possible to test if object's field is empty or null?

    However Oracle 9i behaviour leads me to the conclusion that oracle
    must somehow distinguish between empty string and null in user defined objects...
    Can someone clarify this behaviour?
    Thus is it possible to test if object's field is empty or null?A lot of "fixes" were done, relating to XML in 10g and the XML functionality of 9i was known to be buggy.
    I think you can safely assume that null and empty strings are treated the same by Oracle regardless. If you're using anything less than 10g, it's not supported any more anyway, so upgrade. Don't rely on any assumptions that may appear due to bugs.

  • VARCHAR2:: How to differnciate between NULL and empty string '' ?

    Hello to all,
    I'm looking for a possibility to differnciate between NULL and empty string '' in column of type VARCHAR2.
    I have an application relying on that there is a difference between NULL and ''.
    Is it possible to configure ORACLE in some way ?
    Thanx in advance,
    Thomas

    try check if a varchar variable has an empty string
    by checking its lengthAnd that would accomplish what? But see for yourself:
    DECLARE
      v_test VARCHAR2(10);
    BEGIN
      v_test := '';
      DBMS_OUTPUT.put_line(LENGTH(v_test));
      v_test := NULL;
      DBMS_OUTPUT.put_line(LENGTH(v_test));
    END; C.

  • Difference in Null and Empty String

    Hi,
    I have been wondering about the difference between Null and Empty String in Java. So I wrote a small program like this:
    public class CompareEmptyAndNullString {
         public static void main(String args[]) {
              String sNull = null;
              String sEmpty = "";
              try {
                   if (sNull.equalsIgnoreCase(sEmpty)) {
                        System.out.println("Null and Empty Strings are Equal");
                   } else {
                        System.out.println("Null and Empty Strings are Equal");
              } catch (Exception e) {
                   e.printStackTrace();
    This program throws Exception: java.lang.NullPointerException
         at practice.programs.CompareEmptyAndNullString.main(CompareEmptyAndNullString.java:10)
    Now if I change the IF Clause to if (sEmpty.equalsIgnoreCase(sNull)) then the Program outputs this: Null and Empty Strings are Equal
    Can anyone explain why this would happen ?
    Thanks in Advance !!

    JavaProwler wrote:
    Saish,
    Whether you do any of the following code, the JUnit Test always passes: I mean he NOT Sign doesnt make a difference ...
    assert (! "".equals(null));
    assert ("".equals(null));
    You probably have assertions turned off. Note the the assert keyword has nothing to do with JUnit tests.
    I think that older versions of JUnit, before assert was a language keyword (which started in 1.4 or 1.5), had a method called assert. Thus, if you have old-style JUnit tests, they might still compile, but the behavior is completely different from what it was in JUnit, and has nothing to do with JUnit at all.
    If you turn assertions on (-ea flag in the JVM command line, I think), the second one will throw AssertionError.

  • NULL and Empty String

    Hi There,
    As far as I know, Null is not the same as an empty string; however, when I try this out, I get some unexpected results (well, at least unexpected for my liking):
    SQL> CREATE TABLE TS (MID NUMBER,
      2  MDESC VARCHAR2(20) DEFAULT '' NOT NULL);
    Table created.
    SQL> INSERT INTO TS VALUES(1,'');
    INSERT INTO TS VALUES(1,'')
    ERROR at line 1:
    ORA-01400: cannot insert NULL into ("TT"."TS"."MDESC")So, according to the above scenario, I can't insert an empty string!! However, an empty string is a valid string that doesn't have tuples/data!!
    How come Oracle translates the null string '' as NULL?
    Thanks

    William Robertson wrote:
    There is a special case to do with CHAR values, whereby '' counts as a string and so gets blank-padded, whereas NULL does not.Are you referring to:
    SQL> DECLARE
      2      flag CHAR(2);
      3      PROCEDURE check_null (p_flag IN CHAR)
      4      IS
      5      BEGIN
      6        IF p_flag = '  '
      7        THEN
      8          dbms_output.put_line ('flag is equal to ''  ''');
      9        ELSIF p_flag IS NULL
    10        THEN
    11          dbms_output.put_line ('flag is null');
    12        ELSE
    13          dbms_output.put_line ('other');
    14        END IF;
    15      END;
    16    BEGIN
    17      flag := '';
    18      check_null (flag);
    19      flag := NULL;
    20      check_null (flag);
    21    end;
    22  /
    flag is equal to '  '
    flag is null
    PL/SQL procedure successfully completed.
    SQL> alter session set events '10932 trace name context forever, level 16384';
    Session altered.
    SQL> DECLARE
      2      flag CHAR(2);
      3      PROCEDURE check_null (p_flag IN CHAR)
      4      IS
      5      BEGIN
      6        IF p_flag = '  '
      7        THEN
      8          dbms_output.put_line ('flag is equal to ''  ''');
      9        ELSIF p_flag IS NULL
    10        THEN
    11          dbms_output.put_line ('flag is null');
    12        ELSE
    13          dbms_output.put_line ('other');
    14        END IF;
    15      END;
    16    BEGIN
    17      flag := '';
    18      check_null (flag);
    19      flag := NULL;
    20      check_null (flag);
    21    end;
    22  /
    flag is null
    flag is null
    PL/SQL procedure successfully completed.
    SQL> SY.
    P.S. Don't ask me why normal (or at least consistent) behavior is not the default.

  • More Fun with NULLs and Empty Strings

    Greetings,
    I ran across this behavior recently and thought I'd share with the forum. I'm running 10.2.0.2. Note the difference in behavior between passing and explicit NULL in the parameter vice passing an empty string (''):
    CREATE OR REPLACE PROCEDURE NULL_ES_TEST(PARAM1 IN VARCHAR2) IS
    VAR1 CHAR(1);
    BEGIN
    IF PARAM1 IS NULL THEN
    DBMS_OUTPUT.PUT_LINE('PARAM1 IS NULL');
    END IF;
    VAR1 := PARAM1;
    IF VAR1 IS NULL THEN
    DBMS_OUTPUT.PUT_LINE('VAR1 IS NULL');
    ELSE
    DBMS_OUTPUT.PUT_LINE('VAR1 IS NOT NULL');
    END IF;
    DBMS_OUTPUT.PUT_LINE('THE LENGTH OF VAR1 IS '||TO_CHAR(LENGTH(VAR1)));
    END NULL_ES_TEST;
    EXEC NULL_ES_TEST(PARAM1 => '');
    PARAM1 IS NULL
    VAR1 IS NOT NULL
    THE LENGTH OF VAR1 IS 1
    (var1 now holds a single space)
    EXEC NULL_ES_TEST(PARAM1 => NULL);
    PARAM1 IS NULL
    VAR1 IS NULL
    THE LENGTH OF VAR1 IS
    Any Comments or Insights are welcome.
    Sincerely,
    Dale Ward

    Well somethings not as expected (tested on 10.2.0.3)
    Even if you default the parameter to '', it treats null and '' differently.
    SQL> ed
    Wrote file afiedt.buf
      1  CREATE OR REPLACE PROCEDURE NULL_ES_TEST(PARAM1 IN VARCHAR2 := '') IS
      2    VAR1 CHAR(1);
      3  BEGIN
      4    IF PARAM1 IS NULL THEN
      5      DBMS_OUTPUT.PUT_LINE('PARAM1 IS NULL');
      6    END IF;
      7    VAR1 := PARAM1;
      8    IF VAR1 IS NULL THEN
      9      DBMS_OUTPUT.PUT_LINE('VAR1 IS NULL');
    10    ELSE
    11      DBMS_OUTPUT.PUT_LINE('VAR1 IS NOT NULL');
    12    END IF;
    13    DBMS_OUTPUT.PUT_LINE('THE LENGTH OF VAR1 IS '||TO_CHAR(LENGTH(VAR1)));
    14* END NULL_ES_TEST;
    SQL> /
    Procedure created.
    SQL> exec null_es_test(null);
    PARAM1 IS NULL
    VAR1 IS NULL
    THE LENGTH OF VAR1 IS
    PL/SQL procedure successfully completed.
    SQL> exec null_es_test('');
    PARAM1 IS NULL
    VAR1 IS NOT NULL
    THE LENGTH OF VAR1 IS 1
    PL/SQL procedure successfully completed.
    SQL>

  • How to distinguish NULL and Empty Strings

    Hi,
    Just to set the context right; I'm an experienced C programmer trying labview for the first time. As such I ran in to a problem being that Labview has no concept of NULL-pointers and more specifically appears to have no concept of the difference between a NULL-string and an empty-string
    I'm trying to make a structure (bundle) of strings (in it's most basic form key-value pairs) which i'd like to (for instance) URI encode in order to send it to a web server. For those who are not familiar with URI encoding; there is a distinguished difference between setting a key to an empty string and setting a key with no value. In C I would use a pointer to an empty string vs a NULL string pointer to symbolize this.
    In essence I need an elegant way to distinguish between a defined but empty string and an undefined string (hmmm this is actually describing the same problem but now in terms of perl).
    Anybody have any pointers (pun not intended) for me ?

    This is a bit depending on the interface you have with your encoder. The whole issue is that LV has no pointers at all (and you will like it, as you will never have any Null-Pointer exeptions and the like).
    Assuming that you use a dll (so the Call Library node).
    Use CString as input -> NULL-Terminated String.
    Use I32 as input and pass 0 -> NULL string.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

  • Nulls and Empty Strings

    I have an ODBC application whose backend has been changed from Access to Oracle. There is one particular query that is causing problems. The query contains a where clause with something like "field = ''" in it. This query is intended to pick up records where field is null. If the query was modified to "field is null," it would work. However, I cannot change the application.
    Is there any way to configure the ODBC driver or something so that this query would work properly? I've tried defaulting the field to '', but Oracle is still treating it as null.
    (What is really frustrating is that the application NEVER populates this field!)

    Actually, Oracle is very consistent in that it requires you to use ternary logic when dealing with null values. NULL is never equal to a value, NULL is never not equal to a value.
    select * from someTable where column <> 'value'
    will show you only those rows in someTable where column is non-NULL and where its value is not 'value'
    select count(*) from someTable !=
    select count(*) from someTable where column <> 'value' +
    select count(*) from someTable where column = 'value'
    select count(*) from someTable =
    select count(*) from someTable where column <> 'value' +
    select count(*) from someTable where column = 'value' +
    select count(*) from someTable where column IS NULL
    There are plenty of discussions in Oracle texts and in Oracle newsgroups that go into much greater detail about the how's & why's of this.
    Justin

  • What is difference between Null String and Empty String ?

    Hi
    Just i have little confusion that the difference bet'n NULL String and Empty String ..
    Please clear my doubte.
    Thankx

    For the same reason I think it's okay to say "null
    String" and "empty String "as long as you know they
    really mean "null String reference" and "empty String
    object" respectively. Crap. It's only okay to say that as long as *the one you're talking to" knows what it really means. Whether you know it or not is absolutely irrelevant. And there is hardly any ambiguity about the effects that a statement like "assign an object to a reference" brings. "Null String" differs in that way.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Plsql - store function - passing a NULL or empty string argument

    Please see the question I posed below. Does anyone have experience with passing a NULL or empty string to a store function? THANKS.
    Hi All,
    I have a function that takes in two string arrays, status_array, and gender_array. You can see the partial code below. Somehow if the value for the string array is null, the code doesn't execute properly. It should return all employees, but instead it returns nothing. Any thoughts? THANKS.
    for iii in 1 .. status_array.count loop
    v_a_list := v_a_list || '''' || status_array(iii) || ''',';
    end loop;
    v_a_list := substr(v_a_list, 1, length(trim(v_a_list)) - 1);
    for iii in 1 .. gender_array.count loop
    v_b_list := v_b_list || '''' || gender_array(iii) || ''',';
    end loop;
    v_b_list := substr(v_b_list, 1, length(trim(v_b_list)) - 1);
    IF v_a_list IS NOT NULL and v_b_list IS NOT NULL THEN
    v_sql_stmt := 'select distinct full_name from t_employee where status in (' || v_a_list || ') and gender in (' || v_b_list || ')';
    ELSIF v_a_list IS NOT NULL and v_b_list IS NULL THEN
    v_sql_stmt := 'select distinct full_name from t_employee where status in (' || v_a_list || ') ';
    ELSIF v_a_list IS NULL and v_b_list is not null THEN
    v_sql_stmt := 'select distinct full_name from t_employee where gender in (' || v_b_list || ')';
    ELSE
    v_sql_stmt := 'select distinct full_name from t_employee';
    END IF;
    OPEN v_fullname_list FOR v_sql_stmt;
    RETURN v_fullname_list;

    Not sure what version of Oracle you are using, so here's an approach that will work with many releases.
    Create a custom SQL type, so we can use an array in SQL statements (we'll do that at the end).
    create or replace type string_list is table of varchar2(100);
    /declare your A and B lists as the type we've just created
    v_a_list    string_list default string_list();
    v_b_list    string_list default string_list();populate the nested tables with non-null values
    for iii in 1 .. status_array.count
    loop
       if status_array(iii) is not null
       then
          v_a_list.extend;
          v_a_list(v_a_list.count) := status_array(iii);
       end if;
    end loop;Here you'd want to do the same for B list.
    Then finally, return the result. Using ONE single SQL statement will help a lot if this routine is called frequently, the way you had it before would require excessive parsing, which is quite expensive in an OLTP environment. Not to mention the possibility of SQL injection. Please, please, please do some reading about BIND variables and SQL injection, they are very key concepts to understand and make use of, here's an article on the topic.
    [http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1922946900346978163]
    So here we ask for the distinct list of full names where either the status and the gender qualify based on the input data, OR the array passed in had no data to restrict the query on (the array.count = 0 does this).
    OPEN v_fullname_list FOR
       select
          distinct
             full_name
       from t_employee
       where
          status in (select /*+ CARDINALITY ( A 5 ) */ column_value from table(v_a_list) A )
          or v_a_list.count = 0
       and
          gender in (select /*+ CARDINALITY ( B 5 ) */ column_value from table(v_b_list) B )
          or v_b_list.count = 0
       );Hope that helps.
    Forgot to mention the CARDINALITY hint i added in. Oracle will have no idea how many rows these arrays (which we will treat as tables) will have, so this hint tells Oracle that you expect X (5 in this case) rows. Adjust it as you need, or remove it. If you are passing in thousands of possible values, where i've assumed you will pass in only a few, you may want to reconsider using the array approach and go for a global temporary table.
    Edited by: Tubby on Dec 11, 2009 11:45 AM
    Edited by: Tubby on Dec 11, 2009 11:48 AM
    Added link about using Bind Variables.

  • Check for null and empty - Arraylist

    Hello all,
    Can anyone tell me the best procedure to check for null and empty for an arraylist in a jsp using JSTL. I'm trying something like this;
    <c:if test="${!empty sampleList}">
    </c:if>
    Help is greatly appreciated.
    Thanks,
    Greeshma...

    A null check might not be you best option.  If your requirement is you must have both the date and time component supplied in order to populate EventDate, then I would use a Script Functoid that takes data and time as parameters.
    In the C# method, first check if either is an empty string, if so return an empty string.
    If not, TryParse the data, if successful, return a valid data string for EventDate.  If not, error or return empty string, whichever satsifies the requirement.

  • The parameter 'token' cannot be a null or empty string sharepoint

    Hello ,
    I am trying to create SharePoint 2013 web app for office 365 using visual studio 2012. when i debug and run the SharePoint custom web app then it show the error ("the parameter 'token' cannot be a null or empty string") in the
    TokenHelper.cs file.
    Please help me on urgent basis.
    Mail me at : [email protected]
    Here is the screenshot in the TokenHelper.cs file.
            public static SharePointContextToken ReadAndValidateContextToken(string contextTokenString, string appHostName = null)
                JsonWebSecurityTokenHandler tokenHandler = CreateJsonWebSecurityTokenHandler();
                SecurityToken securityToken = tokenHandler.ReadToken(contextTokenString);
    In this section i get that error.
                JsonWebSecurityToken jsonToken = securityToken as JsonWebSecurityToken;

    you can go to <yoursiteurl>/_layouts/appregnew.aspx to create a new AppPrincipal, generating a client ID and client secret.  Once generated, copy the client ID from that page into your app manifest and web.config.
    http://msdn.microsoft.com/en-us/library/office/jj687469.aspx
    Check the below two links
    http://blogs.msdn.com/b/kaevans/archive/2013/04/05/inside-sharepoint-2013-oauth-context-tokens.aspx
    http://msdn.microsoft.com/en-us/library/fp179932.aspx
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • What is the difference between String Constant and Empty String Constant

    What is the difference between string constant which does not contain any value and the Empty string constant?
    While testing a VI which contain a normal string constant in VI analyzer, it gives error to change string constant with the empty string constant?
    Please Reply
    prabhakant
    Regards
    Prabhakant Patil

    Readability.
    Functionally, they are the same. From a coding standpoint, the Empty String Constant is unambiguous.
    It is empty and will always be; good for initialization. Also, because you can not type a value into and Empty String Constant, someone would need to conciously replace it to set a 'default' value that is something other than NULL.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • SharePoint 2013 - The parameter 'token' cannot be a null or empty string

    Hi all,
    I am trying to create SharePoint 2013 web app for office 365 using visual studio 2012. when I run the SharePoint web
    app then it show the error "the parameter 'token'
    cannot be a null or empty string" in the TokenHelper.cs file.
    this is the url i'm using: 
    $(function () {
    $('#exportToExcelBtn').click(function () {
    window.location = "https://xx.sharepoint.com/ENPages/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={803B55DA-B973-4EF4-92ED-F61DFD016D7C}&View={A6282A16-299E-407D-A25A-14E05AB23AE7}&CacheControl=1";
    is it good?
    I checked that key "clientID" and "cleantSecret" contains values.
    what else can it be?

    in order to authenticate the app standard token should be submitted along with the url 
    check the below url
    http://msdn.microsoft.com/en-us/library/office/jj163816(v=office.15).aspx
    This combines five other tokens. It initially resolves to SPHostUrl={HostUrl}&SPAppWebUrl={AppWebUrl}&SPLanguage={Language}&SPClientTag={ClientTag}&SPProductNumber={ProductNumber}.
    Then each of these tokens resolves. If there is no app web, the portion &SPAppWebUrl={AppWebUrl} is
    not present.
    Hope that helps|Amr Fouad|MCTS,MCPD sharePoint 2010

  • Oracle and empty strings

    Hi All,
    i'm porting my application to Oracle and i'm experiencing (big) issues since empty strings are treated as null by Oracle.
    This is a big issue for me since my application uses empty and null values as two different things (indeed they are different !!), ie, i'm not having null pointer exception, but wrong behavior.
    I'm thinking what's the best approach to follow since my appl. must work also on mysql and postgres.
    Three options at the moment:
    1. implement a jdbc wrapper that converts any empty string in something like '~'.
    2. using aspectj, add some aspects to setString/getString converting any empty string in something like '~'.
    3. buy a commercial driver that makes difference between empty and null (using aforementioned approaches ?).
    I think that this difference in Oracle is really an impediment in doing applications db neutral and I'd like to ask your opinion about the best solution (if someone already resolved it as i guess).
    Does anyone know if there are commercial jdbc driver that can help me ?
    Does anyone know how ORM frameworks (like hibernate) handle this case ?
    Thanks in advance
    ste

    jschell wrote:
    nichele wrote:
    jwenting wrote:
    If NULL really is different in your context from an empty string you're going to have to define some sequence of characters as indicating an empty string.yes, this is what i need to implement.Sounds like a flawed design then.
    I'm wondering what's the best approach in order to avoid to change all my application isolating this behavior somewhere (wrapping the jdbc driver for instance).That doesn't make much sense to me. You should already have a database layer. You change the database layer. If you don't have a database layer then that means you have another design flaw. And in that case I would really not be the one that needs to maintain that code base.I thought a bit about the value of your answer...but i didn't find it ....sorry but i don't like who replies on forum just to say bad design/bad choice etc...if you have any kind of suggestion you are welcome, otherwise you can spend your time in doing something else instead of reply to this thread.

Maybe you are looking for

  • Transfer of Data from COPA to LTP

    Dear Experts, Is there a way to transfer the data directly from COPA to LTP? Please explain. Regards Tom

  • PlatformRequest() doesn't accept "&"

    I want to open an URL , and i use platformRequest() for example platformRequest("http://www.google.co.th/search?hl=th&q=platformRequest&meta="); It open a web browser on my computer but it just connect to "http://www.google.co.th/search?hl=th" Which

  • Can't get past setup assistant after installing leopard...

    i am having trouble getting past the setup assistant after installing leopard on my other computer which is a 1.25 ghz G4 desktop. Everything seems to be going fine then the setup assistant comes up and i go through the exercise of filling it out and

  • Facetime issues mavericks

    Hi, I am responsible for converting many people from PC to Mac, telling them that upgrading the OS in Mac is eamless. And it has been for a long time. Until the Mavericks. With Mavericks I am experiencing subtle issues. But, Facetime is a big one. I

  • Constructor problems

    > 1. Create an integer to hold the suit of the card. You can use the constants that have been defined for you to represent the four suits, hearts, spades, clubs and diamonds. 2. Create an integer to hold the rank of the card. A card's rank is a numbe