Some Out-Variables are not filled when one is missing (Oracle-Client 10)

Hello everybody,
we have a problem in our applications, written in C++ using OCI.
All works fine with Oracle Client 8 and 9, the problem occurs when using Client 10.
A simple example:
select 1, 2, 3, 4, 5 from dual;
I have 4 out-variables, the 3rd one is missing:
OCIDefineByPos(..., 1, &out1, ...);
OCIDefineByPos(..., 2, &out2, ...);
OCIDefineByPos(..., 4, &out4, ...);
OCIDefineByPos(..., 5, &out5, ...);
When executing with Oracle Client 8 and 9, the result is:
out1 = 1
out2 = 2
out4 = 4
out5 = 5
Executing the same with Oracle Client 10, the result is:
out1 = 1
out2 = 2
out4 = 0
out5 = 0
When there is a selected column without a variable for it, all following out-variables are not filled. Can someone repeat and / or explain this? I read the Oracle Docs for the OCI 10, but nowhere is a hint about differences or changes in this behaviour. I know that when selecting a column I should spend an out-variable for it, but nobody is perfect.
Here are some details:
Oracle Client 10.2.0.1.0
Client OS Windows XP SP1
Oracle Database 10g Release 10.2.0.1.0
Application developed with Visual Studio C++ 7.1
Thanks for any help.
Torsten
Here's the code, I changed the simple OCI-example from the Oracle homepage:
void ocitest()
static text username = (text ) "xxx";
static text password = (text ) "yyy";
static OCIEnv *envhp;
static OCIError *errhp;
static sword status;
sword out1, out2, out3, out4, out5;
sb2 ind1, ind2, ind3, ind4, ind5; /* indicator */
static text maxemp = (text ) "SELECT 1, 2, 3, 4, 5 FROM dual ";
OCISession authp = (OCISession ) 0;
OCIServer *srvhp;
OCISvcCtx *svchp;
OCIStmt stmthp, stmthp1;
OCIDefine defnp1 = (OCIDefine ) 0;
OCIDefine defnp2 = (OCIDefine ) 0;
OCIDefine defnp3 = (OCIDefine ) 0;
OCIDefine defnp4 = (OCIDefine ) 0;
OCIDefine defnp5 = (OCIDefine ) 0;
(void) OCIInitialize((ub4) OCI_DEFAULT, (dvoid *)0,
(dvoid * (*)(dvoid *, size_t)) 0,
(dvoid * (*)(dvoid *, dvoid *, size_t))0,
(void (*)(dvoid *, dvoid *)) 0 );
(void) OCIEnvInit( (OCIEnv **) &envhp, OCI_DEFAULT, (size_t) 0,
(dvoid **) 0 );
(void) OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &errhp, OCI_HTYPE_ERROR,
(size_t) 0, (dvoid **) 0);
/* server contexts */
(void) OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &srvhp, OCI_HTYPE_SERVER,
(size_t) 0, (dvoid **) 0);
(void) OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &svchp, OCI_HTYPE_SVCCTX,
(size_t) 0, (dvoid **) 0);
(void) OCIServerAttach( srvhp, errhp, (text *)"", strlen(""), 0);
/* set attribute server context in the service context */
(void) OCIAttrSet( (dvoid *) svchp, OCI_HTYPE_SVCCTX, (dvoid *)srvhp,
(ub4) 0, OCI_ATTR_SERVER, (OCIError *) errhp);
(void) OCIHandleAlloc((dvoid *) envhp, (dvoid **)&authp,
(ub4) OCI_HTYPE_SESSION, (size_t) 0, (dvoid **) 0);
(void) OCIAttrSet((dvoid *) authp, (ub4) OCI_HTYPE_SESSION,
(dvoid *) username, (ub4) strlen((char *)username),
(ub4) OCI_ATTR_USERNAME, errhp);
(void) OCIAttrSet((dvoid *) authp, (ub4) OCI_HTYPE_SESSION,
(dvoid *) password, (ub4) strlen((char *)password),
(ub4) OCI_ATTR_PASSWORD, errhp);
checkerr(errhp, OCISessionBegin ( svchp, errhp, authp, OCI_CRED_RDBMS,
(ub4) OCI_DEFAULT));
(void) OCIAttrSet((dvoid *) svchp, (ub4) OCI_HTYPE_SVCCTX,
(dvoid *) authp, (ub4) 0,
(ub4) OCI_ATTR_SESSION, errhp);
checkerr(errhp, OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &stmthp,
OCI_HTYPE_STMT, (size_t) 0, (dvoid **) 0));
checkerr(errhp, OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &stmthp1,
OCI_HTYPE_STMT, (size_t) 0, (dvoid **) 0));
checkerr(errhp, OCIStmtPrepare(stmthp, errhp, maxemp,
(ub4) strlen((char *) maxemp),
(ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT));
checkerr(errhp, OCIDefineByPos(stmthp, &defnp1, errhp, 1, (dvoid *) &out1,
(sword) sizeof(sword), SQLT_INT, (dvoid *) &ind1, (ub2 *)0,
(ub2 *)0, OCI_DEFAULT));
checkerr(errhp, OCIDefineByPos(stmthp, &defnp2, errhp, 2, (dvoid *) &out2,
(sword) sizeof(sword), SQLT_INT, (dvoid *) &ind2, (ub2 *)0,
(ub2 *)0, OCI_DEFAULT));
/* checkerr(errhp, OCIDefineByPos(stmthp, &defnp3, errhp, 3, (dvoid *) &out3,
(sword) sizeof(sword), SQLT_INT, (dvoid *) &ind3, (ub2 *)0,
(ub2 *)0, OCI_DEFAULT));*/
checkerr(errhp, OCIDefineByPos(stmthp, &defnp4, errhp, 4, (dvoid *) &out4,
(sword) sizeof(sword), SQLT_INT, (dvoid *) &ind4, (ub2 *)0,
(ub2 *)0, OCI_DEFAULT));
checkerr(errhp, OCIDefineByPos(stmthp, &defnp5, errhp, 5, (dvoid *) &out5,
(sword) sizeof(sword), SQLT_INT, (dvoid *) &ind5, (ub2 *)0,
(ub2 *)0, OCI_DEFAULT));
/* execute and fetch */
if (status = OCIStmtExecute(svchp, stmthp, errhp, (ub4) 1, (ub4) 0,
(CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT))
if (status == OCI_NO_DATA)
else
checkerr(errhp, status);
void checkerr(OCIError *errhp, sword status)
text errbuf[512];
sb4 errcode = 0;
switch (status)
case OCI_SUCCESS:
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;
}

Use int/long instead sword .

Similar Messages

  • Some paragraph tags are not printing when document is printed from Framemaker 10.

    So this is really odd. I have a situation where I have a document that I am developing in Framemaker 10 several different paragraph tags are intermittently not printing when the document is physically printed. When I go to print the document from Framemaker 10 to a physical piece of paper some tags are printing partially or not at all. What makes this stranger to me is that when I print the document to a PDF, all of the content and tags show up in the PDF. Then when I try to physically print from the PDF, the tags do no print from that document as well.
    Typically the tags that are not printing are those that have been bolded, but are across several different tags. Also the problem is sometimes only to the first line of a tag, where if the tag carries over to a second line in the document, the text on the second line prints. Another quirky instance that shows up is where the text a line will print only parts of the text. The document uses the same type font for the entire document, Helvetica 55 Roman. The font size varies and the coloring varies as well, but this issue is happening for all sizes and colors.
    I'm not sure what additional information is important here, but if you need additional information please request it and I will supply it to the best of my ability. I'm a content developer with an intermediate amount of experience with Framemaker.

    I'm not sure if this is the same problem, and you didn't mention your
    OS, but there was a widespread problem with dropped text in PDF with
    Windows XP. A hotfix was issued to fix it. If on Windows XP, you should
    install it:
    http://blogs.adobe.com/techcomm/2008/07/hotfix_for_framemaker_1.html
    Also, you mentioned that it was "bolded" text that tended to have the
    problem. Bolded text is artificially bold and does not use actual bold
    fonts. (If I recall, text is double printed at a slight offset to give
    the appearance of a bold font.) So there is no bold font to embed. Be
    sure you install and use an actual bold font, rather than using the
    bolded characteristic, or you could see problems.
    This is a stretch, but you also mentioned that some of the problem
    sections have colored text. Check the printer properties of your Adobe
    PDF virtual printer to make sure someone didn't reassign the driver (on
    the Advanced tab). It should be set to use the Adobe PDF Converter
    driver (or Acrobat Distiller in older Acrobat versions). Years ago,
    people sometimes changed this setting to use other drivers for various
    reasons, not realizing that they limited themselves to the capabilities
    of that driver. So, if they chose an HP LaserJet PostScript driver, for
    example, their documents might no longer be able to be 11"x17" or
    color-- because the printer couldn't handle it. The driver was limited
    to 8.5"x14" and black-and-white. Perhaps there is a driver set that is
    choking on the colored text-- though I would think it would merely
    convert it to B&W.
    Okay, I've grasped at enough straws.

  • Some software instruments are not working when midi controller is plugged in for logic pro x

    So I have made a track and I have been using my midi controller. Some instruments work when i record on the track. But if i change to some other instrument i.e. the vintage organs, then it won't work. I have bypassed all control surfaces and it still hasn't worked.

    Some of the vintage organ patches use different Midi channels.....other than Chan 1 for other registers... Example Chan 3 might be used for the pedals... and Chan 2 might be used for the lower keyboard/register of the organ...
    Check your keyboard to see what Midi channel it is actually transmitting on and set it accordingly....

  • Queue alerts container variables are not getting filled

    Hi All,
    I am referring this blog to create alerts when message struck in queues
    /people/santhosh.kumarv/blog/2009/05/19/sap-xipi-alerts-for-queue-errors
    I am able to get the alert when a message struck in Queue of XI. But Container variables are not filled with actual run time values
    I have used the report as it is and container variables as described in blog.
    I have implemented Alerts for IE & AE alerts, those are looks good as expected.
    Please let me know any clue
    Regards

    Hi,
    After investigating all the things i found these
    1) We have already Integration Engine & Adapter Engine Alerts configured in landscape with separate alert categories & working fine
    2) Now i configured one more alert category for Queue error with the above mentioned Blog
    Important thing: is even though if any error occurred on Integration engine, i get 2 alerts. one with Integration Engine alert category description  & one more is with Queue alert category description
    Reason for this is, for Queue alert category i selected radio button as "No Restriction". because of this if any IE error occurred also queue alert category is also triggering along with Integration engine alert category .
    Please let me know is it possible to implement Queue alerts along with the IE & AE type alert categories
    Any one implemented IE, AE & Queue alerts in single landscape
    Regards
    vamsi
    Edited by: Vamsi Krishna on Jul 19, 2010 4:53 PM

  • ALert Cat- Conatainer Elements are not filled

    Hi I am raising an Alert using a UDF by calling SALERT_CREATE FM in my mapping, and I have defined the Container Elements SXMS_MSG_GUID & SXMS_ERROR_CODE in the ALERTCATDEF,But when the Alert is raised, these Variables are not filled, It says <SXMS_ERROR_CODE>no error code found....any pointers on this... its a Non-BPM scenario.Thank you.

    Hi John,
    Which Service Pack are you in currently.
    You should not type the container elements.  There is an icon where you can fetch it.  Also check the corresponding data type for the container element.  If you are using a wrong data type, which is not valid for that container element, you might face problems.
    Check Note : 947738 to solve this issue.   Also check Troubleshooting Note specifically 913858.
    Regards.
    Praveen

  • I have Prem. Elements 12.  I am trying to add audio media.  I know where the audio files are located (using GET INFO while in iTunes), and when I try to add certain audio files, some are accepted and some are not.  In one case, when I opened a particular

    I have Prem. Elements 12.  I am trying to add audio media.  I know where the audio files are located (using GET INFO while in iTunes), and when I try to add certain audio files, some are accepted and some are not.  In one case, when I opened a particular folder, the song was not listed, even tho' the song is there when using Windows Explorer.  This happens with mp3 and mp4 and just wav files.  Some audio are accepted, most are not.  I get that codec is not installed error message, too.

    Perhaps it would be helpful for you to view the page source code of this page
    http://www.alanwork.com/
    As you can see, the submenu code links are immediately below the top level code, and are
    wrapped in their own  <UL> </UL> tag pairs.
    Hope that helps

  • How to block the 'save' function when the required fields are not filled?

    Hello, Everyone
    I am new for this scripting. My question is:
    How to block the 'save' function when the required fields are not filled?
    I designed a PDF file with some required fields and I do not want the user to save the document until all required fields are filled. My idea is to write some scripts in Willsave method like:
    if (this.getField("Family Name").value == ""){
    app.alert('You should fill the Family Name field firstly!');
    But I do not think it works as finally the document is saved after all.
    Please help me on that!
    So much thanks.

    Dear Randybearwang,
    I am a Rocky myself and I know how though it is to establish some good codes. Since I created some forms with validation options myself I might have a code for you. The code also creates an alert box (Yes/no option) if the user chooses yes the form will be validatet, if he chooses "no" the alert window will be closed.If  everything is filled out correctly the form will be saved otherwise the textbox will be higlighted and gets focus.
    If you need further assistance , please let me know
    Have fun with the code.
    P.s I don´t know how to upload the "PDF" document. I wrote you an email, please get back to me if you still need the file.

  • Some of my contact names are not appearing when they text message me.  They are just showing up as their numbers. I have them saved in my phone so i am not really sure why their names aren't showing up when they message me?

    some of my contact names are not appearing when they text message me.  They are just showing up as their numbers. I have them saved in my phone so i am not really sure why their names aren't showing up when they message me?

    I have this identical problem.  For a while my group texts didnt show up on my ipad.  Then one day they did, maybe everyone in the group started using the same os version or something.  Ever since my first reply to the group there have been complaints of multiple threads.  I can not find a pattern for when my group text's decide they want to create a new thread. (it doesnt happen every time)  Everyone in the group has deleted the thread, we've all toggled imessage on/off etc.  There still hasn't been a solution.
    Any help would be appreciated.
    Thanks

  • Are not the right ones for the icloud account. How can I find out what these are?

    I have downloaded icloud onto my PC. When I try to access my account I am told that although my Apple ID and password are correct they are not the right ones for the icloud account.How can I find out what these are?

    Christine Helen wrote:
    I can't find any way of creating an icloud ID. I only have a PC. no Mac product except an iPod classic.
    Oh, then you can't unless you know someone with a Mac you could use for a moment or 2. (Like at the Apple Store)

  • Some CGM graphics do not appear when FrameMaker files are converted to PDF

    CGM files are exported from ISO (Arbortext Isodraw 7.0 CadProcess) files. Then they are imported into Adobe FrameMaker 7.2, where all elements of the illustration are visible and can be printed. The FrameMaker FM file is converted to a PDF file using the Adobe PDF converter function of Frame. When the PDF file is opened by Adobe Acrobat 8,0 Professional, some, but not all of the illustrations in the file exhibit this problem (The callouts and other text may appear, but the lines, curves, etc. do not). The illustration prints the same way it appears on the screen. When exporting the ISO file as a CGM, the following selections are made.
    When importing file into Frame, "Import by Reference" is selected.
    When creating PDF in Frame, the following selections are made.
    Any Suggestions would be greatly appreciated. Thanks very much.

    Thanks, Michael.
    I will give it a try.
    Avox Systems Web Site: http://www.avoxsys.com
    AVOX SYSTEMS
    AIRCRAFT SYSTEMS
    Rick Barusic
    Senior Technical Writer
    225 Erie Street - Lancaster, NY 14086 - USA
    Tel: 716-686-1706
    [email protected]
    http://www.zodiacaerospace.com
    The information transmitted is intended only for the person or entity to
    which it is addressed and may contain confidential and/or privileged
    material. Any review, retransmission, dissemination, or other use of or
    taking any action in reliance upon this information by persons or entities
    other than the intended recipient is prohibited. If you received this in
    error, please contact the sender and delete the material from any
    computer.
    From:   MichaelKazlow <[email protected]>
    To:     rick barusic <[email protected]>
    Date:   11/24/2010 10:32 PM
    Subject:        Some CGM graphics do not appear when
    FrameMakerfiles are converted to PDF
    First you should update to the latest version of Acrobat 8, since you say
    you are running Acrobat 8, you should update to 8.2.5. Update your
    FrameMaker to 7.2p158. Those two steps might do the trick. If that fails
    try using a different settings file. Perhaps High Quality or Press
    Quality. I would never use Standard for anything where fidelity is
    important.

  • When douwnloading adobe premier pro fails. Writes that the installation is complete, some optional components are not installed correctly. What to do?

    When downloading Adobe Premier pro fails, write that the installation is complete, some optional components are not installed correctly. What to do?

    check your install logs for the problem, http://helpx.adobe.com/creative-suite/kb/troubleshoot-install-logs-cs5-cs5.html

  • When I download Photoshop CC I get everytime a message "Completed installation, some optional components are not installed correctly. (6)"

    When I download Photoshop CC I get everytime a message "Completed installation, some optional components are not installed correctly. (6)"
    What can i do?
    I have Windows 8 and i7 with gtx760
    Please help me

    Please send me the installer logs to [email protected] from C:\Program Files (x86)\Common Files\Adobe\Installers
    The file name would be like: Adobe Photoshhop cc 2014 15.0 <Date>.log 
    -Pragya

  • Down pmnts with taxes are not permitted when processing with jur.code (Message no. FS206)

    Hi Guys,
    I am facing very critical issue on down Payment request, to process with saperate Tax Value.
    We are supporting on Roll-out for Germany. We have implemented all standard SAP processes in the Project. We have also implemented many interfaces and one of the Interface is Sabrix Tax Engine (Tax Jurisdiction Code).
    As per the Germany legal requirement, the Tax has to get calculated whenever the funds gets transfered from one Bank Account to Another Bank Account.
    Coming to the issue: In the Customer Down Payment scenario, we are creating the Down payment request for Customer and as per Germany local requirement the Tax of 19% has to get calculated on Down payment.
    For an Example: We have the Sales Order Contract Value of 100,000.00 EUR and we are creating the Down Payment reqeust of 10% which is 10000 EUR + Tax 19% 1900 EUR.
    We are trying to post the Down Payment request in F-37 and we get the issue "Down pmnts with taxes are not permitted when processing with jur.code". This error is appearing due to Sabrix Tax engine (Tax Jurisdiction Code) has implemented in our System.
    We have gone through the SAP notes 97288 and 213567 and understood that the Standard SAP does not support us to post the Down Payment request with Separate Tax Value, when the External Tax Engine has implemented.
    I request you to suggest me, if you have already seen this issue in any of your Projects and fixed through the work-around solution. We have been working on work-around since 2 weeks, however no result.
    Below is the error message:
    Down pmnts with taxes are not permitted when processing with jur.code
    Message no. FS206

    HI Preeti,
    Thanks for your response. We have already seen the similar SAP notes and the SAP notes explains that the "Down pmnts with taxes cannot be done along with with jur.code". The only solution is to post the DP without Tax.
    However there might be some workaround which can be done in SAP, to process the Down Payment/Advance Payments with Tax Value along with Jurisdiction Code. I would like to know this.
    Did any one seen this case in your experiece, if yes, what is the work-around solution?.
    Need your help guys!,...
    Regards,
    Damodar Naidu

  • Changes are not reflected when objects transported from Quality to Productn

    Hi
    In case of moving some Transport requests from Quality to Production, some times the changes made to the selection screen of a report program doesn't reflect in Production. Also we don't see any Transport error while transporting. Moreover, we can see the changes by regenerating the Program in production.
    Would any one help me out in this with the reason for this.
    Pls suggest what needs to be done.
    Satish.

    HI,
    Thanks for the reply.
    - I have checked the respective transport too, and every thing seems to be fine.
    - Recently we went to go live, for the next release, so earlier before go live, we didnt faced any proble.. Only now we are facing this problem, that we find the changes relating to selection screen are not reflected when the object / prog is moved from qty to Prd.
    - Only problem is with the selection screen.(not getting reflected in PRD. In Qty we are able to see those changes.
    - Then in order to reflect these changes in PRD, we have to re generate the object, then only it get s updated..
    Satish.
    Edited by: satish c on Sep 22, 2009 3:35 PM

  • I have a macbook pro with OSX Mavericks 10.9.5 and some keys that are not working. Specifically, the enter/return button, the "p", "0", ";", and all the function keys.  What's really weird is that happens randomly.  I've never spilled anything on it

    I have a macbook pro with OSX Mavericks 10.9.5 and some keys randomly are not working. Specifically, the enter/return button, the "p", "0", ";", and all the function keys.  What's really weird is that happens randomly.  I've never spilled anything on it, and I can't for the life of me figure out how to fix this.  Can anyone help?  of course this happened after my warranty expired.

    **update**
    I don't know if this will help someone but I am posting this for that purpose.  In the past when I first had this problem, I'd read a post somewhere (sorry, long ago, don't have the link) where an individual was having the same problem and they stated that when the MBP got heated, that's when the keys would stop working, and they went into the MBP and jiggle some stuff around (a specific wire, I'm not electronically inclined so I know NOT of what they spake!).  Well I didn't want to do that but it always stuck in the back of my mind.  I had given up, really, and was planning to take my MBP to the apple store.  But by chance one night I left my MBP on the floor where it's cool, and when I turned it on, the problem went - poof! It seems there was some validity to the post that spoke about heat, because my problems started when I would stream foreign dramas on my MBP for hours at night, and I would hear the fan going off all the time, and in the mornings, my "p", "enter", "0", ";", and all the function keys would stop working. 
    So, maybe try keeping the MBP in a cool place when it's off.  Since I've started doing this overnight every night (keeping it on the cool floor, out of reach of any big feet), I have not had a single problem with my keyboard.
    Hopefully this might help someone.

Maybe you are looking for

  • Scanjet G4050 and driver 1.3.0 + Mac OSX 10.9.4

    I recently returned to the combination Vuescan/Scanjet G4050 for the first ime since March this year (after scanning several thousand negs) and found it no longer worked properly. Vuescan no longer recognised the transparancy capabilities of the scan

  • Work Manager 6.1 and SMP 3.0 with Agentry new features

    Hi, I know that Work Manager 6.1 is expected to be released by the end of June but I can't find any information about the product. Since I'm starting a new project initially thought for Work Manager 6.0 but running in SMP 3.0, I would like to know th

  • Blackmagic Intensity Pro......Suggest a good HDMI monitor to use..

    I am looking to buy the Intensity Pro card to go with my Song HC7 ...to allow me to capture the uncompressed HDV.... I am also looking for a 2nd monitor to use to judge color more accurate... Could anybody recomend conecting a LCD monitor with HDMI c

  • SOAP Sender ADAPTER 401 No Authorisation

    Hi all, we want to make a PUBLIC webservice on our XI system. The problem is that we always need to give credentials when we do a post (XI username/password). We don't want that, we've read info on SAP concerning this issue (SAP note 856597): <i>The

  • Customize Payment Advice according to the paying company

    Hello Guys, I was wondering whether it is possible to change the header of the payment advice to show the data of the paying company. The standard method for the header is to contain data from a text module, defined in SO10. So is it possible to make