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

Similar Messages

  • In the ReportDocument.Load method it tries to connect using the using the connection information embedded in the Report File

    Post Author: bhaveshbusa
    CA Forum: Crystal Reports
    In the ReportDocument.Load method it tries to connect using the using the connection information embedded in the Report File. When the application calls ReportDocument.Load(reportFileName). This
    tries to connect to the database using the connection information embedded in
    the "reportFileName". This was only realised on checking the ODBC Trace
    Log. The connection itself is not a problem. The problem is that the embedded
    connection information is related to OLD production system. And failed
    connections had raised some concerns.
    Note: I am using
    SetDataSource to populate the data for the report. So I don't need the
    connection.
    Is there any way I
    can disable this auto-connect?
    Thanks and
    regards,
    Bhavesh

    960738 wrote:
    I need a help in answering one of the issue encountered last week.
    I have created a database link and tried to access the information from a table using the program written in another language. The password provided was incorrect for that user while creating database link. So we expected that,while retrieving the data, Database connection has to be errored out as password provided is incorrrect.
    But unfortunately, user account was locked out. When i checked with DBAs they mentioned that it tries to connect 16 ports with in a min of time.we were shocked as it STOPS another scheduled jobs with that user. and affects production badly.
    As per the program, it has to connect only one time and yesterday we tried to execute the program in DBAs observation and it errored out as expected. Didn't tried for multiple ports.
    Now the question is, WHY the database connection established 16 times last week and caused user account locked. DBAs are unable to answer it. Any EXPERTs opinion on this would greatly appreciated.
    I have verified managing ports in oracle documentation, it was mentioned that if one port is busy it will try to connect to another port in the range of ports mentioned during the installtion. DBAs verified ports related file and it was blank. and they are not agreeing with this reason. Please HELP me in finding the correct REASON for this.
    is it a NETWORK issue or issue with DATABASE SERVER only?
    Thanks
    SSP
    Edited by: 960738 on Sep 22, 2012 9:13 PMDBLINK is 100% oblivious to the fact any port exists.
    DBLINK only contains username, password & TNS Alias.
    can you post actual SQL & results?

  • Trying to connect Macbook Pro and IMac...suggestions?

    Trying to connect Macbook Pro and IMac with Apple Remote desktop or a cable.  They do share a wifi router.
    Thanks much!

    not sure if you found an answer to this.  I just got a mb pro and want it to connect to my imac (late 2009).  I set up sharing on hte imac, file sharing and dvd/cd sharing.  from the mbpro i simply went to finder>go>connect to server.  I entered the name as on my imac (xxx.local) and immediately connected.  This was a massive help to me as I had some software (aperture, office for mac) that were on drive and the new mbpro doesn't have a disk drive.  through sharing I could access the disc drive remotely via my mbpro and load the software that way.  worked beautifully on my wifi (which is apple airport extreme). 
    Hope this helps.

  • Newbie trying to connect to Oracle using ojdbc14

    Hey Programming Pals;
    I am trying to connect to a remote oracle data base.
    I have installed oracle client (allowing me to be able to connect with PL/SQL developer).
    Now I need to connect with JDBC.
    I down loaded ojdbc14 and put it in my tomcat bin directory.
    I than made an entry in path and in classpath to this jar file.
    Here is the code I am using to try and connect with:
    try
    {                                                DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    catch (ClassNotFoundException c)
    System.out.println("Could not load the ODBC driver:" + c);
    Here is the error I am getting:
    An error occurred at line: 38 in the jsp file: /jsp/form.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\jhtp5\jsp\form_jsp.java:85: package ojdbc14.oracle.jdbc.driver does not exist
                                            DriverManager.registerDriver(new ojdbc14.oracle.jdbc.driver.OracleDriver());
    I browsed through the jar and verified this path exists. Why can't the jvm find it?
    Here are my system variables:
    CLASSPATH:
    .;D:\Program Files\Apache Group\Tomcat 4.1\bin\ojdbc14.jar
    PATH:
    D:\Program Files\Apache Group\Tomcat 4.1\bin\ojdbc14.jar;D:\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
    Any help would be appreciated.
    Luke

    Tomcat doesn't use the System classpath.
    Put the ojdbc14.jar file in the web-inf/lib directory of your web application, restart Tomcat, and try again.
    Cheers,
    evnafets

  • Trying to connect using Network Browser, AppleTalk

    I am trying to connect to another computer in my office. I go to the Apple Menu, Network Browser, AppleTalk, click AppleTalk and usually the name of the other computer that I want access to appears in the list, the last two days the other computer name does not appears in the AppleTalk list? Do you have any helpful ideas to how I can access my other computer?
    Message was edited by: Wet irish
    Sorry for the two posts!

    If the other computer and your computer do not BOTH have AppleTalk ON, and assigned to the same medium (typically Ethernet) you will not be able to connect.
    If either computer is losing its PRAM backup battery, a power fluctuation can corrupt the parameters, including AppleTalk settings.
    If either computer is upgraded to 10.4 or later, AppleTalk File Sharing was removed at that point, so you will have to connect using IP. You can click on the big button in the Chooser, "Server IP Address", and enter the other computer's IP address. \[The other computer is acting as a Server in this case.]

  • Error message "not connected via PPPoE" when trying to connect using airport wireless

    I cannot connect to my wireless internet connection using my ibook laptop. Using airport, I keep getting the message "host cannot find the PPPoE" or something like that. Any ideas how to fix this?

    Hi, Bob. Welcome to Apple Support Communities.
    Which exact iBook model is it? ("iBook" covers a lot of different Mac models, each with different capabilities.)
    You can choose from this list:
    http://www.everymac.com/systems/apple/ibook/index-ibook.html
    Which version of the operating system is it running now?
    What kind of optical drive does it have? (CD-ROM, CD-RW, DVD, Combo, or SuperDrive?)

  • HT1338 Trying to connect Imac Pro 10.7.5 to Cannon Pixma M3550

    Trying to add a canon pixma printer MG3550 to my imac pro version OSZ 10.7.5. I cant seem to find a printer driver for it. Afer updatigng the software in Apple it only shows the MG3200 series of Pixmas. Can anyone suggest anything else to do. Everything looks fine. It just wont print anything. Im trying to do this via USB  so the printer is connected and not wi fi.

    http://www.canon-europe.com/Support/Consumer_Products/products/Fax__Multifunctio nals/InkJet/PIXMA_MG_series/PIXMA_MG3550.aspx
    Be sure to select the Mac OS X 10.7.x drivers by operating system along wiht your language.
    Note, if it does not work, you may need to install this update before, or after for it to work:
    http://support.apple.com/kb/dl899

  • 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.

  • Trying to connect using a wireless ethernet adapter

    trying to setup a wireless connection on my deskjet 3510 allin one tried every solution on spin doctor put nothing worked.
    I don't have a router I connect to the internet through a turbo stick.    My computer uses a an 802.11n network adapter
    This question was solved.
    View Solution.

    Turning on Wireless Direct:
    on the 3510
    - press the wireless button (the one with the blue light in it)
    - select Settings
    - select Wireless Direct
    - press OK
    - select on (you can choose to use security or not
    - press OK
    Wireless direct should be on.  If you choose security you will want to display the password as you will need it when you connect the computer to the printer.
    on your computer
    - make sure the wireless adapter is turned on
    - search for wireless networks (not sure of your computers operating system so I can't give specifics)
    - look for a network with a name like "HP-Print-xx-Deskjet 3520 Series"
    - connect to that network (use the password from the printer
    - configure your printer driver (it should now see the printer - the printers IP address should be 192.168.223.1)
    Assuming that you connected and the printer driver got updated you should now be able to print.
    Connecting the computer and printer in this way dows not allow internet access from the the computer to the printer so unfortunately ePrint will not work.
    Please mark the post that solves your problem as "Accepted Solution"
    Sometimes it takes several posts back and forth to get to a solution - please be patient.
    I am employed by HP

  • HT4528 I have 3 iPhones, one Ipad, and two PC's that I have tried to "connect" using one iTunes account and am having issues.I connected iPhone #3 to one PC, it removed all contacts from iPhone #3, replaced w/ contacts from iPhone #2. How can I get back?

    I have 3 iPhones, one iPad and 2 PC's, all using the same iTunes account.  I want to be able to have each iPhone keep their own list of accounts and music list and the I pad different as well.  I want to 2 PC's music list to match.  How do I do this?
    Additionally, when I connected iPhone #3 to one PC, it removed the contacts from #3 and replaced it with contacts from iPhone #2.  How do I get those contacts back and prevent this from happening again?

    Hey joshuafromisr,
    If you resintall iTunes, it should fix the issue. The following document will go over how to remove iTunes fully and then reinstall. Depending on what version of Windows you're running you'll either follow the directions here:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    http://support.apple.com/kb/HT1925
    or here:
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    http://support.apple.com/kb/HT1923
    Best,
    David

  • ORA-12154 trying to connect using TOAD

    Hi all,
    I have Oracle 10G up and running on W2K, and working fine with sqlplus.
    I have setup the registration KEYS (HKEY_LOCAL_MACHINE/...) so TOAD can look at the proper Database, but when I try to connect, I get the famous (and frustrating!) "ORA-12154: TNS:listener does not currently know of service requested in connect descriptor".
    the TNSPING works fine as well as requested in the TOAD help file.
    I don't really know what I have to do at this stage. Any idea is welcome.
    Thanks,
    Philippe Le Mounier

    Try this:
    set ORACLE_HOME and ORACLE_SID environment variables to the correct values by right clicking on "My Computer" on desktop and clicking:
    Properties -> Environment Variables -> New
    And then try connecting to TOAD.
    I would suggest restoring the registry entries to their original values (since the connecting should work without changing any registry entries).

  • I have an 2009 imac running os 10.6.8 and a newer macbook air which I'm trying to connect using a wireless network without success, help?

    I have already set up and selected sharing in the system preferences but keep getting the error that the server may not exist?
    I'm not sure if I've done this right?  I'm completely not computer savvy and would appreciate any and all step by step guidance.

    On both computers I selected the file sharing, printer sharing and screen.  Then when I go to either finder - go - connect to server i get the following message:
    The server may not exist or it is unavailable at this time. Check server name or IP address, ......

  • Having trouble connecting Macbook Pro to Samsung HDTV

    Hello all,
    I am operating a Macbook Pro mid-2012 with OS 10.8.2. I have a Samsung Smart TV and I am trying to connect using Belkin HDMI cable and mini port adapter. I've run searches for firmware updates and come up with nothing.
    I have tried all three HDMI ports on the TV in conjuction with connecting to my mini display port. I always have the correct input selected on the TV for the port I am trying.
    When I plug into the Macbook, the screen goes off for a second and then returns as if it recognizes when I plug in but nothing on screen.
    What I get on the TV Screen:
    NO SIGNAL
    1-check the cable connections and the settings of your source device (the cable is connected, the settings may be a problem)
    2- Press SOURCE on your remote to select connected source device (as noted above, I've done that each time)
    When I go into System Preferences>Displays>I get two options display and color then best for built-in display or scaled and a brightness slider...that's it.
    I'm stumped. Please help.

    Please post what specific Belkin cable you have.  Another user was trying to do this same exact thing a few days ago and the Belkin cable they had bought was an older Mini DisplayPort to HDMI converter.  The 2012 MBPs like yours have a Thunderbold port on it that's exactly the same dimensions as the old Mini DisplayPort ports are.  While the Thunderbold port is supposed to be backwards compatible with older Mini DisplayPort devices, perhaps this Belkin converter has some compatibility issues with it.  Their adapter was an all gray one bought from Walmart.

  • IChat is unable to connect using a .Mac account

    Hello,
    I have tried to connect using iChat and a .Mac account (no, I do not have an AIM membership and am only a .Mac member).
    When I tried to add a friend to the buddy list (there are only Bonjour and AIM lists available, but I'm a member of neither), the AIM list simply says "connecting..." but the connection never completes. I've sometimes waited for hours for the connection.
    At this moment, the settings in the iChat program are:
    server: slogin.oscar.aol.com
    port: 5190
    Use SSL is checked.
    I also tried login.oscar.aol.com, port 5190, and left the SSL option unchecked. Neither method works at all. Is there a reason it won't connect to the server? Also, why does it use an AOL server? Do they host .Mac accounts?
    Ryan

    Same problem here... I haven't been able to get iChat to work in days. I have tried changing to port 443 and my password is perfectly acceptable etc but it hangs on "connecting" and then just disconnects or gives me the message "connection could not be completed because it timed out"
    nothing on my end has been changed in years but Apple was working on system maintenance a few days ago and that is when I lost iChat. The .Mac system status message area says"Due to scheduled maintenance, 100% of members could not access .Mac services. Normal service has been restored." but that is obviously bunk. I am not the only one... a friend of mine locally has the same issue. I think someone at apple has screwed something up!

  • SSL error when IE 4.72 tries to connect to webserver

    At least one 40-bit browser (IE 4.72) is producing this error
    when trying to connect using SSL to webserver:
    [11/Dec/2001 15:37:23 08295] [trace] OpenSSL: Loop: SSLv3 read
    client hello A
    [11/Dec/2001 15:37:23 08295] [trace] OpenSSL: Loop: SSLv3 write
    server hello A
    [11/Dec/2001 15:37:23 08295] [trace] OpenSSL: Loop: SSLv3 write
    certificate A
    [11/Dec/2001 15:37:23 08295] [trace] OpenSSL: Loop: SSLv3 write
    server done A
    [11/Dec/2001 15:37:23 08295] [trace] OpenSSL: Loop: SSLv3 flush
    data
    [11/Dec/2001 15:37:23 08473] [trace] OpenSSL: Exit: error in
    SSLv3 read client certificate A
    [11/Dec/2001 15:37:23 08473] [trace] OpenSSL: Exit: error in
    SSLv3 read client certificate A
    [11/Dec/2001 15:37:23 08473] [error] SSL handshake interrupted by
    system [Hint: Stop button pressed in browser?!] (System error
    follows)
    [11/Dec/2001 15:37:23 08473] [error] System: Connection reset by
    peer (errno: 131)
    Have not been able to reproduce it on other browser versions yet.
    No 128-bit browsers have gotten this error.
    I'm using iAS 1.0.2.2.
    My certificate from Verisign is 128-bit with step-down to 40-bit
    for Export security browsers.

    I had the same problem. In my case, Forms with SSO over SSL worked from the intranet, but not from the internet over the firewall. In the FW log, I found requests from my browser to the iAS at port 7778, on which runs the middle tier iAS, but that is blocked by the FW (we use WebCache at port 80 as a proxy).
    Last time the ssoreg from the middle tier ran with -mod_osso_url http://<server_name>:7778, as indicated by the ssoreg.log. I reregistered the middle tier by means of ssoreg with -mod_osso_url http://<server_name>:80, restartet the http server from the middle tier, it corrected the error.

Maybe you are looking for

  • How do I find out or know if everything is backed up before I upgrade to ios 6?

    before I update to ios6 how can I make triple sure that all my music, photos, contacts, notes, and messages are all backed up? in settings I have my iPhone 4 programmed to back up to the iCloud - but how do I know for sure that everything is there? I

  • T40P ACCESS IBM BUTTON DOES NOT WORK AFTER INTIAL OPENING AND MUSIC PLAYS ????

    Hello, from a very un-savy laptop and computer user,my T40P thnk pad doesnt work when you push ACCESS IBM BLUE BUTTON,??Ive tried to uninstall some of the IBM componets,But not haveing a real clue as what to uninstall ,i i did uninstall a few that a

  • Ad hoc not checking subtype authorization correctly

    Hello, I have an ad hoc query that returns data for a particular subtype (4) from infotype 6.  I have given authorizaion for the infotype/subtype but the query does not return any data.  The Display Authorization Data (SU53) shows that subtype 1 is r

  • Setting Portlet Properties in Development

    I am trying out the Portal 9.2 Trial, so am very new to this. I have created a very simple JSP Portlet in Workshop and created a "Message" Preference for this Portlet with a default value of "Hello World". I have created an instance of this Portlet i

  • N70 Music Files - Default File Location

    When I transfer music to my N70 using PC Suite, the default file location is \Sounds\Digital. Should I just change the default to \Music, or is there some reason why this location is the default?