Do you know how to connect to the DB2 database?

Source: Internet
Author: User
At present, my machine has installed Borland's C # builder. It should be said that it supports Oracle and DB2 databases. I added bdpconnection in vs.net 2003. After configuration, I reported that my database could not be found, my database connection is like this:

Database = ehrm; username = db2admin; Password = davixiong; server = grd-build1.

ConnectionCodeAs follows:

Borland. Data. db2.db2connection db2conn = new Borland. Data. db2.db2connection ();
Int result = db2conn. Connect ("ehrm", "db2admin", "davixiong", "grd-build1 ");
Borland. Data. db2.db2command db2cmd = new Borland. Data. db2.db2command (db2conn );
Result = db2cmd. Prepare ("select * From psnaccount", 0 );
Borland. Data. Common. isqlcursor sqlcur = new Borland. Data. db2.db2cursor (db2cmd );
Short rescols = 0;
Result = db2cmd. Execute (Out sqlcur, ref rescols );

It has never been possible to successfully connect from the client to the DB2 database server.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.