X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=web%2Fibmdb2;h=3f148232652e5cb1f3b4f7cadf24a4341471fbd4;hb=0d70288ef4305a7c88b1e63d6909218dd5b04691;hp=3c149563380212fe81619954744959aa18088f4f;hpb=c40860f8f6073bf2e89beb08857b7e5b1cfb39bc;p=mono.git diff --git a/web/ibmdb2 b/web/ibmdb2 index 3c149563380..3f148232652 100755 --- a/web/ibmdb2 +++ b/web/ibmdb2 @@ -1,17 +1,24 @@ * IBM DB2 Data Provider ** Current Status @@ -22,6 +29,8 @@
  • Able to connect to IBM DB2
  • Able to execute DML, such as, CREATE TABLE via ExecuteNonQuery()
  • + +
  • Christopher says it can retrieve data via the DB2ClientDataReader
  • @@ -49,6 +58,21 @@ In order to test.
  • If you do not have the source to mcs, get the source from here
  • +
  • Has a ConnectionString format like ODBC
  • + +
  • Here is a ConnectionString format if you have a DSN setup: +
    + "DSN=dataSetName;UID=myuserid;PWD=mypassword"
    +
    +
  • + +
  • Here is a ConnectionString format if you do not have a DSN (have not + gotten this to work though, so, I am open to suggestions): +
    + "DRIVER={DB2 Driver};SERVER=localhost;DATABASE=test;UID=myuserid;PASSWORD=mypassword"
    +
    +
  • +
  • In mcs/class/Mono.Data.DB2Client/Test/DBConnTest, you will find a DBConnTest.cs.
  • @@ -87,13 +111,14 @@ mono DBConnTest.exe database userid password string connectionString = "DSN=sample;UID=db2admin;PWD=mypass"; IDbConnection dbcon = new DB2ClientConnection(connectionString); + dbcon.Open(); IDbCommand dbcmd = dbcon.CreateCommand(); string sql = "CREATE TABLE mono_db2_test1 ( " + " testid varchar(2), " + " testdesc varchar(16) " + ")"; - dbcmd.ConnectionString = sql; + dbcmd.CommandText = sql; dbcmd.ExecuteNonQuery(); dbcmd.Dispose(); dbcmd = null;