读取oracle blob字符串
OleDbConnectioncon=newOleDbConnection(cnnstr);
try
{
con.Open();
}
catch
{}
OleDbCommandcmd=newOleDbCommand(strSQL,con);
System.Data.OleDb.OleDbDataReaderdr=cmd.ExecuteReader();
while(dr.Read())
{
stringdd=dr["gggg"].ToString();
byte[]ooo=(byte[])dr["hhhh"];
stringstr;
str=System.Text.Encoding.Unicode.GetString(ooo);
this.textBox1.Text=str;
}
}
//向数据库中写入
private void button1_Click(object sender, EventArgs e)
{
oracleConnection1.Open();
OracleCommand cmd = new OracleCommand("UPDATE TEST SET F2 =:blob where F1=:sn ", oracleConnection1);
cmd.Parameters.Add(new OracleParameter("blob",OracleType.Blob));
cmd.Parameters.Add(new OracleParameter("sn",OracleType.Int32));
FileInfo fi = new FileInfo("c:\\dos.doc");
FileStream fs = fi.OpenRead();
byte[] MyData = new byte[fs.Length];
fs.Read(MyData, 0, System.Convert.ToInt32(fs.Length));
fs.Close();
cmd.Parameters["blob"].Value = MyData;
cmd.Parameters["sn"].Value = 1;
&nbs
相关文档:
网上有很多的资料,参考itput(http://space.itpub.net/471666/viewspace-215923)的。
OS : Redhat
DB : Oracle 10.2.0.4.0
1.修改jdk 下面的字体。
[oracle@a ~]$ cd $ORACLE_HOME/jdk/jre/lib/
[oracle@a ~]]$ mv font.properties font.properties_bak
[oracle@a ~]]$
[oracle@a ~]]$ cp font.properties.zh_CN.R ......
Create directory让我们可以在Oracle数据库中灵活的对文件进行读写操作,极大的提高了Oracle的易用性和可扩展性。
其语法为:
CREATE [OR REPLACE] DIRECTORY directory AS 'pathname';
本案例具体创建如下:
create or replace directory exp_dir as '/tmp';
目录创建以后,就可以把读写权限授予特定用户 ......
RedHat Linux安装Oracle10g(图文详解 教程)
http://winie.javaeye.com/blog/405120
关键字: redhat linux安装oracle10g(图文详解 教程)
另,本人有Word电子文档格式,如需要,请联系本人:asima127@gmail.com
1
安装RedHat Enterprise Linux 3 ......
Hey all,
Since there seems to be a fair bit of disinformation, and utter nonsense,
floating around since my talk at the Black Hat Federal security conference
the other day, I have decided to publish the following papers.
http://www.databasesecurity.com/HackingAurora.pdf
http://www.databasesec ......
ORACLE游标
游标:容器,存放当前SQL语句影响的记录
所有DML语句都会用到游标
逐行处理影响的行数
游标
静态游标:游标与SQL语句在运行前关联
&nb ......