Connect error:Error while trying to retrieve text for error ORA-12545

From: Minho Park <javatime_at_techway.co.kr>
Date: Wed, 1 Sep 1999 15:48:33 +0900
Message-ID: <7qii8k$f7t$1_at_news.nuri.net>



Please help me. I 'm sorry my poor English. When I compile below source and execute, I meet error messages.

Connect error:
Error while trying to retrieve text for error ORA-12545

  1. os : aix 4.3.2 + apache web server 1.3.6
  2. source
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <sqlca.h>
    #include "qDecoder.h"

char *username = "hanvit";
char *password = "hanvit#";

    char * id;
    char * jumin1;
    int count;
void sql_error(msg)

    char *msg;
{

    EXEC SQL WHENEVER SQLERROR CONTINUE;     printf("\n%s", msg);
    printf("\n% .70s \n", sqlca.sqlerrm.sqlerrmc);

    EXEC SQL ROLLBACK WORK RELEASE;
    exit(EXIT_FAILURE);
}

/************* receive data function() *******************/
void receive_data()
{

    id = qValue("id");
    jumin1 = qValue("jumin1");
}

/***************** confirm of data function() ************/
void confirm()
{

    char * result;

    if(count == 0)
 result = "No user id";

    else
 result = "user id SUCCESS";

    printf("Content-type:text/html\n\n");
    printf("<html>\n<body>\n");
    printf("%s\n",result);
    printf("</body>\n</html>\n");

}

void main()
{

    receive_data();

/* for nobody.....*/

    putenv("ORACLE_HOME=/hanvit/oracle8/app/oracle/product/8.0.5");
    putenv("ORACLE_SID=ORA8");
    putenv("NLS_LANG=American_America.KO16KSC5601");
    putenv("LD_LIBRARY_PATH=/hanvit/oracle8/app/oracle/product/8.0.5/lib");

/* Connect to ORACLE. */

    EXEC SQL WHENEVER SQLERROR DO sql_error("Connect error:");

    EXEC SQL CONNECT :username IDENTIFIED BY :password;     EXEC SQL WHENEVER SQLERROR DO sql_error("Oracle error:"); /* Declare a cursor for the FETCH. */

    EXEC SQL /*-------------------------------------*/

 SELECT count(*)
 INTO :count
 FROM NewMemberTable
 WHERE id = :id and jumin1 = :jumin1 ;

/* Disconnect from the database. */

    EXEC SQL COMMIT WORK RELEASE;  count = 1;

    confirm();
    exit(EXIT_SUCCESS);
} Received on Wed Sep 01 1999 - 08:48:33 CEST

Original text of this message