SERVER数据转换ORACLE问题![5]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 xjaifly 的 blog

    oraclecommand oraclecomd = new oraclecommand(str,oracleconn);
    object obj = oraclecomd.executescalar();
    if(obj != null)
    {
     id = convert.toint32(obj);
    }
    //id  = int.parse(oraclecomd.executeoraclescalar().tostring());
    #region
    //   object obj = oraclecomd.executereader();
    //   if(obj!=null)
    //   {
    //    id = convert.toint32(obj);
    //   }
    //   if(obj >1)
    //   {
    //    id = convert.toint32(obj) + 100;
    //   }
    #endregion
    oracleconn.close();
    oracleconn.dispose();
    //dr1.dispose();
    
   }
   catch(exception ex)
   {
    debug.fail(ex.message +"-"+ ex.stacktrace);
   }
   return id;
  }
这里随你怎么写!无论是要什么值只要在其他表中有关联的字段,就可以获得你想要的数据!
程序写到这里也差不多完了。这是我想到的一种方法!
大家有什么好方法共享写大家一起学习!
多指教!!!

本文关键:SERVER数据转换ORACLE问题!
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top