Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    5

    Unanswered: ESQL-C Database connectivity

    we have an esql-C code which establishes Database connectivity using a structure

    EXEC SQL connect to : <database ID>

    database ID is in the format Database_Name@Host_name

    i wish to know how it is able to establish without us providing username and password. We are currently running this code on a HP-Unix system. Is there some sort of mapping in some system file on our UNIX box, which helps us do this. can some1 elaborate on this?

    thnx

    ./aditya

  2. #2
    Join Date
    Nov 2003
    Location
    Mumbai, India
    Posts
    92
    Hi,

    You are running an esqlc generated object from the backend itself, while doing so you have already "logged in" as one of the system's authentic user providing a valid password. Right?

    So, while you have logged in, you must have derived certain environment variable too. They point you to certain locations and values. CONNECT statement makes use of all these components.

    Hence, CONNECT TO 'testdb' ;
    does not require user authentication,However:

    CONNECT TO 'testdb' USER 'informix' ;
    will validate the user authenticity dynamically at runtime.

    CONNECT TO 'testdb' USER 'informix' USING USING auth_variable ;
    feeds the required information to the connect statement. However, USING clause is unsupported in DB-Access object.

    Regards,
    Shriyan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •