occi Clob转换为std::string

来源:互联网 发布:简述单片机的控制原理 编辑:程序博客网 时间:2024/05/21 01:51

     oracle::occi::Clob the_clob = prs->getClob(2);
     
     unsigned int cloblen = the_clob.length();
     char time_char[cloblen];
     memset(time_char,0,cloblen);
     if (!the_clob.isNull()) 
     {                    
                 if (cloblen > 0)
                 {
                      the_clob.open(oracle::occi::OCCI_LOB_READONLY);
                         the_clob.read(cloblen, (unsigned char*)time_char, cloblen * 3, 1);
                         the_clob.close();
                  } 
       }
0 0
原创粉丝点击