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.