Read data in the first column selected in a Multicolumn listbox

When a row is selected in a multicolumn listbox (1 item), how do I go about reading the data in the first column?
Solved!
Go to Solution.

The multicolumn listbox itself is numeric array data type. If you have allowed selection of only 1 item and selection mode of select entire row, it returns the row number. Use the "Item Names" property node to return a 2d array of strings of the items in your box. Index it by the row from the value of the listbox and column 0. See attached code.
Charles Chickering
Architecture is art with rules.
...and the rules are more like guidelines
Attachments:
MultiColumnListbox.vi ‏5 KB

Similar Messages

  • (JTable) How can i get the first columns cell in a selected row?

    Hello. I am trying to figure out how i can get the first columns cell within a selected row no matter what cell is selected in that row. I have a class that extends AbstractTableModel which represents the table. Now i have another class that extends DefaultSelectionModel. Each model is added to the JTable via setModel(TableModel dataModel), setSelectionModel(ListSelectionModel newModel). Now i don't understand what i have to return from getMaxSelectionIndex(). Any ides? Thanks.
      class xTableModel extends AbstractTableModel{
         private static String[] cols;
         private Object[][] data;
            public void setTableModel(Object data[][], String[] cols){
             this.cols = cols;
             this.data = data;
            public String getColumnName(int col){
             return cols[col];
            public int getRowCount() {
             return data.length;
            public Object getValueAt(int row, int col) {
             return data[row][col];           
            public void setValueAt(Object value,int row,int col){
             data[row][col]=value;
            public int getColumnCount(){
             return cols.length;
    class ColumnListenerModel extends DefaultListSelectionModel{
         public int getMaxSelectionIndex(){}

    int row = table.getSelectedRow();
    Object data = table.getValueAt(row, 0);

  • Locking the first column in advanced data grid on horizontal scrolling

    Hi All,
    My requirement is to freeze or lock the first column in the advanceddatagrid from scrolling on horizontal scroll event.
    The column should always remain in the left hand side of the grid.
    I tried with lockedColumnCount property of the advanced grid. But it is not working.
    Could anyone help me please with code examples

    I am able to do the above by using the method which passes
    the sort information to data provider. But now the problem I am
    facing is I cannot use event.preventDefault(); along with that
    method. If I use event.preventDefault(); then it does not show the
    descending arrow on the column, nor does it sort on multiple
    columns.
    But if I do not use event.preventDefault(); then the problem
    I am getting is it remembers the previous sort order for a
    particular column. eg. If I sorted on col A (desc)+colB and now I
    sort on colC. Again if I click on col A, the data provider sorts on
    colA ascending shows it and then the grid refreshes sorting on col
    A but in descending order.
    Does somebody know how to get around this problem?

  • All the data getting exported in the first column of csv while exporting

    Hi All,
    In 11.5.10.2, I have a page with advanced table region. Am using OA Framework's export button to export the results.
    But, problem is, All the results are getting exported in the first column of the output .csv file. Why such a behavior?
    Profile Option of 'Export MIME Type' value is text/text-separted-values.
    Any ideas would be of timely help. Thanks.
    Regards, Soorya

    From OAF standpoint, it just exports the data. Data interpretation is completely dependent on client machine and excel setups.
    Please check the Data-->Text to Columns wizard where we can specify the delimiter(s) on excel.
    Not sure if this can be set up in Apps, so that we need not change on every end-user machine.
    Hope this helps.
    -- Thanks

  • TT16060: Failed to read data from the network. select() timed out

    hi!
    i am working on active standby pair.....i created
    [activedsn]
    Driver=/d01/oracle/tt70/TimesTen/tt70/lib/libtten.so
    DataStore=/d01/oracle/tt70/TimesTen/tt70/info/activedsn
    DatabaseCharacterSet=WE8MSWIN1252
    PermSize=10
    [standbydsn]
    Driver=/d01/oracle/tt70/TimesTen/tt70/lib/libtten.so
    DataStore=/d01/oracle/tt70/TimesTen/tt70/info/standbydsn
    DatabaseCharacterSet=WE8MSWIN1252
    PermSize=10
    [sub3]
    Driver=/d01/oracle/tt70/TimesTen/tt70/lib/libtten.so
    DataStore=/d01/oracle/tt70/TimesTen/tt70/info/sub3
    DatabaseCharacterSet=WE8MSWIN1252
    PermSize=10
    replication schemes; .............all are on same hosts..........
    activedsn datastore.............
    Command> create table readtab(a number not null primary key,b varchar2(31));
    Command> insert into readtab values(101,'aaaa');
    1 row inserted.
    Command> commit;
    command>create active standby pair activedsn on "tap2.test3.com",standbydsn on "tap2.test3.com" return receipt subscriber sub3 on "tap2.test3.com";
    standbydsn datastore..........
    command>ttrepadmin -duplicate -from activedsn -host "tap2.test3.com" -uid adm -pwd adm "dsn=standbydsn";
    sub3 datastore..........
    command>ttrepadmin -duplicate -from standbydsn -host "tap2.test3.com" -uid adm -pwd adm "dsn=sub3";
    now they are working fine when i insert something from activedsn it is replicated to standbydsn and from standbydsn to sub3 ......
    problem:
    but when i test "Recovering from a failure of the standby master data store"
    i ttdestroy standbydsn..............and on activedsn i executed
    command>call ttrepstatesave('failed','standbydsn','tap2.test3.com');
    after that all updates from activedsn were replicated to sub3....in the meanwhile i again duplicated standbydsn from activedsn
    command>ttrepadmin -duplicate -from activedsn -host "tap2.test3.com" -uid adm -pwd adm "dsn=standbydsn";
    now what happens updates from activedsn are replicated to standbydsn but no updates are replicated to sub3 it is giving error
    15:24:29.29 Warn: REP: 7077: SUB3:receiver.c(1931): TT16060: Failed to read data from the network. select() timed out
    15:29:36.09 Warn: REP: 7008: STANDBYDSN:receiver.c(1931): TT16060: Failed to read data from the network. TimesTen replication agent is stopping
    replication agents for all are running.............
    please helppppp..........
    Edited by: Muhammad.Usman on Oct 13, 2009 2:57 AM
    Edited by: Muhammad.Usman on Oct 13, 2009 3:08 AM

    [timesten@tap2 bin]$ ttrepadmin -showconfig activedsn
    Self host "TAP2.TEST3.COM", port auto, name "ACTIVEDSN", LSN 0/916688, timeout 120, threshold 0
    List of subscribers
    Peer name Host name Port State Proto
    SUB3 TAP2.TEST3.COM Auto Start 24
    Last Msg Sent Last Msg Recv Latency TPS RecordsPS
    00:00:03 - -1.00 -1 -1
    Peer name Host name Port State Proto
    STANDBYDSN TAP2.TEST3.COM Auto Start 24
    Last Msg Sent Last Msg Recv Latency TPS RecordsPS
    00:00:03 00:00:04 -1.00 -1 -1
    List of objects and subscriptions
    Table details
    Table : ADM.READTAB Timestamp updates : -
    Master Name Subscriber name
    STANDBYDSN SUB3
    STANDBYDSN ACTIVEDSN
    Table details
    Table : ADM.READTAB Timestamp updates : -
    Master Name Subscriber name
    ACTIVEDSN SUB3
    ACTIVEDSN STANDBYDSN
    Datastore details
    Master Name Subscriber name
    STANDBYDSN SUB3
    STANDBYDSN ACTIVEDSN
    Datastore details
    Master Name Subscriber name
    ACTIVEDSN SUB3
    ACTIVEDSN STANDBYDSN
    [timesten@tap2 bin]$ ttrepadmin -showstatus activedsn
    Replication Agent Status as of: 2009-10-13 20:42:02
    DSN : activedsn
    Process ID : 19000 (Started)
    Replication Agent Policy : manual
    Host : TAP2.TEST3.COM
    RepListener Port : 58698 (AUTO)
    Last write LSN : 0.973840
    Last LSN forced to disk : 0.973840
    Replication hold LSN : 0.968456
    Replication Peers:
    Name : SUB3
    Host : TAP2.TEST3.COM
    Port : 58371 (AUTO) (Connected)
    Replication State : STARTED
    Communication Protocol : 24
    Name : STANDBYDSN
    Host : TAP2.TEST3.COM
    Port : 59000 (AUTO) (Connected)
    Replication State : STARTED
    Communication Protocol : 24
    TRANSMITTER thread(s):
    For : SUB3
    Start/Restart count : 6
    Send LSN : 0.971432
    Transactions sent : 2
    Total packets sent : 158
    Tick packets sent : 112
    MIN sent packet size : 48
    MAX sent packet size : 568
    AVG sent packet size : 59
    Last packet sent at : 20:42:00
    Total Packets received: 158
    MIN rcvd packet size : 48
    MAX rcvd packet size : 96
    AVG rcvd packet size : 64
    Last packet rcvd'd at : 20:42:00
    TRANSMITTER thread(s):
    For : STANDBYDSN
    Start/Restart count : 4
    Send LSN : 0.971432
    Transactions sent : 2
    Total packets sent : 106
    Tick packets sent : 84
    MIN sent packet size : 48
    MAX sent packet size : 560
    AVG sent packet size : 63
    Last packet sent at : 20:42:00
    Total Packets received: 104
    MIN rcvd packet size : 48
    MAX rcvd packet size : 96
    AVG rcvd packet size : 66
    Last packet rcvd'd at : 20:42:00
    Most recent errors (max 5):
    TT16122 in transmitter.c (line 3313) at 20:28:28 on 10-13-2009
    TT16121 in transmitter.c (line 3048) at 20:28:28 on 10-13-2009
    TT16060 in transmitter.c (line 5028) at 20:33:59 on 10-13-2009
    TT16122 in transmitter.c (line 3313) at 20:33:59 on 10-13-2009
    TT16121 in transmitter.c (line 3048) at 20:33:59 on 10-13-2009
    RECEIVER thread(s):
    For : STANDBYDSN
    Start/Restart count : 1
    Transactions received : 0
    Total packets sent : 33
    Tick packets sent : 0
    MIN sent packet size : 48
    MAX sent packet size : 68
    AVG sent packet size : 67
    Last packet sent at : 20:42:00
    Total Packets received: 33
    MIN rcvd packet size : 48
    MAX rcvd packet size : 135
    AVG rcvd packet size : 51
    Last packet rcvd'd at : 20:42:00
    [timesten@tap2 bin]$
    [timesten@tap2 bin]$ ttrepadmin -showstatus standbydsn
    Replication Agent Status as of: 2009-10-13 20:42:35
    DSN : standbydsn
    Process ID : 19102 (Started)
    Replication Agent Policy : manual
    Host : TAP2.TEST3.COM
    RepListener Port : 59000 (AUTO)
    Last write LSN : 0.1007904
    Last LSN forced to disk : 0.1007904
    Replication hold LSN : 0.1002472
    Replication Peers:
    Name : SUB3
    Host : TAP2.TEST3.COM
    Port : 58371 (AUTO) (Connected)
    Replication State : STARTED
    Communication Protocol : 24
    Name : ACTIVEDSN
    Host : TAP2.TEST3.COM
    Port : 58698 (AUTO) (Connected)
    Replication State : STARTED
    Communication Protocol : 24
    TRANSMITTER thread(s):
    For : SUB3
    Start/Restart count : 2
    Send LSN : 0.1005496
    Transactions sent : 1
    Total packets sent : 48
    Tick packets sent : 33
    MIN sent packet size : 48
    MAX sent packet size : 568
    AVG sent packet size : 65
    Last packet sent at : 20:42:30
    Total Packets received: 48
    MIN rcvd packet size : 48
    MAX rcvd packet size : 96
    AVG rcvd packet size : 64
    Last packet rcvd'd at : 20:42:30
    Most recent errors (max 5):
    TT16229 in transmitter.c (line 6244) at 20:38:01 on 10-13-2009
    TRANSMITTER thread(s):
    For : ACTIVEDSN
    Start/Restart count : 1
    Send LSN : 0.1005496
    Transactions sent : 0
    Total packets sent : 36
    Tick packets sent : 34
    MIN sent packet size : 48
    MAX sent packet size : 135
    AVG sent packet size : 50
    Last packet sent at : 20:42:30
    Total Packets received: 36
    MIN rcvd packet size : 48
    MAX rcvd packet size : 68
    AVG rcvd packet size : 67
    Last packet rcvd'd at : 20:42:30
    RECEIVER thread(s):
    For : ACTIVEDSN
    Start/Restart count : 1
    Transactions received : 1
    Total packets sent : 42
    Tick packets sent : 0
    MIN sent packet size : 48
    MAX sent packet size : 96
    AVG sent packet size : 66
    Last packet sent at : 20:42:30
    Total Packets received: 47
    MIN rcvd packet size : 48
    MAX rcvd packet size : 190
    AVG rcvd packet size : 58
    Last packet rcvd'd at : 20:42:30
    [timesten@tap2 bin]$
    [timesten@tap2 bin]$ ttrepadmin -showstatus sub3
    Replication Agent Status as of: 2009-10-13 20:43:05
    DSN : sub3
    Process ID : 18898 (Started)
    Replication Agent Policy : manual
    Host : TAP2.TEST3.COM
    RepListener Port : 58371 (AUTO)
    Last write LSN : 0.707088
    Last LSN forced to disk : 0.707088
    Replication hold LSN : -1.-1
    Replication Peers:
    Name : ACTIVEDSN
    Host : TAP2.TEST3.COM
    Port : 0 (AUTO)
    Replication State : STARTED
    Communication Protocol : 24
    Name : STANDBYDSN
    Host : TAP2.TEST3.COM
    Port : 0 (AUTO)
    Replication State : STARTED
    Communication Protocol : 24
    RECEIVER thread(s):
    For : ACTIVEDSN
    Start/Restart count : 1
    Transactions received : 0
    Total packets sent : 46
    Tick packets sent : 0
    MIN sent packet size : 48
    MAX sent packet size : 96
    AVG sent packet size : 65
    Last packet sent at : 20:43:00
    Total Packets received: 46
    MIN rcvd packet size : 48
    MAX rcvd packet size : 134
    AVG rcvd packet size : 51
    Last packet rcvd'd at : 20:43:00
    RECEIVER thread(s):
    For : STANDBYDSN
    Start/Restart count : 1
    Transactions received : 1
    Total packets sent : 45
    Tick packets sent : 0
    MIN sent packet size : 48
    MAX sent packet size : 96
    AVG sent packet size : 66
    Last packet sent at : 20:43:00
    Total Packets received: 50
    MIN rcvd packet size : 48
    MAX rcvd packet size : 190
    AVG rcvd packet size : 56
    Last packet rcvd'd at : 20:43:00
    [timesten@tap2 bin]$
    [timesten@tap2 bin]$
    Edited by: Muhammad.Usman on Oct 13, 2009 9:57 PM

  • SQL Loader Inserts chr(13) and chr(10) in the first column of every row.

    Hi,
    I have exported a data in a pipe delimited file using TOAD in one database. Now I want to load the data in my local database using SQL Loader. However every time I try to load the data a double quote followed by a new line is entered for the first column of each row. Unfortunately the delimited file is very big and hence can't be posted here. However I tried the same with a customized table and its data and found the same problem. Below are the table structures and control file that I used.
    create table test_sql
    a varchar2(30),
    b date
    insert into test_sql values('51146263',sysdate-3);
    insert into test_sql values('51146261,sysdate-1);
    EXPORTED PIPE DELIMITED FILE_
    A|B|!##!
    51146261|04/14/13 4:55:18 PM|!##!
    51146263|04/12/13 4:55:32 PM|!##!
    create table test_sql1 as select * from test_sql where 1=2;
    CONTROL FILE_
    OPTIONS(SKIP=1)
    LOAD DATA
    INFILE 'C:\Users\Prithwish\Desktop\Test.txt' "str '!##!'"
    PRESERVE BLANKS
    INTO TABLE TEST_SQL1
    FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    A CHAR(2000),
    B DATE "MM/DD/YYYY HH12:MI:SS AM"
    select * from TEST_SQL1;
    After this when I paste it in notepad I get the following result
    A B
    51146261"     14-APR-0013 16:55:18
    51146263"     12-APR-0013 16:55:32.
    I have no idea how the quotes or the newline appear. Is this a Toad bug? Any help would be greatly appreciated. Really urgent.
    Thanks in advance
    Regards

    Hi Harry,
    I actually thought that the str !##! was causing the problem. Actually my original export has some new lines in some specific columns so I can't keep the new line as my line terminator and hence I kept the !##! as my terminator.
    When I put the same data in a notepad and load it there is no problem at all. For e.g I just typed the following in a notepad and the data loaded just fine.
    A|B|!##!
    51146261|01-01-01 10:10:10 AM|!##!
    51146263|01-01-01 11:11:11 AM|!##!
    Its just when I load the exported file there the problem arises though I have verified the file using UNIX as well using octal dump and found no hidden characters.
    Regards,
    Prithwish

  • Why is my ping so high in the first column only when i do a tracert?

    When i do a tracert my ping is really high in the first column only on each hop and then it drops to a respectable level. Does anyone know why it is like this on my 4G LTE device? On my dsl when i do the same ping test its pretty even across on each hop. This is what im seeing when i do a ping test on my 4G LTE device.
    tracert www.yahoo.com
    Tracing route to ds-any-fp3-real.wa1.b.yahoo.com [98.139.183.24]
    over a maximum of 30 hops:
      1     9 ms     3 ms     3 ms 
      2  1101 ms    34 ms    38 ms  193.sub-66-174-20.myvzw.com [66.174.20.193]
      3   169 ms    55 ms    52 ms  49.sub-69-83-13.myvzw.com [69.83.13.49]
      4    52 ms    56 ms    54 ms  194.sub-69-83-13.myvzw.com [69.83.13.194]
      5   179 ms    58 ms    57 ms  101.sub-66-174-17.myvzw.com [66.174.17.101]
      6   168 ms    57 ms    60 ms  TenGigE0-0-1-0.GW14.BOS4.ALTER.NET [152.179.2.97
      7   181 ms    58 ms    57 ms  0.ge-0-3-0.XL3.BOS4.ALTER.NET [152.63.17.130]
      8   170 ms    59 ms    58 ms  0.ae3.BR1.NYC1.ALTER.NET [152.63.18.222]
      9   177 ms    67 ms    59 ms  ae11.edge2.NewYork.Level3.net [4.68.62.41]
    10     *        *        *     Request timed out.
    11     *        *        *     Request timed out.
    12     *        *        *     Request timed out.
    13   192 ms    49 ms    60 ms  ae-4-90.edge4.NewYork1.Level3.net [4.69.155.210]
    14   185 ms    51 ms    60 ms  YAHOO-INC.edge4.NewYork1.Level3.net [4.28.130.82
    15   380 ms    73 ms   129 ms  ae-5.pat2.bfz.yahoo.com [216.115.96.67]
    16   339 ms    69 ms   146 ms  ae-4.msr2.bf1.yahoo.com [216.115.100.73]
    17   215 ms   152 ms    80 ms  xe-5-0-0.clr2-a-gdc.bf1.yahoo.com [98.139.128.11
    18   289 ms   217 ms   217 ms  et-17-1.fab6-1-gdc.bf1.yahoo.com [98.139.128.47]
    19   187 ms    87 ms    79 ms  po-14.bas2-7-prd.bf1.yahoo.com [98.139.129.227]
    20   474 ms   314 ms   294 ms  ir2.fp.vip.bf1.yahoo.com [98.139.183.24]
    Trace complete.

    hi there
    see you never got an answer from vzw
    take it you still have the high ping or no ping  in my cases
    your doing better then i
    seems the lte is getting bad with this problem over time as my connection times out causing half loaded web pages  and lots of buffering in video playback
    i have had 3 tickets in the past 3 month to try and get this fixed  but they say cant find anything wrong
    and noone else is having the problem here are a few things that seems to have helped me out
    1  increase your TTL  time till live 
    this tells your computer to wait a bit longer before giving up and requesting that a packet of info be resent
    2 in your computers network settings and reg you can change packet size to a smaller number and add a stop bit to the packet with a time stamp on each packet back in the old days  this was what v 90 modems did to get v92 speeds and did help with noisy copper wire dial up and seems to help here too
    http://www.dslreports.com/drtcp
    is a tool that will help you change your computer setting and reg
    use drtcp and the results from this page
    http://www.dslreports.com/tweaks
    xp win 7 win 8 this will help.  vista did it right and dynamically change these settings on the fly and all of step 2 is unnecessary
    remember your original settings write them down so you can go back to them should you have problems
    also make a restore point and backup your reg before tinkering with windows os
    send a private message to me if you need more help  or get a computer savvy friend to help you out if you need
    3  if your signal noise is under 4G  -100bd the lower the better,  there is a way to set your android to lte only  mode.
    more likely to lose data and voice in weak signal areas but great if tethering or hotspotting at home
    dail *#*#4636#*#* this is a back door to your android software and is open source code by android os  not vzw
    and will not unlock your phone voiding warranties. be warned though if you set things wrong in here
    you can make more problems  be very sure what you change  and do one thing at a time so you remember and can  dial in again and change it back should you disable something you need. fyi each time you dial in the number it resets to vzw default setting and may look like it did not save setting but it doz. till you dial in again.
    good luck
    ron
    ps im not a vzw rep in any way other then a fellow customer not getting answers.

  • How to get the date for the first monday of each month

    Dear Members,
    How to get the date for the first monday of each month.
    I have written the following code
    SELECT decode (to_char(trunc(sysdate+30 ,'MM'),'DAY'),'MONDAY ',trunc(sysdate+30 ,'MM'),NEXT_DAY(trunc(sysdate+30 ,'MM'), 'MON')) FROM DUAL
    But it look bith complex.
    Abhishek
    Edited by: 9999999 on Mar 8, 2013 4:30 AM

    Use IW format - it will make solution NLS independent. And all you need is truncate 7<sup>th</sup> day of each month using IW:
    select  sysdate current_date,
            trunc(trunc(sysdate,'mm') + 6,'iw') first_monday_the_month
      from  dual
    CURRENT_D FIRST_MON
    08-MAR-13 04-MAR-13
    SQL> Below is list of first monday of the month for this year:
    with t as(
              select  add_months(date '2013-1-1',level-1) dt
                from  dual
                connect by level <= 12
    select  dt first_of_the_month,
            trunc(dt + 6,'iw') first_monday_the_month
      from  t
    FIRST_OF_ FIRST_MON
    01-JAN-13 07-JAN-13
    01-FEB-13 04-FEB-13
    01-MAR-13 04-MAR-13
    01-APR-13 01-APR-13
    01-MAY-13 06-MAY-13
    01-JUN-13 03-JUN-13
    01-JUL-13 01-JUL-13
    01-AUG-13 05-AUG-13
    01-SEP-13 02-SEP-13
    01-OCT-13 07-OCT-13
    01-NOV-13 04-NOV-13
    FIRST_OF_ FIRST_MON
    01-DEC-13 02-DEC-13
    12 rows selected.
    SQL> SY.

  • Is there any object in labview that contains a list of data for the user to select (selection one at a time) or add a new data?

    Is there any object in labview that contains a list of data for the user to select (selection one at a time) or add a new data?

    List and table controls -> listbox..is that what you are thinking of?
    The listbox presents the user with a list of options, and you can set it to only accept one selection at a time...Adding new data to the list can not be done directly by the user but if you make e.g. a text control and a button you can programatically insert new objects described in the text box when the button is pressed...(see example).
    If you need more than one column you have the multicolumn listbox. If you want the users to write new entries directly yu can use a table and read selected cells using it's selection start property to read what cell has been selected.
    MTO
    Attachments:
    Listbox_example.vi ‏34 KB

  • Using photoshop elements 13 for a brochure Drew the rectangle shape for the first column but when i go to use the move tool it doesnt highlite the rectangle box why?

    Using photoshop elements 13 for creating a brochure -drew the rectanle shape for the first column but when i go to the move tool it doesnt allow me to highlite this shape why?

    The faulting module is photoshop. Report below.
    Source
    Adobe Photoshop CC 2014
    Summary
    Stopped working
    Date
    2/2/2015 4:54 PM
    Status
    Report sent
    Description
    Faulting Application Path: C:\Program Files\Adobe\Adobe Photoshop CC 2014\Photoshop.exe
    Problem signature
    Problem Event Name: APPCRASH
    Application Name: Photoshop.exe
    Application Version: 15.2.2.310
    Application Timestamp: 5480338c
    Fault Module Name: Photoshop.exe
    Fault Module Version: 15.2.2.310
    Fault Module Timestamp: 5480338c
    Exception Code: c000001d
    Exception Offset: 00000000049de322
    OS Version: 6.3.9600.2.0.0.768.101
    Locale ID: 1033
    Additional Information 1: 8db4
    Additional Information 2: 8db473619c10c0c8b85ce99afe676ed8
    Additional Information 3: f06d
    Additional Information 4: f06da704bdd5338df2a8d09bde2244bb
    Extra information about the problem
    Bucket ID: 1fe6d1d4e5765bd348843b981b8ec4d2 (85990875000)

  • A question about piecewise insert(OCI), only data in the first piece ..

    When i do a piecewise insert operation, only data in the first piece was inserted into the column, There is no error occured. a OCI_SUCCESS returned when the last piece operation completed.
    I am really puzzled now:(.
    Who can get me out of this?
    The data to be insert are stored in many structs:
    typedef struct test_st{
         char * buffer;
         struct test_st * next;
    } TEST_ST;
    I use malloc(size) to allocate the buffer of each struct, and I use strcpy() to copy some strings to these buffers.
    table mc_test is like this:
    id number;
    message varchar(64);
    The full source_code goes there:
    #include <stdio.h>
    #include <unistd.h>
    #include <stdlib.h>
    #include <oci.h>
    static OCIEnv *p_env;
    static OCIError *p_err;
    static OCISvcCtx *p_svc;
    static OCIStmt *p_sql;
    static OCIDefine p_dfn    = (OCIDefine ) 0;
    static OCIBind p_bnd    = (OCIBind ) 0;
    const char * orausername="out_user";
    const char * orapassword="user_out";
    const char * oraserver="bigfish";
    int oraOK=0;
    int rc;
    char errbuf[100];
    int errcode;
    int checkerr(OCIError *errhp, sword status);
    int db_init(void);
    int db_open(void);
    int db_close(void);
    typedef struct test_st{
         char * buffer;
         struct test_st * next;
    } TEST_ST;
    int db_save_to_test(){
         char               sql_str[512];
         ub4                    typep;
         ub4                    piec_status;
         ub1                    in_outp;
         ub4                    rownum;
         ub4                    arr;
         sb2                    indp;
         ub2                    r_code;
         int                    t_buff_len;
         int                    total_len=15;
         int                    buffer_pos=0;
         TEST_ST * content, * t;
         content=(TEST_ST *) malloc(sizeof(TEST_ST));
         content->buffer= (char *) malloc(5);
         strcpy(content->buffer,"1234");
         content->next=(TEST_ST *) malloc(sizeof(TEST_ST));
         content->next->buffer= (char *) malloc(5);
         strcpy(content->next->buffer,"5678");
         content->next->next=(TEST_ST *) malloc(sizeof(TEST_ST));
         content->next->next->buffer= (char *) malloc(5);
         strcpy(content->next->next->buffer,"9012");
         content->next->next->next=NULL;
         if(!_ora_OK){
              return 0;
         printf("-------------------------\n");
         printf("[db]save to mc_test..\n");
         printf("total: %d bytes\n",total_len);
         /* create sql */
         sprintf(sql_str,"insert into mc_test(id,message)values(1,:x)");
         //printf("%s\n",sql_str);
         rc = OCIStmtPrepare(p_sql, p_err, sql_str,
              (ub4) strlen(sql_str), (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT);
         checkerr(p_err,rc);
         rc = OCIBindByPos(p_sql, &p_bnd, p_err, (ub4) 1,
                   (dvoid *) content->buffer, total_len, SQLT_CHR, (dvoid *) 0,
                   (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DATA_AT_EXEC);
         checkerr(p_err,rc);
         rc = OCIStmtExecute(p_svc, p_sql, p_err, (ub4) 1, (ub4) 0,
              (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT);
         checkerr(p_err,rc);
         if(rc == OCI_NEED_DATA){
              printf("[pw] start........\n");
              // insert next pieces
              t=content;
              printf("%d bytes total.\n",total_len);
              while(t!=NULL){
                   if(t==content){
                        piec_status=OCI_FIRST_PIECE;
                        t_buff_len=strlen(t->buffer);
                        buffer_pos=t_buff_len+1;
                        printf("ready for first piece: %d bytes\n",t_buff_len+1);
                        printf("__________________\n%s\n__________________\n",t->buffer);
                   }else if(t->next==NULL){
                        piec_status=OCI_LAST_PIECE;
                        t_buff_len=strlen(t->buffer);
                        buffer_pos+=t_buff_len+1;
                        printf("ready for last piece: %d bytes\n",t_buff_len+1);
                        printf("__________________\n%s\n__________________\n",t->buffer);
                   }else{
                        piec_status=OCI_NEXT_PIECE;
                        t_buff_len=strlen(t->buffer);
                        buffer_pos+=t_buff_len+1;
                        printf("ready for next piece: %d bytes\n",t_buff_len+1);
                        printf("__________________\n%s\n__________________\n",t->buffer);
                   t_buff_len++;
                   rc = OCIStmtSetPieceInfo((dvoid *)p_bnd,
    (ub4)OCI_HTYPE_BIND, p_err, (dvoid *)t->buffer,
    & t_buff_len, piec_status, (dvoid *) 0, &r_code);
                   checkerr(p_err,rc);
                   rc = OCIStmtExecute(p_svc, p_sql, p_err, (ub4) 1, (ub4) 0,
                        (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT);
                   checkerr(p_err,rc);
                   t=t->next;
              if(rc==OCI_SUCCESS){
                   printf("All insert OK\n");
              printf("-------------------------\n");
              return 0;
         }else if(rc==OCI_SUCCESS){
              printf("Simple inserted.\n");
              printf("-------------------------\n");
              return 1;
         }else{
              checkerr(p_err,rc);
              printf("-------------------------\n");
              return 0;
    int main(){
         db_init();
         db_open();
         db_save_to_test();
         db_close();
    int db_close(){
         rc = OCILogoff(p_svc, p_err); /* Disconnect */
         rc = OCIHandleFree((dvoid *) p_sql, OCI_HTYPE_STMT); /* Free handles */
         rc = OCIHandleFree((dvoid *) p_svc, OCI_HTYPE_SVCCTX);
         rc = OCIHandleFree((dvoid *) p_err, OCI_HTYPE_ERROR);
         oraOK=0;
         return rc;
    int db_open(){
         /* Connect to database server */
         rc = OCILogon(p_env, p_err, &p_svc, orausername, strlen(_ora_username), orapassword, strlen(_ora_password), oraserver, strlen(_ora_server));
         if (rc != 0) {
         OCIErrorGet((dvoid *)p_err, (ub4) 1, (text *) NULL, &errcode, errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
         printf("Error - %.*s\n", 512, errbuf);
         return(8);
         /* Allocate SQL */
         rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_sql,
              OCI_HTYPE_STMT, (size_t) 0, (dvoid **) 0);
         checkerr(p_err,rc);
         oraOK=1;
         return rc;
    int db_init(){
         rc = OCIInitialize((ub4) OCI_DEFAULT, (dvoid *)0, /* Initialize OCI */
              (dvoid * (*)(dvoid *, size_t)) 0,
              (dvoid * (*)(dvoid *, dvoid *, size_t))0,
              (void (*)(dvoid *, dvoid *)) 0 );
         /* Initialize evironment */
         rc = OCIEnvInit( (OCIEnv **) &p_env, OCI_DEFAULT, (size_t) 0, (dvoid **) 0 );
         /* Initialize handles */
         rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_err, OCI_HTYPE_ERROR,
              (size_t) 0, (dvoid **) 0);
         rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_svc, OCI_HTYPE_SVCCTX,
              (size_t) 0, (dvoid **) 0);
         checkerr(p_err,rc);
         return rc;
    int checkerr(OCIError *errhp, sword status){
         text errbuf[512];
         sb4 errcode = 0;
         switch(status){
              case     OCI_SUCCESS:
                        return 0; break;
              case     OCI_SUCCESS_WITH_INFO:
                        (void) printf("Error - OCI_SUCCESS_WITH_INFO\n");
                        break;
              case     OCI_NEED_DATA:
                        (void) printf("Error - OCI_NEED_DATA\n");
                        break;
              case     OCI_NO_DATA:
                        (void) printf("Error - OCI_NODATA\n");
                        break;
              case     OCI_ERROR:
                        (void) OCIErrorGet((dvoid *)errhp, (ub4) 1, (text *) NULL, &errcode,
                                       errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
                        (void) printf("Error - %.*s\n", 512, errbuf);
                        break;
              case     OCI_INVALID_HANDLE:
                        (void) printf("Error - OCI_INVALID_HANDLE\n");
                        break;
              case     OCI_STILL_EXECUTING:
                        (void) printf("Error - OCI_STILL_EXECUTE\n");
                        break;
              case     OCI_CONTINUE:
                        (void) printf("Error - OCI_CONTINUE\n");
                        break;
              default:
                        break;
         return 1;
    ref: http://www.oracle.com.cn/onlinedoc/appdev.920/a96584/oci05bnd.htm#427755

    On Windows, the Flash player plugin DLL is under C:\Windows. When everything is working correctly, Firefox finds the Flash player by checking entries under a registry key. I don't know whether this check takes place every time Firefox restarts, or at other intervals.
    Other plugins may install differently, e.g., copying a DLL into a folder under c:\Program Files (x86). It's rare for a plugin to be profile-specific.
    If your plugin list is not updating, the pluginreg.dat file that stores plugin information might be corrupted. This article has a section on how to delete that file so Firefox will regenerate it: [https://support.mozilla.org/en-US/kb/troubleshoot-issues-with-plugins-fix-problems#w_re-initializing-the-plugins-database]. Does that help?

  • [ADF Faces] set cursor position to the first column input text in ADF table

    How do i set the cursor position to the first column input text when i Insert a blank row?
    My idea is to implement using javascript. document.setfocus() but how do i do it from the backing bean code? or how do i install custom js to call document.setfocus()?
    any ideas?
    Message was edited by:
    user450391

    Did you try by iterating the selected row?
    Bind the table with the managed bean and then try with below code:
    RichTable empTable;
    RowKeySet selectedEmps = getEmpTable().getSelectedRowKeys();   
    Iterator selectedEmpIter = selectedEmps.iterator();
    DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding empIter = bindings.findIteratorBinding("EmpView1Iterator");
    RowSetIterator empRSIter = empIter.getRowSetIterator();
    while(selectedEmpIter.hasNext()){
       Key key = (Key)((List)selectedEmpIter.next()).get(0);
       Row currentRow = empRSIter.getRow(key);
       System.out.println(currentRow.getAttribute("Ename"));

  • Disabling validations if the first column is empty in an editable table

    Hi ,
    I'd want to disable validations if the first column in an editable table is empty - coz we'd assume that the user does not want to enter any data in the new row. How can this be done ?

    Hi Viren,
    It is correct that the first line for every Master Data is an empty row, if I am not wrong it derives from SEM settings.
    1.If you have some rows with 0CUST_SALES without any attribute it is because you are uploading this MAster Data with a source that does not consider compound objects: it is surely a Transactional DataSource (you do not upload Attributes). So for every Transactional record for which you do not upload also compound objects the system creates a record in your Master Data that is not correct.
    2. If you do not have Distr Channel update in Inventory Cube I think you must re-upload all your request starting from PSA. If you have deleted your PSA you can create a DataSource on your cube and feed once again your cube with its same data (built Update Rules that start from Cube and end in the same Cube). Make an upload of all your request and the delete all previous request.
    Ciao.
    Riccardo.

  • How to show Summary label it in the first column of the sheet?

    Hi Gurus,
    I am wondering if i could show the Label of summary items in the first column instead of showing it along with the Summary data. As with the long worksheets if the summary column is at far right it doesn't look good and not readable too.
    Thanks.

    Thanks NP,
    Its really not good in Discoverer. Actually what I'm saying is as follows:
    EMPID EMPNAME SALARY
    emp01 EMPNMaa 100000
    emp02 EMPNMbb 500000
    emp03 EMPNMcc 1000000
    Sum:------------------- 1600000
    But what Discoverer does right now is:
    EMPID EMPNAME SALARY
    emp01 EMPNMaa 100000
    emp02 EMPNMbb 500000
    emp03 EMPNMcc 1000000
    --------------------------- Sum:1600000
    It really looks bad & not al all a user friendly. The sum label comes always with value. I think Oracle should improve it.
    Thanks.

  • System only loading the first column from csv

    Trying to load data from Excel saved as csv, but the preview and PSA shows data loaded only for the first column from the csv file. All other columns are not loaded from the csv. Changed the lengths of the fields from the datasource to match the ones in the csv to 8, but it only seems to load the first column. What could be the cause?

    Hi
    Check the file format once and general tab in Data source(make sour you selected comma separated file and symbol)
    check below link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/01ed2fe3811a77e10000000a422035/frameset.htm
    Regards,
    Venkatesh

Maybe you are looking for

  • Error on startup of MFC application

    I have an MFC C++ application using Measurement Studio 6.0, NI-Daq 7.4.4, running on an XP Pro desktop.  The app was built with Visual Studio C++ 6.0 SP5.  When I try and execute the application from the IDE after building it without error, I get a p

  • Design View is Blank in CS5.5

    Hello, I have had problems with design view since upgrading from CS3 to CS5.5. In fact, it has never worked for me. Design View is completly white. I'm on a Mac, running OS X 10.7.3. This isn't an issue with bad code, it's all the time. I can start a

  • Multiple Selection

    hi gurus, i am urgent need of the FM used to call the multiple selection option....which we will be using in select-options. i am using like this because i cant use select-options in my existing module pool program. I could use them only in another s

  • Account and permission problems

    I have an account with iTMS which I use on my old machine. I want to deauthorize it and move iTunes onto my new laptop. Problem is I cannot remember my password and the email address I have logged as on my account is no longer active! Can I have my a

  • Problemas con el Adobe Reader y el C++

    Saludos y buen dia tengan todos. Tengo un problema desde hace unos dias y queria plantearlo aqui a ver si alguien me puede ayudar y asi ahorrarme el tener que reinstalar el sistema operativo de nuevo (Segun lei en otros foros). El problema es el sigu