Has anyone successfully implemented fetching more than one row at a time?

I ask, since I'm having problems even with the simplest of scenarios. I went all the way back to the sample code given in the documentation (listed below) and it doesn't even work! I throws a data truncated exception on the employee number (even though the field is only 4 digits!) Help?
int empno[5];
char ename[5][11];
ub2 enameLen[5];
ResultSet *resultSet = stmt->executeQuery("select empno, ename from emp");
resultSet->setDataBuffer(1, &empno, OCCIINT);
resultSet->setDataBuffer(2, ename, OCCI_SQLT_STR, sizeof(ename[0]), enameLen);
rs->next(5); // throws ORA-01406!

pass the size of the number field too.
resultSet->setDataBuffer(1, empno, OCCIINT, sizeof(empno[0]));
...

Similar Messages

  • Fetching more than one row from a table after selecting one value from the dropdown

    Hi Experts,
    How can we fetch more than one row from a table after selecting one value from the dropdown.
    The scenario is that I have some entries in the dropdown like below
      A               B               C        
    11256          VID          911256  
    11256          VID          811256
    11256          SONY      11256
    The 'B' values are there in the dropdown. I have removed the duplicate entries from the dropdown so now the dropdownlist has only two values.for eg- 'VID' and'SONY'. So now, after selecting 'VID' from the dropdown I should get all the 'C' values. After this the "C' values are to be passed to other methods to fetch some data from other tables.
    Request your help on this.
    Thanks,
    Preeetam Narkhede.

    Hi Preetam!
    I hope I understand your request proberly, since this is more about Java and less about WebDynpro, but if I'm wrong, just follow up on this.
    Supposed you have some collection of your original table data stored in variable "origin". Populate a Hashtable using the values from column "B" (let's assume it's Strings) as keys and an ArrayList of whatever "C" is (let's assume String instances, too) as value (there's a lot of ways to iterate over whatever your datasource is, and since we do not know what your datasource is, maybe you'll have to follow another approach to get b and c vaues,but the principle should remain the same):
    // Declare a private variable for your Data at the appropriate place in your code
    private Hashtable temp = new Hashtable<String, ArrayList<String>>();
    // Then, in the method you use to retrieve backend data and populate the dropdown,
    // populate the Hashtable, too
    Iterator<TableData> a = origin.iterator();
    while (a.hasNext()) {
         TableData current = a.next();
         String b = current.getB();
         String c = current.getC();
         ArrayList<String> values = this.temp.get(b);
         if (values == null) {
              values = new ArrayList<String>();
         values.add(c);
         this.temp.put(b, values);
    So after this, you'll have a Hashtable with the B values als keys and collections of C values of this particular B as value:
    VID --> (911256, 811256)
    SONY --> (11256)
    Use
    temp.keySet()
    to populate your dropdown.
    After the user selects an entry from the dropdown (let's say stored in variable selectedB), you will be able to retrieve the collection of c's from your Hashtable
    // In the metod you handle the selection event with, get the c value collection
    //and use it to select from your other table
    ArrayList<String> selectedCs = this.temp.get(selectedB);
    // now iterate over the selectedCs items and use each of these
    //to continue retrieving whatever data you need...
    for (String oneC : selectedCs) {
         // Select Data from backend using oneC in the where-Clause or whatever...
    Hope that helps
    Michael

  • DV9429 us laptop: Has anyone successful​ly added more than the stated 2 gigs maximum RAM?

    Hi, this computer works fine with Ubuntu (10.10, Unity makes it a dog ), unusably slow with Vista, and who knows about Win7.
    If you have successfully added more RAM than the 2gigs which supposedly is the max, let me know how it went. 4 gigs would make things so much better.

    We are using Microsoft SQL Server 2008 . but it's well with MySQL & JBoss

  • Deleting more than one row at a time

    Hey all,
    Im trying to be able to delete rows from my arraylist and UI table but im getting Index out of bounds exep.
    I think its because of the numbering, like counting through the i in the for loop is making it look at something different.
    Can anyone help?
    Thanks!
    selectedObjects = table.getSelectedRows();
                if (selectedObjects.length != 0)
                   for (int i = 0; i < selectedObjects.length; i++)
                        table.deleteRow(selectedObjects);
    rows.remove(selectedObjects[i]);

    I think its because of the numbering, like counting
    through the i in the for loop is making it look at
    something different.This is exactly correct.
    Personally I would look to see if those objects have a method named "clear" or "removeAll" or something like that, so you don't have to write that loop at all.
    But if you do have to write the loop, write a loop that continuously deletes the last entry until there aren't any more. This logic doesn't have the numbering problems that your code does.

  • Add more than one row at a time

    How do I add multiple rows in one step? I periodically d/l a small sheet of data and paste it into a master sheet. I have to add enough rows between the data and the summary row one at a time. Is there a quicker way?
    Geoff

    Geoff,
    Let's say that you want to add 5 rows. Select the 5 rows just above where you want to add 5 more and select Table > Add Rows Below. A number of rows equal to the number you have selected will be added.
    Jerry

  • When texting with more than one person at a time the incoming text scrolls to top of the conversation. anyone out there with the same issue?

    while texting with more than one person at a time the incoming texts scrolls to top of conversation. anyone having this issue?

    I've heard claims it can be done, claims some have done it, and claims that it didn't work for them. This thread is interesting, some indications it should be possible, complaints that it didn't, and also an interesting work-around:
    "How do I text message multiple people at once?"
    http://discussions.apple.com/click.jspa?searchID=-1&messageID=4822260
    You can ask Apple for iPhone changes via this link:
    http://www.apple.com/feedback/iphone.html
    Though if you're requesting hardware changes for iPhone v2 you may want to wait a week (or a month?)...they're probably going to be inundated right now by requests for software changes to the current iPhone.
    (If this has answered your question, please mark your original post as answered)

  • Automated row fetch returns more than one row

    Greetings All,
    Does anyone know of a way to call a page if the automated row fetch returns more than one row. I have a form with a primary and secondary key. If I search only on the primary key and there is more than one row I would like to call a popup with the multiple list, is this possible?
    Regards
    Mark

    Create a view on a table you want to update if you have more than two key values.
    However, the automated row fetch does support two key values.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • TS2755 Ever since I updated my iphone 4 to 5.1.1, I am not able to send more than one picture at a time in a text message. Does anyone know how to fix this?

    Ever since I updated my iphone 4 to 5.1.1, I am not able to send more than one picture at a time in a text message. Does anyone know how to fix this?

    Yes, I know the photos stored on the device... But which app are you accessing the photos with? Which app do you want to be able to highlight more than one pic at a time in?
    There are literally thosands of apps that access the iOS Photo Library - which one(s) are you using?

  • Has anyone ever been quoted more than $500 to replace a failed logic board?

    Has anyone ever been quoted more than $500 to replace a failed logic board? A Genius buddy of mine swears that it'll never be over $500 but I' convinced he's high out of his mind.

    I doubt it. They don't even take the same kind of RAM.
    What makes you think a replacement "will most likely go bad in the future"? Some have had to go back more than once; many haven't. (And many have not gone in at all.) There are many iBook users out there, happily iBooking away without any knowledge of the iBook Logic Board Repair Extension Program because they've never had a problem.
    Get it replaced, free, NOW, and worry about the future when it gets here.
    http://www.apple.com/support/ibook/faq/
    P.S. When you make an error in a post, there is a little edit-pencil icon next to the "Reply" icon in your post. The edit pencil stays there for about 15 minutes to allow you to edit your post. Just click on it, and it takes you back to your message box so you can edit it to your heart's content.

  • Failed to upgrade more than one table at same time

    Hi
    In Deployment Manager, I failed to upgrade more than one table at same time.
    I tried to hightlight 4 tables and set the default action as Upgrade, and click File/Generate Deploy. It passed the code generation step then I click Deploy, they are all failed with no error message.
    But they are all successful when I upgrade them one by one. Any one has any idea about this?
    For the known reason, we have no choice to do the deployment with action of 'upgrade' through OMBPlus, instead, can only do that interactively through OWB Client. I can't imagine to ask our Production side DBA to upgrade 80 tables one by one. Or I have to use the generated scripts to do the upgrade, which will resulted in 'no deploy status updated' in OWB. Any help will be very appricated.
    The version I'm using is OWB 10g.
    Thanks,
    Daming

    Hi
    First of all, Patrick's solution doesn't work for me. I didn't do cloning and there is no problem when check the WB tables.
    Second, I think your solution is only good for the developing environment just to get tables upgrade via deployment manager. In most cases, when you do a new release on PROD environment you just exp/imp the MDL file from DEV to PROD and any developing is not recommended on PROD. But your approach is trying to manually the DB, and then EDIT the mapping to do the Reconcile and then deploy. Surely you can do that if you have full control on your PROD side. However, in my situation, I have no access to the PROD for the security reason and an DBA Operator of the Client is responsible to implement my Migration process on PROD by himself.

  • How can I highlight more than one pic at a time?

    First of all, THANKS for anyone that may answer since APPLE obviously has no desire to get off their ***** and help their customers.
    About ten days ago I was prompted to install apples new operating system. So of course I clicked OK, idiot that I am!
    Now I'm stuck with this new piece of **** operating system that I wish I could uninstall.
    ANYWAY,
    I upload a lot of pix for stuff I sell on EBay, sometimes 3-400 at a time. When I delete photos it's usually 1,000 at a time, and I assure you I'm not exaggerating. Up until now I was able to touch the END pic and swipe the whole horizontal row with two fingertips and the whole row of 7 would get checked. With the new ios7 I am unable to do it anymore (yet ANOTHER reason I don't want this 'improved' OS).
    Does ANYONE know of a way to highlight more than one pic at a time?? Remember the old windows system where you could click one pic, then hit SHIFT and click a lower one and it would highlight them all, in between, for a quick delete?
    There MUST be a way to delete, or rather highlight (or CHECK) more than one pic at a time? Anyone?
    THANKS, Rich

    Yes, I know the photos stored on the device... But which app are you accessing the photos with? Which app do you want to be able to highlight more than one pic at a time in?
    There are literally thosands of apps that access the iOS Photo Library - which one(s) are you using?

  • Can't gift more than one song at a time

    Does anyone know how to gift more than one song at a time (not an album, but non-contiguous songs off one or multiple albums)?
    I tried adding them to my wishlist so I could add in several, but I already own several of the songs and you can't add songs you already own.
    Of course, this would be resolved if they would just bring back the shopping cart, but for now, I have no idea how to accomplish what should be a very simple task.

    It is, indeed, frustrating, and seems short-sighted on Apple's part. Imagine a shop owner saying, "You can buy anything you want for yourself, as many as you like, but if it's a gift, you can only buy one."
    I did receive a nice response from Apple confirming that this is, in fact, impossible to accomplish:
    Dear Michael,
    Welcome to iTunes Store Customer Support. I am Animesh and I will be assisting you today.
    Thank you for your interest in giving an iTunes Store or App Store gift. I understand that you would like to gift multiple songs from different albums. I understand that this is important for you.
    Michael, please note that you can buy a song, an album, a video, an audiobook, a TV episode or season, a movie, or an application for anyone who has a valid email address. However, there is no such option to gift multiple songs at a time from different albums. You are required to gift them individually, also the Wishlist feature is for personal usage and not gifting.
    I can realize that it must be difficult for you. I have felt the same way in the past when I've found myself in similar circumstances. I have found in situations like this that voicing your opinion is a good way to get the "ball rolling".
    Please know that Apple takes the feedback from our customers very seriously. This is the reason for our feedback page - to create a forum where our users can vent, praise or share whatever feelings they have to allow us to meet your needs, and grow as a company.
    I took the liberty of submitting your feedback to Apple on your behalf. I would also encourage you to share this link with all of your friends and family who wish to submit the feedback, and have them all submit the same request.
    Here is the link for you.
    http://www.apple.com/feedback/itunesapp.html
    I know sometimes it feels as though submitting feedback will not yield results, so I will also invite you to check out the following link. This is a letter from Apple's CEO addressing customers who purchased an iPhone very early on at $599, then the price went down to $399 shortly after. Mr. Jobs heard our customers and Apple responded accordingly.
    http://www.apple.com/hotnews/openiphoneletter/
    I hope that you will consider sharing your thoughts on the feedback page.
    Michael, we very much appreciate your concerns, and if there's anything else I can do for you, just respond to this email and let me know. Thank you for supporting the iTunes Store.
    Sincerely,
    Animesh
    iTunes Store Customer Service

  • How to delete more than one photo at a time

    Apparently there is no longer an iPhoto trash. So you don't drag photos to the trash. Instead you hit the delete key and then a second click on delete when you get the message "Are you sure you want to delete this photo." Has anyone found a way to delete more than one photo at a time, though? This is really a hassle if you have just imported 500 photos and are going to end up deleting 450 of them.

    I didn't say use the command key and delete. I use the command key for selecting random photos. Then I right click and choose delete from the contextual menu.
    I always use right click, but the command-delete does work also in that album.
    Depending on what album you are in, there are different menus. In a user created album, the right click would show "Remove from Album" & "Delete Photo". I noticed that was the same for Last Import Album. But at the same time, under image, you will only have Remove from Album. If it is a system album, you will only get the delete menu from either the right click or from the menu under Image.
    What you have to remember is if it days delete the photo, it will completely delete it from the library and all albums. If the menu says Remove From Album, then it will only be removed from the album you are in.
    In PhotoStream Album, you get only Delete Photo from the right click menu, but under image, you get only remove from album. So if you want to remove an image from PhotoStream, you have to use the top menu so it won't get deleted from the library. If you want to remove a photo completely, you would use delete and it will be removed from the library and photo stream.
    So, there are different processes for the different albums. I don't know if that is intentional or just oversight. That may change in the future.

  • Is there a datatype that allows me to store more than one item at a time

    Hello Everyone,
    Is there a datatype that allows me to store more than one item at a time , in a column in a row?
    I have to prepare a monthly account purchase system. Basically in this system a customer purchases items in an entire month as and when required on credit and then pays at the end of the month to clear the dues. So, i need to search the item from the inventory and then add it to the customer. So that when i want to see all the items purchased by a customer in the current month i get to see them. Later i calculate the bill and then ask him to pay and flushout old items which customer has purchased.
    I am having great difficulty in preparing the database.
    Please can anyone guide me! i have to finish this project in a weeks time.
    Item Database:
    SQL> desc items;
    Name Null? Type
    ITEMID VARCHAR2(10)
    ITEMCODE VARCHAR2(10)
    ITEMPRICE NUMBER(10)
    ITEMQUAN NUMBER(10)
    Customer Database:
    SQL> desc customerdb;
    Name Null? Type
    CUSTID VARCHAR2(10)
    CUSTFNAME VARCHAR2(20)
    CUSTLNAME VARCHAR2(20)
    CUSTMOBNO NUMBER(10)
    CUSTADD VARCHAR2(20)
    I need to store for every customer the items he has purchased in a month. But if i add a items purchased by a customer to the customer table entries look this.
    SQL> select * from customerdb;
    CUSTID CUSTFNAME CUSTLNAME CUSTMOBNO CUSTADD ITEM ITEMPRICE ITEMQUANTITY
    123 abc xyz 9988556677 a1/8,hill dales soap 10 1
    123 abc xyz 9988556677 " toothbrush 18 1
    I can create a itempurchase table similar to above table without columns custfname,csutlnamecustmobno,custadd
    ItemPurchaseTable :
    CUSTID ITEM ITEMPRICE ITEMQUANTITY
    123 soap 10 1
    123 toothbrush 18 1
    ill just have it as follows. But still the CUSTID FK from CustomerDB repeats for every row. I dont know how to solve this issue. Please can anyone help me.
    I need to map 1 customer to the many items he has purchased in a month.
    Edited by: Yukta Lolap on Oct 8, 2012 10:58 PM
    Edited by: Yukta Lolap on Oct 8, 2012 11:00 PM

    You must seriously read and learn about Normalization of tables; It improves your database design (at times may increase or decrease performance, subjective cases) and eases the Understanding efforts for a new person.
    See the below tables and compare to the tables you have created
    create table customers
      customer_id       number      primary key,
      fname             varchar2(50)  not null,
      mname             varchar2(50),
      lname             varchar2(50)  not null,
      join_date         date          default sysdate not null,
      is_active         char(1)     default 'N',
      constraint chk_active check (is_active in ('Y', 'N')) enable
    create table customer_address
      address_id        number      primary key,
      customer_id       number      not null,
      line_1            varchar2(100)   not null,
      line_2            varchar2(100),
      line_3            varchar2(100),
      city              varchar2(100)   not null,
      state             varchar2(100)   not null,
      zip_code          number          not null,
      is_active         char(1)         default 'N' not null,
      constraint chk_add_active check (is_active in ('Y', 'N')),
      constraint fk_cust_id foreign key (customer_id) references customers(customer_id)
    create table customer_contact
      contact_id        number      primary key,
      address_id        number      not null,
      area_code         number,
      landline          number,
      mobile            number,
      is_active         char(1)   default 'N' not null,
      constraint chk_cont_active check (is_active in ('Y', 'N'))
      constraint fk_add_id foreign key (address_id) references customer_address(address_id)
    create table inventory
      inventory_id          number        primary key,
      item_code             varchar2(25)    not null,
      item_name             varchar2(100)   not null,
      item_price            number(8, 2)    default 0,
      item_quantity         number          default 0,
      constraint chk_item_quant check (item_quantity >= 0)
    );You may have to improvise and adapt these tables according to your data and design to add or remove Columns/Constraints/Foreign Keys etc. I created them according to my understanding.
    --Edit:- Added Purchases table and sample data;
    create table purchases
      purchase_id           number        primary key,
      purchase_lot          number        unique key  not null,     --> Unique Key to map all the Purchases, at a time, for a customer
      customer_id           number        not null,
      item_code             number        not null,
      item_price            number(8,2)   not null,
      item_quantity         number        not null,
      discount              number(3,1)   default 0,
      purchase_date         date          default sysdate   not null,
      payment_mode          varchar2(20),
      constraint fk_cust_id foreign key (customer_id) references customers(customer_id)
    insert into purchases values (1, 1001, 1, 'AZ123', 653, 10, 0, sysdate, 'Cash');
    insert into purchases values (2, 1001, 1, 'AZ124', 225.5, 15, 2, sysdate, 'Cash');
    insert into purchases values (3, 1001, 1, 'AZ125', 90, 20, 3.5, sysdate, 'Cash');
    insert into purchases values (4, 1002, 2, 'AZ126', 111, 10, 0, sysdate, 'Cash');
    insert into purchases values (5, 1002, 2, 'AZ127', 100, 10, 0, sysdate, 'Cash');
    insert into purchases values (6, 1003, 1, 'AZ123', 101.25, 2, 0, sysdate, 'Cash');
    insert into purchases values (7, 1003, 1, 'AZ121', 1000, 1, 0, sysdate, 'Cash');Edited by: Purvesh K on Oct 9, 2012 12:22 PM (Added Price Column and modified sample data.)

  • PhotoSmart 2710 Printer Feeder cannot handle more than one page at a time

     1. Product Name and Number -> Photosmart 2710 Wireless All in One Printer
     2. Operating System installed (if applicable)  -> OSX 10.6 / 10.7
     3. Error message (if any)  -> None
     4. Any changes made to your system before the issue occurred -> None
    My printer works fine except that the paper feeder has difficulty feeding more than one sheet at a time.  When I put a stack of more than one sheet of paper in the feeder tray, the printer might successfully print one or two pages, but then pages will overlap (top of printed page is on one sheet, bottom on another or multiple sheets will be grabbed at the same time so only the first sheet gets printed and the others are blank.
    I do mostly standard office paper printing so no real experience with heavier pages.  I get my paper from Office Supply stores, like Staples, and brand does not seem to make a difference.  Have had same experience with Store Brands, National paper company brands and have even used HP branded paper with same results.
    I have no problems when I manually feed individual sheets to the printer  So I have essentially a single sheet printer.  Any help appreciated.
    Thank You

    Hi there,
    This article should cover the issue you are experiencing. Give the steps outlined a shot and let us know if it helps.
    Best of Luck!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

Maybe you are looking for

  • Huge Difference in FPS from OSX and windows 8

    I have a 2011 27" iMac with 6770m, 4gigs of ram, i5 (stock lower end 27")and windows 8 installed through bootcamp.  I wanted to use it for gaming only to think that it was unusable.  Recently I had realized that all I had to do was to lower the resol

  • Changing the ALV Label

    hi gurus, i hv to change the label of  field name EXNUM from AT1 to HECS in alv display... HOW I WILL DO THIS.. PLZ HELP ME iam using the code. PERFORM append_fldcat :                           USING 'EXNUM' 'T_J_1IEXCDTL' 'J_1IEXCDTL' key space no_h

  • My password is not recognised on wi-fi

    Why doesn't my iphone 4s connect to my wi-fi? The password is not recognised. I've tried switching phone off-on.

  • Pre order has not download

    I pre ordered Love is on the radio by Mcfly it came out on 24th November but it has never downloaded on any of my devices. I have been on Itunes and checked for downloads but it says there are no downloads. on the store it just says purchased and I h

  • SQL error when I execute a Bex report

    Dear All, I have a customer exit for an important BeX report. When the report runs, it throws me the below error. "ORA-01795: maximum number of expressions in a list is 1000" I understand this error and I refered note 568768 after going through the e