Long double with OCI

I'm developing a C++ library with oracle OCI library. I'm loading from a Oracle Database 11g database. Here I need to load large values with decimal places. In this case I need to use long double instead of double. I'm not sure whether OCI supports for long double.
According to the documentation SQLT_FLT is for float and double only. Can someone let me know whether OCI supports for long double and if so how to retrieve them

Hi,
The problem with SQLT_FLT is that the Oracle client fetches the value as NUMBER and then performs the conversion to the native double/long double type.
NUMBER is not supporting the full IIEE double range of values.
That why Oracle introduced in Oracle 10g the BINARY DOUBLE SQL type that can be fetched using SQLT_BDOUBLE / native host long variable. Thus the all range of C double and long double values can be used within OCI.
Regards,
Vincent

Similar Messages

  • Using "long double" with gcc

    I want to use long doubles (quad, 128-bit floating point variables) in C. I thought the following program would do it:
    #include <stdio.h>
    int main()
    long double a, b, c;
    b = 1./7.;
    c = 7.;
    a = 1./c;
    printf("%.30e \n", a);
    printf("%.30e \n", b);
    printf("%.30e \n", c);
    return 0;
    But the program returns garbage when compiled and run with:
    %gcc top2.c -o test
    %./test
    -1.391130315222827826529386765980e-220
    -1.391130315222712834096824073018e-220
    -2.681561585988519419914804999641e+154
    (XCode 3.1, gcc 4.0.1 or 4.2.1, Intel Xeon, 10.5.4)
    The program works for double, however.
    So what am I doing wrong?
    Matthias

    I can't really help you much there. Maybe you should think about what you are doing and what you really need. I doubt you really need 128 bits. In Apple's Documentation it says:
    -m96bit-long-double
    -m128bit-long-double
    These switches control the size of long double type. The i386 application binary interface specifies the size to be 96 bits, so -m96bit-long-double is the default in 32 bit mode. Modern architectures (Pentium and newer) would prefer long double to be aligned to an 8 or 16 byte boundary. In arrays or structures conforming to the ABI, this would not be possible. So specifying a -m128bit-long-double will align long double to a 16 byte boundary by padding the long double with an additional 32 bit zero.
    In the x86-64 compiler, -m128bit-long-double is the default choice as its ABI specifies that long double is to be aligned on 16 byte boundary.
    Notice that neither of these options enable any extra precision over the x87 standard of 80 bits for a long double.
    Warning: if you override the default value for your target ABI, the structures and arrays containing long double variables will change their size as well as function calling convention for function taking long double will be modified. Hence they will not be binary compatible with arrays or structures in code compiled without that switch.
    Message was edited by: etresoft - gave up trying to format it fancy

  • Hello, I've updated the iPhone I have got I have a problem I hope you respond to some of the applications no longer work, such as the safari and skype and many applications are no longer working with the ios7.0.4

    Hello, I've updated the iPhone I have got I have a problem I hope you respond to some of the applications no longer work, such as the safari and skype and many applications are no longer working with the ios7.0.4

    Standard troubleshooting...
    1. Try a Restart by pressing the sleep/lock button until you see the slider.  Slide to power off.  Restart by pressing the sleep/lock button until you see the Apple logo.
    2. Try a Reset by pressing the home and sleep buttons until you see the Apple logo. Takes about 5-15 secs of button holding and you won't lose any data or settings.
    3. Remove apps from Recently Used (multi-tasking) list...
    - From any Home Screen, double tap the home button to bring up the Recents List
    - Swipe up on the app preview card to remove it from the list
    - Press the home button when done.
    4. If still a problem restore with your backup.
    5. If still a problem restore as new, i.e. without your backup. See how it runs with nothing synced to it.
    6. If still a problem, it's likely a hardware issue.

  • My iPad Mini with retina display suddenly will not connect to the Internet. It shows full wifi bars, yet no web pages will load. My Internet is working with all other apple devices in my house. The iPad also no longer works with celluar data.

    My iPad Mini with retina display suddenly will not connect to the Internet. It shows full wifi bars, yet no web pages will load. My Internet is working with all other apple devices in my house. The iPad also no longer works with celluar data. I'm not sure what has happened. It was working fine a few hours ago. I have tried resetting it, ive restarted my browser etc. I tried to erase all data from my Ipad but I can't do that because it needs to sign into my Apple ID and use the Internet!

    Some things to try first:
    1. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    2. Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    3. Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    4. Go into your router security settings and change from WEP to WPA with AES.
    5.  Renew IP Address: (especially if you are drooping internet connection)
        •    Launch Settings app
        •    Tap on Wi-Fi
        •    Tap on the blue arrow of the Wi-Fi network that you connect to from the list
        •    In the window that opens, tap on the Renew Lease button
    6. Potential Quick Fixes When Your iPad Won’t Connect to Your Wifi Network
    http://ipadinsight.com/ipad-tips-tricks/potential-quick-fixes-when-your-ipad-won t-connect-to-your-wifi-network/
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    Fix WiFi Issue for iOS 7
    http://ipadnerds.com/fix-wifi-issue-ios-7/
    iOS 6 Wifi Problems/Fixes
    Wi-Fi Fix for iOS 6
    https://discussions.apple.com/thread/4823738?tstart=240
    How To: Workaround iPad Wi-Fi Issues
    http://www.theipadfan.com/workaround-ipad-wifi-issues/
    Another Fix For iOS 6 WiFi Problems
    http://tabletcrunch.com/2012/10/27/fix-ios-6-wifi-problems-ssid/
    Wifi Doesn't Connect After Waking From Sleep - Sometimes increasing screen brightness prevents the failure to reconnect after waking from sleep. According to Apple, “If brightness is at lowest level, increase it by moving the slider to the right and set auto brightness to off.”
    Fix For iOS 6 WiFi Problems?
    http://tabletcrunch.com/2012/09/27/fix-ios-6-wifi-problems/
    Did iOS 6 Screw Your Wi-Fi? Here’s How to Fix It
    http://gizmodo.com/5944761/does-ios-6-have-a-wi+fi-bug
    How To Fix Wi-Fi Connectivity Issue After Upgrading To iOS 6
    http://www.iphonehacks.com/2012/09/fix-wi-fi-connectivity-issue-after-upgrading- to-ios-6.html
    iOS 6 iPad 3 wi-fi "connection fix" for netgear router
    http://www.youtube.com/watch?v=XsWS4ha-dn0
    Apple's iOS 6 Wi-Fi problems
    http://www.zdnet.com/apples-ios-6-wi-fi-problems-linger-on-7000004799/
    ~~~~~~~~~~~~~~~~~~~~~~~
    iPad: Issues connecting to Wi-Fi networks
    http://support.apple.com/kb/ts3304
    How to Boost Your Wi-Fi Signal
    http://ipad.about.com/od/iPad_Troubleshooting/a/How-To-Boost-Your-Wi-Fi-Signal.h Mt
    Troubleshooting a Weak Wi-Fi Signal
    http://ipad.about.com/od/iPad_Troubleshooting/a/Troubleshooting-A-Weak-Wi-Fi-Sig nal.htm
    How to Fix a Poor Wi-Fi Signal on Your iPad
    http://ipad.about.com/od/iPad_Troubleshooting/a/How-To-Fix-A-Poor-Wi-Fi-Signal-O n-Your-iPad.htm
    iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    WiFi Connecting/Troubleshooting http://www.apple.com/support/ipad/wifi/
    How to Fix: My iPad Won't Connect to WiFi
    http://ipad.about.com/od/iPad_Troubleshooting/ss/How-To-Fix-My-Ipad-Wont-Connect -To-Wi-Fi.htm
    iOS: Connecting to the Internet http://support.apple.com/kb/HT1695
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Connect iPad to Wi-Fi (with troubleshooting info)
    http://thehowto.wikidot.com/wifi-connect-ipad
    10 Ways to Boost Your Wireless Signal
    http://www.pcmag.com/article2/0,2817,2372811,00.asp
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    How To Fix iPhone, iPad, iPod Touch Wi-Fi Connectivity Issue http://tinyurl.com/7nvxbmz
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    Some Wi-Fi losses may stem from a problematic interaction between Wi-Fi and cellular data connections. Numerous users have found that turning off Cellular Data in Settings gets their Wi-Fi working again.
    You may have many apps open which can possibly cause the slowdown and possibly the loss of wifi. In iOS 4-6 double tap your Home button & at the bottom of the screen you will see the icons of all open apps. Close those you are not using by pressing on an icon until all icons wiggle - then tap the minus sign. For iOS 7 users, there’s an easy way to see which apps are open in order to close them. By double-tapping the home button on your iPhone or iPad, the new multitasking feature in iOS 7 shows full page previews of all your open apps. Simply scroll horizontally to see all your apps, and close the apps with a simple flick towards the top of the screen.
    Wi-Fi or Bluetooth settings grayed out or dim
    http://support.apple.com/kb/TS1559
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • My podcasts will no longer sync with my ipod classic. Also when I tried to sync in itunes, the category "podcast" disappeared under my ipod listed in itunes.

    My podcasts will no longer sync with my ipod classic. Also when I tried to sync in itunes, the category "podcast" disappeared under my ipod listed in itunes.

    Are you sure your iPod Classic is configured to sync podcasts to your device?  You'll want to double check by taking a quick look at your iPod's Podcast configuration tab in iTunes.
    To access this tab, plug your iPod in and click on it from under the Devices section in the left hand pane of iTunes when it appears to bring yourself to the iPod's Summary tab. Now locate the Podcasts tab and select it.  Under this tab you can configure how and what podcasts are synced to your device. If you make any changes, be sure to click theApply button in the lower right hand corner.
    B-rock

  • After ios 5 update, bluetooth on ipod touch not funcioning-keynote app no longer pairing with ipad

    Since the ios 5 update--bluetooth longer funcioning on ipod touch.  iPad no longer syncing with keynote remote app on ipod touch.  My iPad no longer sees the iPod touch.  The Bluetooth indicator does not come on or flash on the ipod touch.
    any help or suggestions?

    alex.g wrote:
    I've got a fix, even for  those who don't have hotspot (like me) who want to get the ipad and iphone talking over bluetooth again.
    First, I should say that I said when I got my 4s, the problem was solved. It was not. I was just connecting via wifi, but I wanted bluetooth back.
    Here is how I got it back without hotspot.
    1. Launch keynote on one device and the remote on the other as you normall would.
    2. Find another app that bluetooth links ipad and iphone (I used 'pictransfer light'). Install on both devices and launch on both devices. Follow the promt to get a bluetooth sync.
    3. Double push the home button both devices to pull up the multi-tasking and open keynote and keynote remote on the relevant devices.
    4. In keynote, go to settings; advances; remote. You should now be able to get the remote to link (you may, on the device running the remote, need to hit settings and then 'new keynote link'.
    Once I launched pictransfer, the bluetooth logo was blue on both devices the whole time I ran through the other steps. I suspect that that was also the point of using the hotspot service.
    Also noteworthy: I am yet to try this 'in the field'. For all I know, this won't keep a connection for as long as one might need. I'll find out on Thursday when I rely on the remote for 90min. On the positive side, I was able to keep the connection even when I double clicked home and closed pictransfer while leaving keynote and keynote remote open...
    This work-around worked -- I found that as long as I launched the "Pictransfer for iPad Lite" app just before the presentation that it seemed to work fine.  However, if Bluetooth gets turned off or you disconnect I think you will have to repeat the work-around -- nice find.
    Apple really needs to fix this.  They even have a posted document describing how to link two devices by Bluetooth and the truth is that it just does not work as they say.  They need to add whatever code into the Keynote & Keynote Remote apps to initiate bluetooth to connect the devices.  It's fine if it prefers WiFi, but it should give you the bluetooth option as well.

  • Signon.useDOMFormHasPassword no longer working with FF 30

    Seems that the "signon.useDOMFormHasPassword" workaround (latest working version is FF 29.0.1) to automatically populate username/password fields protected by "autocomplete=off" no longer works with FF 30.
    Now with FF 30 I always have to double click each of those "protected" username input field to select the only one entry to automatically populate the corresponding password input field. This is pretty annoying as there is only ONE username to select (which should be auto filled). Why did you disable the above workaround? Is there an other way to re-enable username/password autofill for autocomplete=off protected input fields?
    I already tried the following parameters, but nothing changed:
    signon.autofillForms;true
    signon.overrideAutocomplete;true

    I came across this bug already and it describes exactly my issue. Previous to FF 30 the combination of the greasmonkey script AND the signon.useDOMFormHasPassword pref enabled the autofill of password fields. Now that the signon.useDOMFormHasPassword pref is gone in FF 30 this no longer works. I don't think it can be solved by updating the greasmonkey script, the bug explains the reason why:
    I'v tried moving the GreaseMonkey script to run as early as I can using "@run-at document-start" and a DOMContentLoaded eventListener on the document but it still runs too late, by the time it runs the new Password Manager has already seen the page content.
    So it seems that the workaround was removed in FF 30 without providing a fix for the issue. Again my problem is not about saving passwords on autocomplete=off fields (this is working fine) but on loading them back into this fields without the need to double click the username field and select the single entry.

  • Is it possible to working in Java Stored Procedures with OCI driver?

    Hello ALL.
    Could you help me...
    Is it possible to working in Java Stored Procedures with OCI driver?
    I want to try to do some workaround...
    I need to work with following parametrs from Java Stored Procedures:
    DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
    String url = null;
    url = "jdbc:oracle:oci:@TEST";
    conn = DriverManager.getConnection (url,"scott","tiger");
    Is it possible?
    I tried but I have errors...
    Please, help me!
    Thanks

    You cannot call OCI functions directly from PL/SQL. You could, of course, write an external procedure that made OCI calls, though you could also write an external procedure in Java. I'm guessing the documentation is trying to convey this same information-- you would need an external procedure that used OCI if you wanted to use the old-school interfaces for LONG and LOB data types. If you converted to using LOBs rather than LONGs, you could do everything in PL/SQL.
    Justin

  • Long / double value convertion to Packed Decimal

    Hi,
    Could anybody tell me how to convert a long / double value to Packed Decimal (AS400) ?
    Thanks,
    Probir

    Now I'm writing this value in a flat file by
    FileOutputStream and sending to mainframe through FTP.
    But the mainframe people said it's not converted into
    packed decimal. Is it the right way to convert ??When you say "mainframe" I assume you are referring to a machine that uses EBCDIC. Java, even on the iSeries, uses Unicode and not EBCDIC, so when you FTP anything to the mainframe it will go through an ASCII-to-EBCDIC conversion. You want this to happen for text but you don't want it to happen for packed decimals; your carefully-constructed x'12' x'3f' bytes will be dutifully converted into EBCDIC garbage.
    FTP of an iSeries file (in the QSYS.LIB file system) to a mainframe is trivial because both client and server use EBCDIC, so there are no conversion issues. So if you could do it that way, you definitely should. Otherwise you are going to have to take your packed decimal data and replace it by the bytes that would be translated into it if it were in EBCDIC. The translation table QEBCDIC in library QSYS shows you how it does that, so use that table. You can look it with the command WRKTBL QSYS/QEBCDIC. You'll notice for example that x'09' in ASCII gets converted to x'05' in EBCDIC. So if you want to get x'05' into part of a packed decimal field on the mainframe, you have to send it x'09'. And so on. Like I said, I would recommend doing something other than this. Ask the mainframe people to not make you used packed decimal, for example.
    PC&#178;

  • Building gdal with OCI support- seems to work manually, not in makepkg

    I'm attempting to rebuild the gdal package under x86_64 with Oracle Spatial support at the latest version (1.9.2) (the version in community is at 1.9.0 right now and does not include Oracle support).
    gdal uses the standard autoconf/automake toolchain for its build process, and allows users to specify which external libraries they want to link in the configure script.  To enable Oracle Spatial support in gdal, one would pass the --with-oci option to configure.  This works fine for me and detects the contents of my oracle-instantclient-basic and oracle-instantclient-sdk packages (aur packages containing the necessary Oracle libs and headers) when I do it manually, i.e.:
    ./configure --prefix=/usr --with-netcdf --with-libtiff --with-sqlite3 \
    --with-geotiff --with-mysql --with-python --without-libtool --with-curl \
    --with-hdf5 --with-perl --with-geos --with-png \
    --with-oci
    However, when the exact same line runs inside of the build() function of a makepkg run, the configure script fails to detect the OCI libraries.  I know that the configure script is supposed to work by reading the ORACLE_HOME environment variable to find the necessary Oracle libraries and headers, and I've double-checked that this environment variable is being set properly inside of the makepkg run with a couple of echo statements before the configure line is run. 
    Is there something else that I could be missing about the environment variables or build context inside of makepkg that could be causing this?  I've already looked through /etc/makepkg.conf and couldn't find anything that would seem to make a difference, but I'll readily admit that I don't have a ton of knowledge about the autotools library detection process other than the fact that I've built a few packages with the toolchain.
    Any help/ideas would be greatly appreciated.  Here's the PKGBUILD I'm using if you want to try it for yourself (based off of gdal 1.9.0-1 in community): https://gist.github.com/3920468

    I'm attempting to rebuild the gdal package under x86_64 with Oracle Spatial support at the latest version (1.9.2) (the version in community is at 1.9.0 right now and does not include Oracle support).
    gdal uses the standard autoconf/automake toolchain for its build process, and allows users to specify which external libraries they want to link in the configure script.  To enable Oracle Spatial support in gdal, one would pass the --with-oci option to configure.  This works fine for me and detects the contents of my oracle-instantclient-basic and oracle-instantclient-sdk packages (aur packages containing the necessary Oracle libs and headers) when I do it manually, i.e.:
    ./configure --prefix=/usr --with-netcdf --with-libtiff --with-sqlite3 \
    --with-geotiff --with-mysql --with-python --without-libtool --with-curl \
    --with-hdf5 --with-perl --with-geos --with-png \
    --with-oci
    However, when the exact same line runs inside of the build() function of a makepkg run, the configure script fails to detect the OCI libraries.  I know that the configure script is supposed to work by reading the ORACLE_HOME environment variable to find the necessary Oracle libraries and headers, and I've double-checked that this environment variable is being set properly inside of the makepkg run with a couple of echo statements before the configure line is run. 
    Is there something else that I could be missing about the environment variables or build context inside of makepkg that could be causing this?  I've already looked through /etc/makepkg.conf and couldn't find anything that would seem to make a difference, but I'll readily admit that I don't have a ton of knowledge about the autotools library detection process other than the fact that I've built a few packages with the toolchain.
    Any help/ideas would be greatly appreciated.  Here's the PKGBUILD I'm using if you want to try it for yourself (based off of gdal 1.9.0-1 in community): https://gist.github.com/3920468

  • Long double on iPhone

    Hi,
    Can anyone tell me what type of long double the iPhone supports?
    I currently only have access to the simulator, not the actual phone. The simulator says it's a 64 bit mantissa, which is Intel's extended type, but that's probably only because the app was compiled for my Mac's Intel processor. I'll probably get a different answer on an actual iPhone.
    If you don't know but want to find out for me, you can try the following code in a .mm file (objective C++), substituting someLabel for any object with text in a user interface.
    #include <limits>
    someLabel.text = [NSString stringWithFormat:@"%d", std::numeric_limits<long double>::digits];
    O, by the way, a regular double is still the 8-byte type with 53 bit mantissa, right? (Replace "long double" by "double" in the code above)
    Thanks!
    Michel

    Got the answer on a different list, long double is the same as a regular double, apparently. 53 bits mantissa.

  • My 2nd gen IPOD touch will no longer sync with itunes.

    My 2nd gen IPOD touch will no longer sync with itunes.  it tells me it cannot read the contents of the ipod then it says the ipod software server cannot be contacted.  Any suggestions?

    Update Server
    Try:
    - Powering off and then back on your router.
    - iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
    - Change the DNS to either Google's or Open DNS servers
    Public DNS — Google Developers
    OpenDNS IP Addresses
    - Try on another computer/network
    - Wait if it is an Apple problem
    Then try restoring again.

  • My ipod nano will no longer sync with itunes since i have purchased an iphone 4s and synced it with itunes.

    My ipod nano will no longer sync with itunes since i purchased an iphone 4s and synced the phone with itunes.  When I plug my ipod into my imac, it does not even read or recognize my ipod.  What do i do?

    Are you using the original cable that came with Nano and not your iPhone's cable?  Have you worked through the troubleshooting in this Apple support document?
    http://support.apple.com/kb/TS1410
    B-rock

  • After purchasing songs at the itunes store, ipod touch will no longer synch with the itunes library at all. Also a lock symbol is now on the ipod touch. How do I fix this

    After purchasing songs at the itunes store,  my ipod touch will no longer synch with the itunes library at all. It won't send the purchases to the device and it won't synch any other music to the device. Also a lock symbol is now displayed at the top of the ipod touch. How do I fix this.
    This was the first purchase I made.

    Are you following these instructions?
    iTunes: Syncing media content to iOS devices and iPod
    Where is the lock icon on the screen?

  • Function keys no longer working with a new keyboard...

    I got a new keyboard and my function keys no longer work with it.  I am used to have them used in the standard format, i.e. F10-F12 control the voume, etc.  I have the "Use all f1,f2, etc." button clicked.  I have also tried restarting my computer.  Any thoughts?

    Try doing a SMC reset and PRAM reset.
    SMC RESET
    Shut down the computer.
    Unplug the computer's power cord and all peripherals.
    Press and hold the power button for 5 seconds.
    Release the power button.
    Attach the computers power cable.
    Press the power button to turn on the computer.
    PRAM RESET
    Shut down the computer.
    Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

Maybe you are looking for

  • Animated gif - page curl

    Hi, Using a Macbook Pro and PS CS6. Can you create animated gifs in Photoshop of page curls? (dogear) Just curious. Thank you. S

  • "Purpose of REUSE_ALV_FIELDCATALOG_MERGE"

    What is the purpose of "REUSE_ALV_FIELDCATALOG_MERGE" function module in ALV Reports?

  • Problem displaying arabic text in xml document

    Hi .. I have an xml type coloum where i store an xml document that contains some arabic texts with UTF-8 encoding, m using an xsl file to transform the xml and display it in an html page. At the database level when i select the xml col to dispaly the

  • Quick Time Movies Trapped In iPhoto 09?

    Hi: I download quicktime move clips from my panasonic camera and they automatically are saved (along with still photos) in iPhoto. In the past I have been able to just click on them to play and to move them freely into other files. Now with IPhoto 09

  • Third Party Actions for PSE7

    I found a site that shows how to easily add third party actions to  PSE7.  Hopefully this will light the ole light bulb for you as it did for me. thanks Jeff http://www.scrappersguide.com/info_el7c.html ps:  I am having problems with linking layers.