Set count of column in database......

hi All,
i just wanna to ask, it is possible that i can set count of column depends on data/input.
for example;
in common, when 2 column, code sql like:
String query3 = "INSERT INTO Sheet5(Rule, Weight)" + "VALUES ('"+ finalRule+"', '"+weight+"')";but if n column, how?
anybody knows or give me some idea to handle that..
thanks.

what do you means by using preparedStatement?
is it like this
String sql1 = "SELECT empno FRom emp WHERE empno = ?";
String sql2 = "INSERT INTO emp VALUES (?,?,?,?,?,?,?,?)";
PreparedStatement pstmt1 = conn.prepareStatement(sql1);
PreparedStatement pstmt2 = conn.prepareStatement(sql2);
pstmt1.setInt(1, 9999);
ResultSet rset = pstmt1.executeQuery();
     if(rset.next()){
          System.out.println("The employee");
           rset.close();
     else {
                     pstmt2.setInt(1, 99990);
     pstmt2.setString(2, "CHARLIE");
     pstmt2.setString(3, "ANALYST");
     pstmt2.setInt(4, 7566);
     pstmt2.setString(5, "01-jan-01");
     pstmt2.setFloat(6, 12000);
     pstmt2.setFloat(7, (float)10.5);
     pstmt2.setInt(8, 10);
     pstmt2.executeUpdate();
     }so, i still need to write 8 times '?' for 8 column.
but how if i don't know count of column?

Similar Messages

  • Count of columns in a query

    All,
    Could anyone please clarify me on , how we can count the column's which were used in a query.
    Ex:    SELECT ENAME, EMPNO, SAL , JOB FROM EMP; 
    --Here in the above query, I have taken 4 columns(counted manually) . Instead of counting it manually is there any other way.
    Thanks

    It sounds like you're creating dynamic SQL.  Why are you doing that?  Dynamic SQL's would seem to indicate you don't know the structure of your own database or that your application design is trying to be generic rather than being designed in proper modularized units (1 unit does 1 task, not multiple generic tasks).  99.999% of the time, people using dynamic SQL indicates that they are misusing the database or haven't designed things properly.
    If there's really a valid reason for using dynamic SQL, then of course you can do it properly and use all the features of Oracle to get information about the dynamic SQL, but that means not using something as poor as EXECUTE IMMEDIATE (which is often abused by most people), or trying to use ref cursors within PL/SQL (which are more intended for 3rd party application layers).  The power of dynamic SQL is gained from using the DBMS_SQL package... as in the following simplistic example...
    SQL> set serverout on
    SQL> create or replace procedure run_query(p_sql IN VARCHAR2) is
      2    v_v_val     varchar2(4000);
      3    v_n_val     number;
      4    v_d_val     date;
      5    v_ret       number;
      6    c           number;
      7    d           number;
      8    col_cnt     integer;
      9    f           boolean;
    10    rec_tab     dbms_sql.desc_tab;
    11    col_num     number;
    12    v_rowcount  number := 0;
    13  begin
    14    -- create a cursor
    15    c := dbms_sql.open_cursor;
    16    -- parse the SQL statement into the cursor
    17    dbms_sql.parse(c, p_sql, dbms_sql.native);
    18    -- execute the cursor
    19    d := dbms_sql.execute(c);
    20    --
    21    -- Describe the columns returned by the SQL statement
    22    dbms_sql.describe_columns(c, col_cnt, rec_tab);
    23    --
    24    -- Bind local return variables to the various columns based on their types
    25
    26    dbms_output.put_line('Number of columns in query : '||col_cnt);
    27    for j in 1..col_cnt
    28    loop
    29      case rec_tab(j).col_type
    30        when 1 then dbms_sql.define_column(c,j,v_v_val,2000); -- Varchar2
    31        when 2 then dbms_sql.define_column(c,j,v_n_val);      -- Number
    32        when 12 then dbms_sql.define_column(c,j,v_d_val);     -- Date
    33      else
    34        dbms_sql.define_column(c,j,v_v_val,2000);  -- Any other type return as varchar2
    35      end case;
    36    end loop;
    37    --
    38    -- Display what columns are being returned...
    39    dbms_output.put_line('-- Columns --');
    40    for j in 1..col_cnt
    41    loop
    42      dbms_output.put_line(rec_tab(j).col_name||' - '||case rec_tab(j).col_type when 1 then 'VARCHAR2'
    43                                                                                when 2 then 'NUMBER'
    44                                                                                when 12 then 'DATE'
    45                                                       else 'Other' end);
    46    end loop;
    47    dbms_output.put_line('-------------');
    48    --
    49    -- This part outputs the DATA
    50    loop
    51      -- Fetch a row of data through the cursor
    52      v_ret := dbms_sql.fetch_rows(c);
    53      -- Exit when no more rows
    54      exit when v_ret = 0;
    55      v_rowcount := v_rowcount + 1;
    56      dbms_output.put_line('Row: '||v_rowcount);
    57      dbms_output.put_line('--------------');
    58      -- Fetch the value of each column from the row
    59      for j in 1..col_cnt
    60      loop
    61        -- Fetch each column into the correct data type based on the description of the column
    62        case rec_tab(j).col_type
    63          when 1  then dbms_sql.column_value(c,j,v_v_val);
    64                       dbms_output.put_line(rec_tab(j).col_name||' : '||v_v_val);
    65          when 2  then dbms_sql.column_value(c,j,v_n_val);
    66                       dbms_output.put_line(rec_tab(j).col_name||' : '||v_n_val);
    67          when 12 then dbms_sql.column_value(c,j,v_d_val);
    68                       dbms_output.put_line(rec_tab(j).col_name||' : '||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'));
    69        else
    70          dbms_sql.column_value(c,j,v_v_val);
    71          dbms_output.put_line(rec_tab(j).col_name||' : '||v_v_val);
    72        end case;
    73      end loop;
    74      dbms_output.put_line('--------------');
    75    end loop;
    76    --
    77    -- Close the cursor now we have finished with it
    78    dbms_sql.close_cursor(c);
    79  END;
    80  /
    Procedure created.
    SQL> exec run_query('select empno, ename, deptno, sal from emp where deptno = 10');
    Number of columns in query : 4
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    DEPTNO - NUMBER
    SAL - NUMBER
    Row: 1
    EMPNO : 7782
    ENAME : CLARK
    DEPTNO : 10
    SAL : 2450
    Row: 2
    EMPNO : 7839
    ENAME : KING
    DEPTNO : 10
    SAL : 5000
    Row: 3
    EMPNO : 7934
    ENAME : MILLER
    DEPTNO : 10
    SAL : 1300
    PL/SQL procedure successfully completed.
    SQL>

  • Migration from 9i to 11g Transparent Gateway results in a) ORA-12704: character set mismatch b) ORA-02070: database ... does not support SYS_OP_C2C in this context

    Migration from 9i to 11g Transparent Gateway results in a) ORA-12704: character set mismatch b) ORA-02070: database ... does not support SYS_OP_C2C in this context
    What Transparent Gateway (TG) 11g configuration steps prevent the following errors?:
    a) ORA-12704: character set mismatch
    b) ORA-02070: database <DB_link_name> does not support SYS_OP_C2C in this context
    Hints:
    The current 9i TG works with the existing views and packages.  These same db objects will not compile using the new 11g TG.
    The db objects are on an Oracle 10g database linked to an SQL Server 2008 R2 database.
    Since the 9i TG works I assume a configuration to the 11g TG will get it working same as before.  But what...
    Is is something controlled by these parameters?  (Sorry, I don't know how this stuff works.  I'm the application developer.  My DBAs setup the Transparent Gateways.):
      Parameters in the Gateway Startup Shell script:
        ORA_NLS33
        NLS_LANG
      Parameters in the initsid.ora file:
        HS_LANGUAGE
        HS_NLS_DATE_FORMAT
        HS_NLS_DATE_LANGUAGE
    I'm avoiding the known workaround to refactor the VIEWS and PACKAGES to contain CAST() statements to explicitly match the data types.  A server side fix to the 11g TG is preferred. 
    Sample code:
    a) ORA-12704: character set mismatch
       ... is caused by SQL that works with my 9i TG but not with my 11g TG.  It's a snippit from my view that won't compile:
                      select status_code                  -- Oracle VARCHAR2(30)
                      from   ora_app_interfaces
                     UNION
                      select "StatusCode" as status_code  -- SQL Server NVARCHAR(30)
                      from   SqlAppInterfaces
       Example workaround that I'm avoiding:
                      select status_code
                      from   ora_app_interfaces
                     UNION
                      select CAST("StatusCode" as VARCHAR(30)) as status_code
                      from   SqlAppInterfaces
    b) ORA-02070: database <DB_link_name> does not support SYS_OP_C2C in this context
       A line of code in the procedure that compiles correctly but fails to execute:
               -- Insert into SQL Server from Oracle
               insert into PatientMedRecNum ( 
                  "PatID",         -- SQL Server INT
                  "MedRecNum",     -- SQL Server NVARCHAR(11)
                  "Hospital")      -- SQL Server NVARCHAR(30)
               values (
                  pi_pat_id,       -- Oracle NUMBER
                  pi_med_rec_num,  -- Oracle VARCHAR2
                  pi_hospital);    -- Oracle VARCHAR2
    I'd guess the errors are caused by the TG's implicit conversion between the Oracle VARCHAR2 and the SQL Server NVARCHAR... but this works fine on the 9i TG... how do I set it up to work on the 11g TG? 
    Thanks!

    Trace of 11g TG... generating errors due to lack of automatic mapping from SQL NVARCHAR to Oracle NVARCHAR, where the previous 9g TG mapped from SQL NVARCHAR to Oracle VARCHAR2.
    Oracle Corporation --- MONDAY    SEP 22 2014 13:35:08.186
    Heterogeneous Agent Release
    11.2.0.4.0
    Oracle Corporation --- MONDAY    SEP 22 2014 13:35:08.186
    Version 11.2.0.4.0
    Entered hgogprd
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "DEBUG"
    Entered hgosdip
    setting HS_OPEN_CURSORS to default of 50
    setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
    setting HS_FDS_RECOVERY_PWD to default value
    setting HS_FDS_TRANSACTION_LOG to default of HS_TRANSACTION_LOG
    setting HS_IDLE_TIMEOUT to default of 0
    setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
    setting HS_NLS_NCHAR to default of "UCS2"
    setting HS_FDS_TIMESTAMP_MAPPING to default of "DATE"
    setting HS_FDS_DATE_MAPPING to default of "DATE"
    setting HS_RPC_FETCH_REBLOCKING to default of "ON"
    setting HS_FDS_FETCH_ROWS to default of "100"
    setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
    setting HS_FDS_RSET_RETURN_ROWCOUNT to default of "FALSE"
    setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
    setting HS_FDS_MAP_NCHAR to default of "TRUE"
    setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
    setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
    setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
    setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
    setting HS_FDS_QUERY_DRIVER to default of "FALSE"
    setting HS_FDS_SUPPORT_STATISTICS to default of "TRUE"
    setting HS_FDS_QUOTE_IDENTIFIER to default of "TRUE"
    setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
    setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
    setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
    setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
    setting HS_FDS_DELAYED_OPEN to default of "TRUE"
    setting HS_FDS_WORKAROUNDS to default of "0"
    setting HS_FDS_ARRAY_EXEC to default of "TRUE"
    Exiting hgosdip, rc=0
    ORACLE_SID is "xxxDEV"
    Product-Info:
      Port Rls/Upd:4/0 PrdStat:0
    Agent:Oracle Database Gateway for MSSQL
    Facility:hsa
    Class:MSSQL, ClassVsn:11.2.0.4.0_0019, Instance:xxxDEV
    Exiting hgogprd, rc=0
    Entered hgoinit
    HOCXU_COMP_CSET=1
    HOCXU_DRV_CSET=178
    HOCXU_DRV_NCHAR=1000
    HOCXU_DB_CSET=178
    HS_LANGUAGE not specified
    rc=1239980 attempting to get LANG environment variable.
    HOCXU_SEM_VER=102000
    Entered hgolofn at 2014/09/22-13:35:08
    RC=-1 from HOSGIP for "PATH"
    Setting PATH to "C:\oracle\product\11.2.0\tg_2\dg4msql\driver\lib"
    Exiting hgolofn, rc=0 at 2014/09/22-13:35:08
    HOSGIP for "HS_OPEN_CURSORS" returned "50"
    HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
    HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
    HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
    HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
    HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
    HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
    HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
    treat_SQLLEN_as_compiled = 1
    Exiting hgoinit, rc=0 at 2014/09/22-13:35:08
    Entered hgolgon at 2014/09/22-13:35:08
    reco:0, name:abaccess, tflag:0
    Entered hgosuec at 2014/09/22-13:35:08
    uencoding=UTF16
    Entered shgosuec at 2014/09/22-13:35:08
    Exiting shgosuec, rc=0 at 2014/09/22-13:35:08
    shgosuec() returned rc=0
    Exiting hgosuec, rc=0 at 2014/09/22-13:35:08
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
    HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
    HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
    HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
    HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
    HOSGIP for "HS_FDS_DEFAULT_OWNER" returned "dbo"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    Entered hgocont at 2014/09/22-13:35:08
    HS_FDS_CONNECT_INFO = "sqlserverxxx/sqlinstancexxx/SQL_Server_2008_xxx_DEV"
    RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
    Entered hgogenconstr at 2014/09/22-13:35:08
    dsn: sqlserverxxx/sqlinstancexxx/SQL_Server_2008_xxx_DEV, name:xxx_admin
    optn:
    Entered hgocip at 2014/09/22-13:35:08
    dsn:sqlserverxxx/sqlinstancexxx/SQL_Server_2008_xxx_DEV
    Exiting hgocip, rc=0 at 2014/09/22-13:35:08
    Entered shgogohn at 2014/09/22-13:35:08
    ohn is 'OraGtw11g_home2'
    Exiting shgogohn, rc=0 at 2014/09/22-13:35:08
    RC=-1 from HOSGIP for "HS_FDS_ENCRYPT_SESSION"
    using 0 as default value for "HS_FDS_ENCRYPT_SESSION"
    RC=-1 from HOSGIP for "HS_FDS_VALIDATE_SERVER_CERT"
    using 1 as default value for "HS_FDS_VALIDATE_SERVER_CERT"
    Entered hgocont_OracleCsidToIANA at 2014/09/22-13:35:08
    Returning 2252
    Exiting hgocont_OracleCsidToIANA at 2014/09/22-13:35:08
    Exiting hgogenconstr, rc=0 at 2014/09/22-13:35:08
    Entered hgopoer at 2014/09/22-13:35:08
    hgopoer, line 231: got native error 5701 and sqlstate 01000; message follows...
    [Oracle][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Changed database context to 'Xxx_XXX_DEV'. {01000,NativeErr = 5701}[Oracle][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Changed language setting to us_english. {01000,NativeErr = 5703}
    Exiting hgopoer, rc=0 at 2014/09/22-13:35:08
    hgocont, line 2764: calling SqlDriverConnect got sqlstate 01000
    Entered hgolosf at 2014/09/22-13:35:08
    Exiting hgolosf, rc=0 at 2014/09/22-13:35:08
    DriverName:HGmsss23.dll, DriverVer:07.01.0093 (B0098, U0065)
    DBMS Name:Microsoft SQL Server, DBMS Version:10.00.2531
    Exiting hgocont, rc=0 at 2014/09/22-13:35:08 with error ptr FILE:hgocont.c LINE:2764 ID:SQLDriverConnect
    SQLGetInfo returns Y for SQL_CATALOG_NAME
    SQLGetInfo returns 128 for SQL_MAX_CATALOG_NAME_LEN
    Exiting hgolgon, rc=0 at 2014/09/22-13:35:08
    Entered hgoulcp at 2014/09/22-13:35:08
    Entered hgowlst at 2014/09/22-13:35:08
    Exiting hgowlst, rc=1 at 2014/09/22-13:35:08
    SQLGetInfo returns Y for SQL_PROCEDURES
    SQLGetInfo returns 0x1f for SQL_OWNER_USAGE
    TXN Capable:2, Isolation Option:0xf
    SQLGetInfo returns 128 for SQL_MAX_SCHEMA_NAME_LEN
    SQLGetInfo returns 128 for SQL_MAX_TABLE_NAME_LEN
    SQLGetInfo returns 134 for SQL_MAX_PROCEDURE_NAME_LEN
    HOSGIP returned value of "TRUE" for HS_FDS_QUOTE_IDENTIFIER
    SQLGetInfo returns " (0x22) for SQL_IDENTIFIER_QUOTE_CHAR
    13 instance capabilities will be uploaded
    capno:1992, context:0x0001ffff, add-info:        0
    capno:3042, context:0x00000000, add-info:        0, translation:"42"
    capno:3047, context:0x00000000, add-info:        0, translation:"57"
    capno:3049, context:0x00000000, add-info:        0, translation:"59"
    capno:3050, context:0x00000000, add-info:        0, translation:"60"
    capno:3066, context:0x00000000, add-info:        0
    capno:3067, context:0x00000000, add-info:        0
    capno:3068, context:0x00000000, add-info:        0
    capno:3069, context:0x00000000, add-info:        0
    capno:3500, context:0x00000001, add-info:       91, translation:"42"
      capno:3501, context:0x00000001, add-info:       93, translation:"57"
    capno:3502, context:0x00000001, add-info:      107, translation:"59"
    capno:3503, context:0x00000001, add-info:      110, translation:"60"
    Exiting hgoulcp, rc=0 at 2014/09/22-13:35:08
    Entered hgouldt at 2014/09/22-13:35:08
    NO instance DD translations were uploaded
    Exiting hgouldt, rc=0 at 2014/09/22-13:35:08
    Entered hgobegn at 2014/09/22-13:35:08
    tflag:0 , initial:1
    hoi:0x12ee18, ttid (len 32) is ...
      xxx
      xxx
    tbid (len 10) is ...
      0: 09000F00 0FAC1E00 010A [..........]
    Exiting hgobegn, rc=0 at 2014/09/22-13:35:08
    Entered hgodtab at 2014/09/22-13:35:08
    count:1
      table: XXX_INTERFACE
    Allocate hoada[0] @ 0000000005F58270
    Entered hgopcda at 2014/09/22-13:35:08
    Column:1(InterfaceID): dtype:2 (NUMERIC), prc/scl:20/0, nullbl:0, octet:0, sign:1, radix:10
    Exiting hgopcda, rc=0 at 2014/09/22-13:35:08
    Entered hgopcda at 2014/09/22-13:35:08
    Column:2(TableName): dtype:-9 (WVARCHAR), prc/scl:30/0, nullbl:0, octet:60, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2014/09/22-13:35:08
    Entered hgopcda at 2014/09/22-13:35:08
    Column:3(TableID): dtype:4 (INTEGER), prc/scl:10/0, nullbl:0, octet:0, sign:1, radix:10
    Exiting hgopcda, rc=0 at 2014/09/22-13:35:08
    Entered hgopcda at 2014/09/22-13:35:08
    Column:4(StatusCode): dtype:-9 (WVARCHAR), prc/scl:30/0, nullbl:0, octet:60, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2014/09/22-13:35:08
    Entered hgopcda at 2014/09/22-13:35:08
    Column:5(StatusTimestamp): dtype:93 (TIMESTAMP), prc/scl:23/3, nullbl:0, octet:0, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2014/09/22-13:35:08
    Entered hgopcda at 2014/09/22-13:35:08
    Column:6(InterfaceLog): dtype:-9 (WVARCHAR), prc/scl:400/0, nullbl:1, octet:800, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2014/09/22-13:35:08
    The hoada for table XXX_INTERFACE follows...
    hgodtab, line 1073: Printing hoada @ 0000000005F58270
    MAX:6, ACTUAL:6, BRC:1, WHT=6 (TABLE_DESCRIBE)
    hoadaMOD bit-values found (0x40:TREAT_AS_NCHAR,0x400:UNICODE_COLUMN)
    DTY NULL-OK  LEN  MAXBUFLEN   PR/SC  CST IND MOD NAME
      3 DECIMAL N         22         22 20/  0    0   0   0 InterfaceID
    12 VARCHAR N         60         60 128/ 30 1000   0 440 TableName
      4 INTEGER N          4 4   0/  0    0   0   0 TableID
    12 VARCHAR N         60         60 128/ 30 1000   0 440 StatusCode
    91 DATE N         16         16 0/  0    0   0   0 StatusTimestamp
    12 VARCHAR Y        800        800 129/144 1000   0 440 InterfaceLog
    Exiting hgodtab, rc=0 at 2014/09/22-13:35:08
    Entered hgodafr, cursor id 0 at 2014/09/22-13:35:08
    Free hoada @ 0000000005F58270
    Exiting hgodafr, rc=0 at 2014/09/22-13:35:08
    Entered hgotcis at 2014/09/22-13:35:08
    Calling SQLStatistics for XXX_INTERFACE
    IndexType=SQL_TABLE_STAT: cardinality=0
    IndexType=1: PK_XXX_Interface
    IndexType=3: IX_TableID
    IndexType=3: IX_TableName
    Calling SQLColumns for dbo.SQL_app_INTERFACE
    #1 Column "InterfaceID": dtype=2, colsize=20, decdig=0, char_octet_length=0, cumulative avg row len=15
    #2 Column "TableName": dtype=-9, colsize=30, decdig=0, char_octet_length=60, cumulative avg row len=60
    #3 Column "TableID": dtype=4, colsize=10, decdig=0, char_octet_length=0, cumulative avg row len=64
    #4 Column "StatusCode": dtype=-9, colsize=30, decdig=0, char_octet_length=60, cumulative avg row len=109
    #5 Column "StatusTimestamp": dtype=93, colsize=23, decdig=3, char_octet_length=0, cumulative avg row len=125
    #6 Column "InterfaceLog": dtype=-9, colsize=400, decdig=0, char_octet_length=800, cumulative avg row len=725
    3 Index(es) found:
      Index: PK_XXX_Interface, type=1, ASCENDING, UNIQUE, cardinality=0
    #1 Column 1: InterfaceID
      Index: IX_TableID, type=3, ASCENDING, NON-UNIQUE, cardinality=0
    #1 Column 3: TableID
      Index: IX_TableName, type=3, ASCENDING, NON-UNIQUE, cardinality=0
    #1 Column 2: TableName
    Exiting hgotcis, rc=0 at 2014/09/22-13:35:08

  • [SOLVED] Show only primary key columns in database diagrams

    Hi,
    I'd like to create a database diagram with some tables hiding all the columns that aren't primary key or foreign key.
    Currently the only way that I've found is right click on the column's name (in the table body visualized into the diagram) --> Hide selected shape
    I've found the option that permits to visualize the constraint name and (optionally) the relative fields on the same row but what I'd like is something like:
    <Table name>
    <column_name> PK
    <column_name> PK
    <column_name> FK1
    <column_name> FK2
    Do you know a way to do this?
    Many thanks
    Best regards
    Message was edited by:
    Tranen

    Hi Tranen,
    you can view the constraints and respective columns by setting the
    Table Shape Properties in the Property Inspector.
    Select (all) the tables on the Diagram you want
    In the Property Inspector,under Constraints -Set the 'Show Constraint Columns' to 'True',
    Set 'Show Constraints' to 'True' .
    Constraints (PK,UK,FK,Check)
    Also Set the 'Show Columns' option to 'False' .This will be under display options in the Property inspector.
    This should modify the Table shape in the diagram as follows:
    <Table name>
    <PK> PKName:Column1,Column2
    <UK>UKName:Column3
    <FK>FKname:Column1
    are you looking for the same?
    Thanks.

  • Possible to set a default column value to an expression?

    Hi,
    Is it possible to set a default column name to an expression when creating a table?
    For example, I wish to set the default value of a column to read from another table's column and do some arithmetic....is this possible?
    Thanks.

    Yes, you can, with trigger Before Insert for Each row
    But be carefull, you can hit the mutating table problem...

  • How to set a custom column in a workflow task.

    Hello,
    I'm looking for some assistance a bit with how to set a custom column in a Workflow Task.
    I have a List Workflow that starts when an item is created in a list. The workflow, platform type SharePoint 2013, starts a new task, Task1, with Content Type 1. This Content Type has a custom column called Age. Once the Task1 is completed a new task, Task2,
    with Content Type 2, starts and has the same column Age, as Task1.
    How can I populate the Age column in Task2 with the content of the Age column in Task1?
    Since I start the task by running "Assign a task to ..." Action I was thinking to copy the Age column from the Task1 to the list item that started Task1, which has a column Age as well, and then in Task2 to start another workflow - which is associated
    with the Content Type 2,  that would try to read the Age column from the list item that started Task2, which was set once Task1 was competed - I know it's complex but this is how I was thinking. 
    The problem with this approach is that I can't get a reference to the list item that started Task2 to read the Age from the list item.
    Is there a better approach? I use SharePoint Designer 2013 to design all this.
    Any assistance is appreciated.
    Thank you.

    Hello Sebastian,
    you can get the Age column from Task 1 and then update the Task 2 Age column with that value. I am not sure why you want to run another workflow on Task 2.
    You can perform below steps to set Age column from Task 1 to Task 2.
    1.  Create Task 1 using Assign a task , wait till the task is completed.
    2. Get the Age column value based on Task 1 once the task is completed.
    3.Create Task 2 using Assign a task ,  uncheck wait till the task is completed option.
    4. Update the Task 2 with Age column in Task1.
    5. Use Wait for the field to equal value , check for Task Status is completed or not.
    >>The problem with this approach is that I can't get a reference to the list item that started Task2 to read the Age from the list item.
    you can get the related item from task list item to get the main list item.
    Other option is, Use Javascript and CSOM  in task edit form to get the Age column from Task1 and prepoluate the Age value when Task2 is opened.
    Hope this helps.
    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

  • Error while setting up connection and adding database Tables

    Error 1
    The name 'My' does not exist in the current context
    C:\Users\levent 1\documents\visual studio 2010\Projects\DBCustomAction\DBCustomAction\VbDeployInstaller.cs
    53 37
    DBCustomAction
    Error 2
    The name 'Interaction' does not exist in the current context
    C:\Users\levent 1\documents\visual studio 2010\Projects\DBCustomAction\DBCustomAction\VbDeployInstaller.cs
    75 5
    DBCustomAction
    Error 3
    'System.Collections.Specialized.StringDictionary' does not contain a definition for 'Item' and no extension method 'Item' accepting a first argument of type 'System.Collections.Specialized.StringDictionary' could be found (are you missing a using directive
    or an assembly reference?) C:\Users\levent 1\documents\visual studio 2010\Projects\DBCustomAction\DBCustomAction\VbDeployInstaller.cs
    84 36
    DBCustomAction
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Configuration.Install;
    using System.Linq;
    using System.IO;
    using System.Reflection;
    using System.Data.SqlClient;
    namespace DBCustomAction
        [RunInstaller(true)]
        public partial class VbDeployInstaller : System.Configuration.Install.Installer
           System.Data.SqlClient.SqlConnection masterConnection = new System.Data.SqlClient.SqlConnection();
    public VbDeployInstaller() : base()
    //This call is required by the Component Designer.
    InitializeComponent();
    //Add initialization code after the call to InitializeComponent
    private string GetSql(string Name)
    try {
    // Gets the current assembly.
    Assembly Asm = Assembly.GetExecutingAssembly();
    // Resources are named using a fully qualified name.
    Stream strm = Asm.GetManifestResourceStream(Asm.GetName().Name + "." + Name);
    // Reads the contents of the embedded file.
    StreamReader reader = new StreamReader(strm);
    return reader.ReadToEnd();
    } catch (Exception ex) {
    throw ex;
    private void ExecuteSql(string DatabaseName, string Sql)
    System.Data.SqlClient.SqlCommand Command = new System.Data.SqlClient.SqlCommand(Sql, masterConnection);
    // Initialize the connection, open it, and set it to the "master" database
    masterConnection.ConnectionString = My.Settings.masterConnectionString;
    Command.Connection.Open();
    Command.Connection.ChangeDatabase(DatabaseName);
    try {
    Command.ExecuteNonQuery();
    } finally {
    // Closing the connection should be done in a Finally block
    Command.Connection.Close();
    protected void AddDBTable(string strDBName)
    try {
    // Creates the database.
    ExecuteSql("master", "CREATE DATABASE " + strDBName);
    // Creates the tables.
    ExecuteSql(strDBName, GetSql("sql.txt"));
    } catch (Exception ex) {
    // Reports any errors and abort.
        Interaction.MsgBox("In exception handler: " + ex.Message);
    throw ex;
    public override void Install(System.Collections.IDictionary stateSaver)
    base.Install(stateSaver);
    AddDBTable(this.Context.Parameters.Item("dbname"));

    Hi osmniv,
    I tested the code, it has three error when compiling.
    Error 1 The name 'My' does not exist in the current context C:\Users\levent 1\documents\visual studio 2010\Projects\DBCustomAction\DBCustomAction\VbDeployInstaller.cs 53 37 DBCustomAction
    In C#, there is no "My" key word, you need to use this method to use the settings.
    http://msdn.microsoft.com/en-us/library/aa730869(v=vs.80).aspx
    masterConnection.ConnectionString = Properties.Settings.Default.masterConnectionString;
    Error 2 The name 'Interaction' does not exist in the current context C:\Users\levent 1\documents\visual studio 2010\Projects\DBCustomAction\DBCustomAction\VbDeployInstaller.cs 75 5 DBCustomAction
    You need to add these references to the project, Microsoft.VisualBasic,
    Microsoft.Expression.Interactions AND System.Windows.Interactivity.  Right click on the project, choose the add -> reference -> choose the references.
    then, add the using statement:
    using Microsoft.VisualBasic;
    Error 3
    'System.Collections.Specialized.StringDictionary' does not contain a definition for 'Item' and no extension method 'Item' accepting a first argument of type 'System.Collections.Specialized.StringDictionary' could be found (are you missing a using directive
    or an assembly reference?) C:\Users\levent 1\documents\visual studio 2010\Projects\DBCustomAction\DBCustomAction\VbDeployInstaller.cs
    84 36
    DBCustomAction
    In C#, you could use the Parameters["dbname"] to get the indexer of element directly.
    AddDBTable(this.Context.Parameters["dbname"]);
    If you have any other concern regarding this issue, please feel free to let me know.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Set multi user column with PowerShell used to work in 2010 but no longer works in 2013

    In SharePoint 2010 I used PowerShell to set the value of multi user people columns and it worked really well.  I attempt to use the same PowerShell to set the same column type in SharePoint 2013 and it fails.
    here is the PowerShell that I use in 2010:
    $web = Get-SPWeb "http://intranet"
    $list = $web.lists["TestList"]
    $item = $list.items.add()
    $item["Title"] = "Test multi user column"
    $users = @("Domain\user1", "Domain\user2")
    $userList = new-object Microsoft.SharePoint.SPFieldUserValueCollection
    foreach($user in $users)
    $spUser = $web.EnsureUser($user)
    $userValue = new-object Microsoft.SharePoint.SPFieldUserValue($web, $spUser.ID, $spUser.Name)
    $userList.Add($userValue)
    $item["MultiUserColumn"] = $userList
    $item.update()
    I have used this on three SharePoint 2013 farms with differing results.  On two of them I receive an error when running $item.update(): Exception calling "Update" with "0" argument(s): "Invalid look-up value.  A look-up
    field contains invalid data. Please check the value and try again."
    If I take one of the users out of the $users list then it works fine, but it will not allow multiple users to be set with PowerShell.  I can use the GUI to add more than one user but not PowerShell.
    Does anyone know if these methods have changed in 2013? I haven't been able to find anyone else with this issue.
    mmm... coffee...

    Not sure but maybe something to do with casting. Below is the code snippet from one of the blogs. Try modifying your script like below and see if still you get the error
    [Microsoft.SharePoint.SPFieldUserValueCollection]$lotsofpeople = New-Object Microsoft.SharePoint.SPFieldUserValueCollection
    $user1 = $w.EnsureUser("domain\user1");
    $user1Value = New-Object Microsoft.SharePoint.SPFieldUserValue($w, $user1.Id, $user1.LoginName)
    $user2 = $w.EnsureUser("domain\user2");
    $user2Value = New-Object Microsoft.SharePoint.SPFieldUserValue($w, $user2.Id, $user2.LoginName);
    $lotsofpeople.Add($user1Value);
    $lotsofpeople.Add($user2Value);
    $i["lotsofpeoplefield"] = $lotsofpeople;
    $i.Update();
    #-or-
    $l.Fields["lotsofpeoplefield"].ParseAndSetValue($i,$lotsofpeople);
    $i.Update();
    Reference to the link
    http://social.technet.microsoft.com/wiki/contents/articles/20831.sharepoint-a-complete-guide-to-getting-and-setting-fields-using-powershell.aspx
    Geetanjali Arora | My blogs |

  • How to set the password encrytacion a database. Accdb from Visual Basic 2010 for a report. Rpl

    I want to know how to set the password encrytacion a database. Accdb from Visual Basic 2010 for a report. Rpl

    You have to connect via ODBC, then use code along the lines of what is described here:
    http://scn.sap.com/thread/3526924
    by me on March 28 and Jan on March 29.
    Also see KBA: 1686419 - SAP Crystal Reports designer does not recognize Access *.accdb file
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Save Uploaded file in BLOB column of Database

    Hey,
    Anyone knows how to save uploaded file in BLOB column of database.
    Please need help asap.
    i get following error:
    Cannot convert org.apache.myfaces.trinidadinternal.config.upload.UploadedFiles$FixFilename@1c1fc8d of type class org.apache.myfaces.trinidadinternal.config.upload.UploadedFiles$FixFilename to class oracle.jbo.domain.BlobDomain.
    Can anyone tell me what needs to be done.
    Thanks,
    Sneha

    Hi Timo,
    We are using oracle Jdeveloper Studio Edition Version 11.1.1.6.0 . logs are just showing nullpointer exception. Following errors are shown in logs:
    <ActionListenerImpl> <processAction> java.lang.NullPointerException
    javax.faces.el.EvaluationException: java.lang.NullPointerException
      at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
      at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
      at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
      at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
      at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
      at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
      at view.bean3.ImageBean.uploadFileValueChangeEvent(ImageBean.java:80)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.el.parser.AstValue.invoke(Unknown Source)
      at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
      at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
      ... 51 more
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
    javax.faces.FacesException: #{samplebean2.uploadFileValueChangeEvent}: java.lang.NullPointerException
    And one more error i get and i.e.
    XmlErrorHandler> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
    javax.servlet.ServletException: java.lang.NullPointerException
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
      at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
      at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
      at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
      at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
      at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
      at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
      at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
      ... 36 more
    Caused by: java.lang.NullPointerException
      at view.bean3.ImageBean.uploadFileValueChangeEvent(ImageBean.java:80)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.el.parser.AstValue.invoke(Unknown Source)
      at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
      at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
      ... 51 more
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Attempt to access dead view row of persistent id 17
    oracle.jbo.DeadViewRowAccessException: JBO-27102: Attempt to access dead view row of persistent id 17
    Can you help me on this one. Any other details you need let me know.

  • Can i set only 1 column in a jtable to resize?

    Hi,
    I want to set only the columns with "Strings" as content to be resizable inside my jtable. and leave those which are ints, as a fixed size, but I haven't been able to find a way of setting the resizing options for a specific column...
    any ideas?

    You would need to check the column number and the data type in the column being resized and force it back to a set value if it was not a column with a string in it. Remember the user can swap the columns.
    rykk

  • What is the procedure to set the NLS_DATE_FORMAt in the database?

    what is the procedure to set the NLS_DATE_FORMAt in the database?

    Although why rely on the NLS_DATE_FORMAT anyway? Any date formats for display purposes should be tailored into the code of the application wherever you use TO_CHAR or the application has a "date" field that allows formats to be specified (depends on the GUI).

  • Set item description (column 3) in matrix problem

    Hello there,
    I try to set field Dscription (column "3") in either Quotations or SalesOrders.
    But B1 keeps popping up with Item picker list.
    This is normal behaviour when you change this field and leave (without pressing CTRL), but how can I workaround this in SDK?
    Thanks in advance.
    Edited by: Harm van der Veen on Mar 2, 2009 11:56 AM
    Version 2007A - PL 41
    Dim oCell = DirectCast(Matrix.Columns.Item("3").Cells.Item(1), Cell)
    Dim oBox = DirectCast(oCell.Specific, EditText)
    oBox.String = "Variable Item Description"

    Thanks for the answer.
    It's not the most practical and clean method but it works for now.
    Can't Freeze Form using this method however.
    Dim oCell = DirectCast(Matrix.Columns.Item("3").Cells.Item(1), Cell)
    oCell.Click()
    MyApplication.SendKeys("Variable Item Description")
    MyApplication.SendKeys("^{TAB}")

  • SET command and column heading are not working

    Hi All,
    Am trying to create sql reports using SET and Column headings as given below.It's saying missing or invalid option.
    But when i execute this in SQL*PLUS it's working fine.. is this limitation in AE edition. Please advice.
    Also tried with sql script execution, still same problem.
    set pagesize 100;
    set linesize 80;
    column ename heading "employee name";
    select * from emp;
    Regards,
    Anil

    user575819 wrote:
    Please update your forum profile with a real handle instead of "user575819".
    Am trying to create sql reports using SET and Column headings as given below.It's saying missing or invalid option.
    But when i execute this in SQL*PLUS it's working fine.. is this limitation in AE edition. Please advice.
    Also tried with sql script execution, still same problem.
    set pagesize 100;
    set linesize 80;
    column ename heading "employee name";
    select * from emp;
    SET and COLUMN are SQL*Plus client commands, not part of the SQL language, and thus they cannot be used in APEX report queries. Consult the APEX documentation for information on creating reports. If you are unfamiliar with APEX, start with the 2 Day Developer's Guide tutorial, which covers creating APEX reports.

  • Set a particular column's Color when importing a list to Excel

    Hi all,
    I am displaying a list by using REUSE_ALV_LIST_DISPLAY.
    It works fine.Now i import this List to Excel sheet by custom program to set the formatting part and for color prospect which is not working with standard Import functionality.I am using the Methods of Interface  I_OI_SPREADSHEET.
    Now my query is that how to set a particular column's Color ?
    And how to set the width of a particular column ?
    Suggess.
    Points will be sured.
    Thanks
    Sanket sethi

    check this
    downloading my report output with the same color on my report to excel .
    Download alv output to an excel file

Maybe you are looking for

  • BPM Studio 10.3 JDBC

    Hi I have java packet with code that connects to a Oracle database (jdbc connection) which failes using BPM 10g studio. Executing this as a java main program from prompt (using same libs and same jre as in STUDIO), works Code looks like.. SolutionOff

  • Text in data grids doesn't display

    With the new 29 version of FireFox, data grids on our site don't seem to display the data in the grids any longer. When using Chrome or IE11, these still show just fine. Version 28 and earlier worked great. The menu system in our site doesn't work we

  • Primavera 8.3 API

    Hi, I have installed Primavera API on the local machine. I have an Oracle database up and running. The Demo for Primavera API works, but I cannot find the project in the database. I try to make a class(the example for this link(Primavera Integration

  • Install question

    I developed an app on the beta version of XE. I want to dowload the completed 10G version. Will I lose all the work that I have done in the beta version?

  • How to run single mping using DAC

    Hi, We have any incremental load scheduled daily.We have made some modifications to the out -of box mapping.we need to run the mapping to reflect all the changes to the existing data. is their is any way to run full load only for this mapping to refl