Linux oracle9i connectivity using Pro C/C++

Hi,
Can anyone plz help me out in connecting C++ with oracle9i under Linux(Red hat linux)??? A code snippet would be appreciated.. Thanks in advance..
Ranjith

My answer is only for 1. problem (about ORA-01458)
I think that you use declaration for cursor C0 with a varchar
variable before you ininitialize length (member .len of varchar
structure) of this variable.
It's famous that many errors come from uninitialized varchar
variables in Pro*C.

Similar Messages

  • Newbe trying to connect using Pro*C/C++

    I'm just trying to get Pro*C/C++ to work using VC++ on an NT platform (This is my first shot at Pro*C/C++).
    I can get the code to pre-compile , compile, and link but when I attempt to connect to the database I get an Access Violation in SQLLIB80.dll .
    Results with the lines below - Does the first sqlcxt parameter make any sense!?
    EXPANDED CODE:
    username.len = (unsigned short)strlen(strcpy((char *) username.arr, "testuser"));
    password.len = (unsigned short)strlen(strcpy((char *)password.arr, "testpwd"));
    dsname.len = (unsigned short)strlen(strcpy((char *)dsname.arr, "mercury"));
    // Register sql_error() as the error handler
    /* EXEC SQL WHENEVER SQLERROR DO sql_error("ORACLE error:"); */
    /* EXEC SQL CONNECT :username IDENTIFIED BY :password USING :dsname; */
    struct sqlexd sqlstm;
    sqlstm.sqlvsn = 10;
    sqlstm.arrsiz = 4;
    sqlstm.sqladtp = &sqladt;
    sqlstm.sqltdsp = &sqltds;
    sqlstm.iters = (unsigned int )10;
    sqlstm.offset = (unsigned int )5;
    sqlstm.cud = sqlcud0;
    sqlstm.sqlest = (unsigned char *)&sqlca;
    sqlstm.sqlety = (unsigned short)256;
    sqlstm.occurs = (unsigned int )0;
    sqlstm.sqhstv[0] = ( void *)&username;
    sqlstm.sqhstl[0] = (unsigned int )22;
    sqlstm.sqhsts[0] = ( int )22;
    sqlstm.sqindv[0] = ( void *)0;
    sqlstm.sqinds[0] = ( int )0;
    sqlstm.sqharm[0] = (unsigned int )0;
    sqlstm.sqadto[0] = (unsigned short )0;
    sqlstm.sqtdso[0] = (unsigned short )0;
    sqlstm.sqhstv[1] = ( void *)&password;
    sqlstm.sqhstl[1] = (unsigned int )42;
    sqlstm.sqhsts[1] = ( int )42;
    sqlstm.sqindv[1] = ( void *)0;
    sqlstm.sqinds[1] = ( int )0;
    sqlstm.sqharm[1] = (unsigned int )0;
    sqlstm.sqadto[1] = (unsigned short )0;
    sqlstm.sqtdso[1] = (unsigned short )0;
    sqlstm.sqhstv[2] = ( void *)&dsname;
    sqlstm.sqhstl[2] = (unsigned int )42;
    sqlstm.sqhsts[2] = ( int )42;
    sqlstm.sqindv[2] = ( void *)0;
    sqlstm.sqinds[2] = ( int )0;
    sqlstm.sqharm[2] = (unsigned int )0;
    sqlstm.sqadto[2] = (unsigned short )0;
    sqlstm.sqtdso[2] = (unsigned short )0;
    sqlstm.sqphsv = sqlstm.sqhstv;
    sqlstm.sqphsl = sqlstm.sqhstl;
    sqlstm.sqphss = sqlstm.sqhsts;
    sqlstm.sqpind = sqlstm.sqindv;
    sqlstm.sqpins = sqlstm.sqinds;
    sqlstm.sqparm = sqlstm.sqharm;
    sqlstm.sqparc = sqlstm.sqharc;
    sqlstm.sqpadto = sqlstm.sqadto;
    sqlstm.sqptdso = sqlstm.sqtdso;
    sqlcxt((void **)0, &sqlctx, &sqlstm, &sqlfpn);

    Can't help you there, I'm afraid, and I don't do development since many years back so I'm pretty useless in that area ;-)
    However, since the Net layers are beneath OCI in the stack, I would think that if these certificates work at all with Oracle (via some other client, like SQL*Plus), it should work with all types of apps.
    But, I believe the Pro* stuff is not all that up to date, so if connectivity requires 10g features, there's a small risk of incompatibility issues.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/ch7progrunicode.htm#i1005974
    http://download.oracle.com/docs/cd/B19306_01/network.102/b14212/architecture.htm#i1040997

  • Macbook pro wont connect to internet using cable, but connects using wifi fine

    My macbook pro wont connect to the internet using a cable, but connects using wifi fine.  I use wifi at home but sometimes need to use my laptop at work and connect using a cable but it says i'm not connected to the internet?

    Can you open a terminal and invoke the following commands:
    ping -c 10 localhost
    and
    ping -c 10 google.com
    You should normally get something like:
    PING google.com (74.125.224.103): 56 data bytes
    64 bytes from 74.125.224.103: icmp_seq=0 ttl=55 time=19.053 ms
    64 bytes from 74.125.224.103: icmp_seq=1 ttl=55 time=37.692 ms
    64 bytes from 74.125.224.103: icmp_seq=2 ttl=55 time=46.988 ms
    64 bytes from 74.125.224.103: icmp_seq=3 ttl=55 time=33.466 ms
    64 bytes from 74.125.224.103: icmp_seq=4 ttl=55 time=28.940 ms
    64 bytes from 74.125.224.103: icmp_seq=5 ttl=55 time=58.070 ms
    64 bytes from 74.125.224.103: icmp_seq=6 ttl=55 time=33.335 ms
    64 bytes from 74.125.224.103: icmp_seq=7 ttl=55 time=33.361 ms
    64 bytes from 74.125.224.103: icmp_seq=8 ttl=55 time=36.099 ms
    64 bytes from 74.125.224.103: icmp_seq=9 ttl=55 time=41.111 ms
    --- google.com ping statistics ---
    10 packets transmitted, 10 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 19.053/36.811/58.070/9.939 ms

  • Using Pro*C on Linux Oracle 8.1.6.0 on RH 6.2

    Whe have some problems using Pro*C:
    the program runs ok on all Oracle versions, including Oracle 8.1.6.0 on DEC OSF, but various sql errors are encountered on Linux Red Hat 6.2:
    1) "ORA-01458: invalid length inside variable character string" for this code:
    EXEC SQL BEGIN DECLARE SECTION;
    varchar I_LANGLB [4];
    short O_NOLBLB ;
    varchar O_LIBELB [26];
    EXEC SQL END DECLARE SECTION;
    EXEC SQL INCLUDE SQLCA.H;
    EXEC SQL WHENEVER SQLERROR GO TO MAJ_RESULT;
    EXEC SQL WHENEVER NOT FOUND CONTINUE;
    EXEC SQL DECLARE C0 CURSOR FOR
    SELECT LBL.NOLBLB, LBL.LIBELB
    FROM LBL
    WHERE LBL.EDITLB = 'MON' AND LBL.LANGLB = :I_LANGLB;
    strcpy (I_LANGLB.arr, "fra");
    I_LANGLB.len = 3;
    EXEC SQL OPEN C0;
    for ( ; ; )
    EXEC SQL WHENEVER NOT FOUND DO break;
    EXEC SQL FETCH C0 INTO :O_NOLBLB, :O_LIBELB;
    EXEC SQL CLOSE C0;
    2) with Dynamic Sql: "ORA-01007: variable not in select list"
    SELECT
    nvl(MODEME, ''),
    nvl(NBANME, 0),
    nvl(BASEME, '0'),
    nvl(PRORME,'0'),
    nvl(EVALME, '0'),
    nvl(DECOME, '0') ,
    nvl(CDDAME, '0'),
    nvl(CDMIME, '0'),
    nvl(TXMIME, 0),
    nvl(CDMAME, '0'),
    nvl(TXMAME, 0),
    nvl(CDTXME, '0'),
    nvl(CDSUME, '0'),
    nvl(TXSUME, 0),
    nvl(DUMIME, 0),
    nvl(MTVNME, 0),
    nvl(NOANML, 0),
    nvl(TAUXML, 0),
    DESIME
    FROM MET, LME
    WHERE MODEME = MODEML
    AND nvl(INLBME,'1')='1'
    ORDER BY MODEME,NOANML
    [ or
    ORDER BY 1,17 ]
    In both cases,
    We use the following precompiling options:
    include=/oracle/OraHome1/precomp/lib ireclen=132 oreclen=132 sqlcheck=syntax parse=partial select_error=no char_map=VARCHAR2 mode=ORACLE unsafe_null=yes
    dbms=V8
    Could someone help ?
    Thanks ...

    My answer is only for 1. problem (about ORA-01458)
    I think that you use declaration for cursor C0 with a varchar
    variable before you ininitialize length (member .len of varchar
    structure) of this variable.
    It's famous that many errors come from uninitialized varchar
    variables in Pro*C.

  • HT5639 Can I use Boot Camp to install Linux on my MacBook Pro?

    Can I use Boot Camp to install Linux on my MacBook Pro?

    Welcome to the Apple Support Communities
    Boot Camp wasn't designed to install Linux. Apart from that, the Boot Camp version included in OS X Mountain Lion will ask you to insert a Windows 7 or Windows 8 DVD in order to run Boot Camp, as far as I know.
    Apple doesn't support Linux on Macs, but it works properly on Macs. There are a lot of how-to's in the Internet about the steps to install Linux and the different possibilities you have. Also, what distribution do you want to install on the computer? You should also consider the option to install Linux on a virtual machine

  • Connecting Macbook Pro osx10.6.8 to flatscreen vis HDMI.  Only suggestions I have seen is to use Mirror Image in sysPref displays.  I don't see any mention of mirror image in displays.  Won't connect

    Connecting Macbook Pro osx10.6.8 to flatscreen vis HDMI.  Only suggestions I have seen is to use Mirror Image in sysPref>displays.  I don't see any mention of mirror image in displays.  Won't connect

    I am asking the Moderator to move your post  to the MacBook Pro forum, this is an iMac forum.
    Good luck.

  • HT201180 What type of Fire Wire cable to use to connect MacBook Pro 2009 to tape-based Sony TRV720 camcorder

    What type of Fire Wire cable to use to connect MacBook Pro 2009 to tape-based Sony TRV720 camcorder

    USB is the slowest. Firewire is faster. eSata is the fastest (and will be superceded by Thunderbolt).  The old Fire was 4 pin (Firewire 400 and is essentially obsolete), new is 9 pin, Firewire 800.  All of the will transmit data, simply a different speeds.
    For eSata connectivity, you MBP must have an express card slot (and the appropriate eSata connection card) and you external enclosure must have an eSata input.  eSata cables will only transmit data, therefor it will require power by Firewire or USB cables.
    Ciao.

  • Problem JDBC Connection using OCI Driver on Weblogic Portal on Linux

    Hi Team,
    I want a JDBC connection using OCI Driver in Weblogic Portal 8.1 sp4 on Linux. When I had tested using JDBC connection using Plain Java Code it is working. Also when I create the OCI Connection Weblogic Connection Pool it is working.
    But My Requirement is to create the connection using Java Code in Portal Application
    But When I create OCI connection in the code it is throwing NO SUITABLE DRIVER Found.
    ---------- Code in Plain Java Code ------------ Same code is used in Weblogic Portal Application --------------------------------
         public static void main(String[] args) throws Exception{
              Class.forName("oracle.jdbc.driver.OracleDriver");
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              String url="jdbc:oracle:oci8:@TESTDB";
              Properties props = new Properties();
         props.put("user","scott");
         props.put("password","tiger");
              conn=DriverManager.getConnection(url,props);
    When I am using the same code in Weblogic Portal and Deployed on Weblogic Portal Server 8.1 SP4 it is throwing following error.
    -------------- Exception on Server Log --------------------
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;Ljava.lang.ClassLoader;)Ljava.sql.Connection;(Unknown Source)
    at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;)Ljava.sql.Connection;(Unknown Source)
    My Environment is
    LINUX
    Weblogic 8.1 SP4
    Oracle 9i Client on Same Machine
    Oracle 10g Server on Different Machine
    My Environment Variables on the Linux Server also set properly as following
    PATH=/apps/pmaaum/ant/apache-ant-1.6.5/bin:.:/apps/beahomedev/jdk142_05/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/apps/oracle/ora9i/product/9.2.0/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/apps/oracle/ora9i/bin
    LD_LIBRARY_PATH=/usr/lib:/apps/oracle/ora9i/product/9.2.0/lib:/apps/oracle/ora9i/product/9.2.0/lib32:/apps/oracle/ora9i/product/9.2.0/rdbms/lib:/usr/openwin/lib:/apps/oracle/ora9i/product/9.2.0/jdbc/lib
    JAVA_HOME=/apps/beahomedev/jdk142_05
    JDBC_LIB=/apps/oracle/ora9i/product/9.2.0/jdbc/lib
    CLASSPATH=:.:/apps/beahomedev/jdk142_05/lib/rt.jar:/apps/oracle/ora9i/product/9.2.0/jdbc/lib/classes12.jar
    Please help me, Let me know if you required anything.
    Thanks in Advance
    Vishnu
    Edited by: vishnuk on Oct 23, 2009 4:07 AM
    Edited by: vishnuk on Oct 23, 2009 4:10 AM

    Hi Vishnu
    Looks like a classloader issue. BEA class loader is very tricky. Any jar added manually in classpath, will end up loading only those classes. Any imports that we have in any of those classes do not get loaded. Anyhow, coming to your point, add classes12.jar inside your portal web project Web-Inf/lib folder and see if that helps. Usually thats where we put all the JARs for 8.1 SPxx applications. If this still breaks, then remove the jar from web-inf/lib folder and add under your portal app App-Inf/lib folder. First try with app-inf/lib folder having this jar. If not then with web-inf/lib. Basically web-inf is specific to that web app only. If you have a different app having this jdbc code, then put under app-inf/lib folder. Make sure that you remove the classes12.jar that you added in classpath either in env variable or in setdomainenv.cmd file.
    When weblogic uses native OCI Drivers, it refers to jars at this location: ....\beawlp814\weblogic81\server\ext\jdbc\oracle\10g or 9g. Try using one of these jars and see if that works. Most of the times I used these jars only for oracle specific native drivers.
    Word of caution. Try to use Connection Pool and a DataSource created in weblogic console for your jdbc code. This Datasource can still use the Oracle drivers that you want (instead of BEA Weblogic wrapper oci drivers) located in above location. Use JNDI Lookup and get Datasource and then connection. This is more recommended approach with many advantages then using DriverManager approach..
    Goud

  • HT1349 hi Mmm ive been told that installing linux on mac book pro retina 15 and even others and using it as my first sofware will make the mac heaqt up and burn from inside!!!!! true??????????

    hi Mmm ive been told that installing linux on mac book pro retina 15 and even others and using it as my first sofware will make the mac heaqt up and burn from inside!!!!! true??????????

    Hi shldr2thewheel,
         it has been a while since we have last spoke, I would like to let you know, I am still working on getting used to the switch from windows to a Mac/Apple system. I do have a new question for you, I did purchase In Design CS5.5 through journeyed.com through Cuyahoga Community College of which I attend as a student, is there a way to purchase an online book through iTunes to learn that as well? Also, you know me, the struggling student, I would also, when and if the book can be purchased through the iTunes, would need to know if you do know of a much easier book for struggling students like myself and at a reasonable price as well for the In Design CS5.5 program. Our campus bookstore had closed early, and, so did the colleges library and our local library here where I do live, so, I cannot go to either place to purchase a book or to take out a book, plus cash funds are low at this moment as well but, I do have money left on the iTunes account to use, if it can be used. So, can it be used, the iTunes money, towards finding a low priced online book? I am in great need of assistance as I have a project due for my one course for this Tuesday, September 4, 2012.
    Sincerely in need of help once again,
    Kim

  • Hi Mmm ive been told that installing linux on mac book pro retina 15 and even others and using it as my first sofware will make the mac heaqt up and burn from inside!!!!! true??????????

    hi Mmm ive been told that installing linux on mac book pro retina 15 and even others and using it as my first sofware will make the mac heaqt up and burn from inside!!!!! true??????????

    hi Mmm ive been told that installing linux on mac book pro retina 15 and even others and using it as my first sofware will make the mac heaqt up and burn from inside!!!!! true??????????

  • Using Pro Logic X to record. I have several tracks and I'm trying to record an audio track. I have the mic connect to Avalon 737 then into apollo interface. When I record all track are being recorded into that track. I can't just get the audio to record.

    Using Pro Logic X to record. I have several tracks and I'm trying to record an audio track. I have the mic connect to Avalon 737 then into apollo interface. When I record all track are being recorded into that track. I can't just get the audio to record.

    Thanks for responding. Everything seems to work right except for the when I plug into the 737. Ok let me see if I can be more clear. I had this set up done with two representatives of Neumann, and DBox. Here it is I hope this helps. 32 Channel snake (24 Inputs 8 outputs) Channels 1-8 from snake to my Octopre for Drums. From Octropre output quarter inch lines into the Apollo 2, quarter inch input. This is so that the Apollo 2 is taking the drum tracks. Snake Channel 9-12 into Apollo 1 channels 1-4 xlr. Snake Channel 13-16 into Apollo 2 Channels 1-4 xlr. Snake Channel 17 into the 737, output of 737 into Channel 5 of the Apollo 1 quarter inch.
    Ok The Dbox. Sum output L&R into channel input 7&8 of Apollo 1. Apollo 1 output channels 1-8 into summing input channel 1-8 of Dbox. Apollo 1 main L&R going to main analog input L&R of Dbox. Spid out to DAW input of Dbox. I have both ADAT of both Apollos connected by optical wire. Also have port 2 of Apollo 1 into port 1 of Apollo 2 connected by Firewire.  Let me know. Hope I got it right. Thanks for responding.

  • Oracle9i connect sybase use ODBC

    hi,everyone
    i configure a hsodbc to non-oracle(sqlserver7) database, under win2k platform, it works fine. now i configure it under Solaris platform to Sybase, i download a DataDirect ODBC driver for Sybase. when i create a database link in sqlplus, i select some data from sybase, it work error,error message is:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][C077] Could not find symbol 'SQLAllocConnect'
    in dynamic library
    [C079] Failed to load dynamic library '/opt/odbc/lib/libodbc.so'
    i use command elfdump look for SQLAllocConnect symbol, it include in libodbc.so.
    my oracle is 9.2.0, anyone know why it run error?

    yes, i add the env LD_LIBRARY_PATH in the listener.ora file, but it still work error. the SQLAllocConnect function entry is in the libodbc.so file. generally application using ODBC will call the SQLAllocEnv first, if invokation successful, then invoke the SQLAllocConnect function. i specify HS_FDS_SHAREABLE_NAME = /opt/odbc/lib/libodbc.so in the inithsodbc.ora file, sqlplus should be found SQLAllocConnect.
    anyone encounter this situation?

  • How to connect macbook pro to panasonic tv with hdmi cable

    How to connect macbook pro to panasonic hd tv with hdmi cable

    Hi m,
    It depends which MPB you have and the inputs on the TV. The following assumes your TV has an HDMI input which will work with a computer.
    This is if your MBP is from April 2010 or newer:
    http://support.apple.com/kb/HT4241
    First connect the adapter to the MBP and the HDMI cable from the adapter to the TV, then go to System Preferences > Sound > Output > select HDMI.
    Or if your MBP is older than that and you have a Mini DisplayPort, you can use something like this: http://eshop.macsales.com/item/NewerTech/CBLMDPHDMID/
    If it's older than that, for video you need a DVI or mini DVI to HDMI or whatever input your TV has. For audio, you need a 3.5mm stereo mini plug to RCA or optical (Toslink), depending on what audio input your TV has.

  • Connecting Macbook Pro 15" to Samsung HDTV - Audio Problem

    Hey guys,
    I'm new to these forums so I hope i'm posting this in the correct section! On to my problem...I have a MacBook Pro 15" 2.8 GHz- Late 2009 (model: MB986LL/A) and I'm currently trying to connect it to my new TV which is a Samsung LCD HDTV (model: LN46C610).
    The video connection is perfect. I'm using Apple's Mini-DisplayPort to DVI, via DVI to HDMI to my TV.
    The audio connection for some reason is not working.
    I've tired using an RCA cable, which has a regular audio jack on one end, and the 2 coloured wires (yellow + red) at the other end. No luck.
    Now I was told to buy a Mini-Toslink cable to connect from my TV to my MBP. I've plugged the Optical Cable into the TV and the other end to my MBP. Yet I still have no sound.
    Can anyone please guide me on how to set this up? Maybe i'm doing something wrong or i'm using the wrong cable. Any help would be greatly appreciated!
    Thanks!
    Karman

    Ok i'm in the Utility but i'm confused...where would I go to select it to change the output?
    Because everywhere i've tried...I don't see an option to change it...
    *EDIT: ok I've noticed when I plug in the mini-toslink cable to my MBP, i notice the output source changes from Internal Speakers to Digital Output*
    *EDIT #2: Still no sound when I do that...also on the back of my TV, the digital output connection use to have a red light in it, and now it doesn't anymore?*
    null

  • Having problems connecting MacBook Pro 2010 TO vizio 60 " tv

    having problems connecting MacBook Pro 2010 TO vizio 60 " tv using mini displayport to VGA adapter
    non support warning appears pn tv monitor

    However, I still don't get a view of anything on the desktop except for the standard Apple swirl.
    Can you drag windows to the other display?
    In the "Arrangement" tab of "Displays" system preference, you can drag the display pictures to match the actual arrangement, drag the menu bar to the other display, or enable mirroring.

Maybe you are looking for

  • Frm-40502: oracle error: unable to read list of values

    Hi All, I am personalizing the assignment form, where we need to restrict the JOB LOV based on Organization value. In Forms Personalization we are creating the record group from query and attaching to Job field. The query is, SELECT DISTINCT j.NAME,

  • Can't back-up contacts from N73

    When backing up my N73 using PC Suite, I continually get a failed message. The log shows that the contacts back-up has failed as it can't be restored to other phones. Is this normal? Is the only way of backing-up the contacts to synchronise with anot

  • How do I get IOS v10.9 onto my Macbook pro ?

    Since posting the question below, I found an answer that I believe will solve my problem. I need to go to the Apps Store and get the Mevericks OSX free upgrade. Looking for 10.9 will not help, must be Mavericks. Why Applw couldn't have said that in t

  • How do I get to speak to a management level executive to resolve a denial of 3-$100 / line credits

    In March of this year I signed up for 3 new lines and was assured by the sales representative Mr. Christopher (removed) that each line would receive a $100 credit.  Over the past 5 months each time I contacted customer service about the credits, I wa

  • Purchase order item(2lis_02_itm) and 0PUR_O01  transformation

    Hello, I'm trying to populate  DSO 0PUR_O01 with  standard DS 2LIS_02_ITM Purchase Order Items The mappings are not copied after BCT installation. so i have  trouble in mappings some of the  keyfigures of 0PUR_O01 with the extractor fields. It's conf