If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Hi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-17-04, 06:32
a_anand_78 a_anand_78 is offline
Registered User
 
Join Date: Nov 2004
Posts: 3
Exclamation 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
Reply With Quote
  #2 (permalink)  
Old 11-18-04, 19:37
twburger twburger is offline
Registered User
 
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 19:43.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On