Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2009
    Posts
    3

    Unanswered: Duplicate logon to DB2

    Running a Powerbuilder 6.5 app, used to connect to MF database thru Sybase Direct gateway Connection. Attempting to convert to IBM DB2 ODBC (8.01) gateway, when app attempting to connect to the DB, the ODBC component seems to invoke another logon window 'Connect to DB2 Database', requiring duplicate logon process.

    First logon procedure is Powerbuilder front end which passes all the parameters via 'sqlca' transaction object...I've checked the values passing from Powerbuilder, and the values seems to be all correctd.

    Somehow when doing this conversion, ODBC invokes its own layer of logon window.

    Anyway to successully pass parameters to ODBC w/o invoking another ODBC logon screen?

  2. #2
    Join Date
    Aug 2009
    Posts
    23
    It's been a while, but I recall that PowerBuilder allows complete CONNECT syntax in its VB-like language. I do not think that you will be prompted by ODBC if you specify both user ID and password on CONNECT.

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by Somasundaram1
    what is connect?
    I will make a deal. You explain about TSM backups of a DB2 database and I will explain "connect." This guy is a troll.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Aug 2009
    Posts
    23
    Quote Originally Posted by Marcus_A
    I will make a deal. You explain about TSM backups of a DB2 database and I will explain "connect." This guy is a troll.
    Marcus, I think you appended to the wrong thread. What are you talking about? What is this about TSM and troll? ... ?

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by LD_Bronstein
    Marcus, I think you appended to the wrong thread. What are you talking about? What is this about TSM and troll? ... ?
    Somasundaram1 was trolling and all his posts have been deleted. That is why it looks like I posted in the wrong thread.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  6. #6
    Join Date
    Oct 2009
    Posts
    3
    Quote Originally Posted by LD_Bronstein
    It's been a while, but I recall that PowerBuilder allows complete CONNECT syntax in its VB-like language. I do not think that you will be prompted by ODBC if you specify both user ID and password on CONNECT.
    Yes! you are right, I don't want to get into PB too much, but to be brief...PB has 'DBParm' which read from a .ini file that includes as optional UID and Pass. If I hard code these parameters, then Yes! it connects w/o the additional DB2 logon screen from ODBC.

    But since login will be dynamic, and password changes frequently, logon screen will load all the parameters to 'sqlca' transaction object and pass to ODBC...it seems to capture all the parms (ID pass...etc), but still no go once calling ODBC...

  7. #7
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by syrider
    logon screen will load all the parameters to 'sqlca' transaction object and pass to ODBC...
    Unless you are talking about some other SQLCA, its purpose is to return status information _from_ DB2 to the application, so I doubt you can pass anything _to_ ODBC via SQLCA. I don't know much (read: anything) about PowerBuilder but I'm sure there should be a way either to compose the ODBC connection string dynamically or to set individual connection attributes before opening a connection.
    ---
    "It does not work" is not a valid problem statement.

  8. #8
    Join Date
    Oct 2009
    Posts
    3
    Quote Originally Posted by n_i
    Unless you are talking about some other SQLCA, its purpose is to return status information _from_ DB2 to the application, so I doubt you can pass anything _to_ ODBC via SQLCA. I don't know much (read: anything) about PowerBuilder but I'm sure there should be a way either to compose the ODBC connection string dynamically or to set individual connection attributes before opening a connection.
    SQLCA is a transaction object, it should pass all the collected values from the app to ODBC to make the connection, then pass the connect status back to app.

    could not figure out why the SQLCA won't pass the ID and PASS info, but I've coded to dynamically populate the 'DBParm' ....works like a charm!

Posting Permissions

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