Results 1 to 2 of 2

Thread: Hi

  1. #1
    Join Date
    Nov 2004
    Posts
    3

    Exclamation Unanswered: Hi

    I have to connect DB2/400 in C++. i am having 2 options given
    1) By ADO connection
    2) By DB2 libraries provided by DB2.

    Can anyone tell me which option is better and why

    I am not aware of DB2 libraries also and how to connect with them

    Thanks
    Ashish

  2. #2
    Join Date
    Nov 2004
    Posts
    8

    Connect DB2/400 in C++

    It depends...

    Microsoft's ActiveX Data Objects give you a high level interface that add abilities that you may or may not need and involve ActiveX, OLE and ODBC.

    The DB2 libraries will give you direct data access and low overheads.

    If you know ADO and slower speed and greater size do not matter or you want flexability - use it.

    If you want speed and as small a footprint as is possible then use the DB2 libraries. The interface should be a basic set of open/connect, close, read, write, create and modify functions and possibly SQL and other high level functions.

    Here's an example of a direct interface in Perl from an article I wrote:

    http://www-128.ibm.com/developerworks/edu/l-dw-linuxperl-i.html'

    Read up at:
    http://msdn.microsoft.com/library/de..._oledb-db2.asp
    Last edited by twburger; 11-18-04 at 20:43.

Posting Permissions

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