1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

getting clob from progress DB by ODBC

Discussão em 'StackOverflow' iniciado por fdantas, Janeiro 5, 2015.

  1. fdantas

    fdantas Administrator Moderador

    I am using C# asp.net to connect Progress DB by ODBC. It works fine for selecting some short data (such as integer, string...)

    However, when selecting a clob field, some data is missing. It seems the system can get the character with length 2047 only.

    For the below code, part of clobrecord can be selected from the DB only. For example, if clobrecord has 10000 character, the first 2047 characters can be selected, the next 2048 characters are missing, the next 2047 characters can be selected, the next 2048 is missing .....

    Is there any method to fixing this problem?

    <connectionStrings>
    <add name="testDB" connectionString="DRIVER={Progress OpenEdge 10.2B Driver};HOST=localhost;PORT=23456;DB=testdb;UID=XXXXXXXX;PWD=YYYYYYYY;DIL=0;" providerName="System.Data.Odbc" />
    </connectionStrings>



    string strSQL;
    strSQL = " Select b.clobrecord ";
    strSQL += " , a.Action ";
    strSQL += " , a.TableName ";
    strSQL += " , a.PKFields ";
    strSQL += " , a.PKValue ";
    strSQL += " FROM pub.tablea a, pub.tableb b ";
    strSQL += " WHERE a.TransactionID = ? ";
    strSQL += " AND b.EntryID = a.EntryID ";
    OdbcCommand cmd = new OdbcCommand(strSQL, odbcconn);
    cmd.Parameters.AddWithValue("TransactionID", "test");

    OdbcDataReader datareader = cmd.ExecuteReader();
    DataTable xmlinfo = new DataTable();
    xmlinfo.Load(datareader);
    sqltxn = sqlconn.BeginTransaction();
    foreach (DataRow dr in xmlinfo.Rows)
    {
    }

    Continue reading...

Compartilhe esta Página