易截截图软件、单文件、免安装、纯绿色、仅160KB

读取oracle中blog字段

 Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
 String URL=dbmes.url;
 Connection con = DriverManager.getConnection(URL,dbmes.usrname,dbmes.pwd);
try{
// 准备语句执行对象
 String bh=request.getParameter("dwmc");
 Statement stmt = con.createStatement();
 String sql = "select tp1 from HJ_ZDQY_TAB where dwmc='"+bh+"'";
 
 ResultSet rs = stmt.executeQuery(sql);
 if (rs.next()) {
  Blob tp1 = rs.getBlob("tp1");
  long size1 = tp1.length();
  if(size1<=0){
   rs.close();
   response.sendRedirect("../images/error.jpg");
  }else{
   byte[] bs1 = tp1.getBytes(1, (int)size1);
   response.setContentType("image/jpeg");
   response.getOutputStream().write(bs1);
   rs.close();
  }
 }else {
  rs.close();
  response.sendRedirect("../images/error.gif");
 }
}
finally{
  
 con.close();
}
     out.clear();
  out=pageContext.pushBody();


相关文档:

oracle笔记 之VI JDBC连接 Oracle 数据库

 <%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<%--
 使用JDBC连接Oracle数据库
--%>
<%!
 String DBDRIVER="oracle.jdbc.driver.OracleDriver";
 String URL="jdbc:oracle:thin:@localhost:1521:orcl";
 String USER="scott ......

oracle 锁,解锁

http://hi.baidu.com/fyears/blog/item/5ef68ac3feb9a45db219a836.html
select object_id,session_id,locked_mode from v$locked_object;
  select t2.username,t2.sid,t2.serial#,t2.logon_time
  from v$locked_object t1,v$session t2
  where t1.session_id=t2.sid order by t2.logon_time;
alter system ki ......

Myeclipse中连接Oracle的经典代码

 package cn.edu.bit.test;
import java.sql.*;
public class Jdbc {
 public static void main(String[] args)
 {
     try{ 
      Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
     System.out.p ......

PHP连接Oracle并分页访问

使用的是ADODB库,需要有OCI8库.
<?php

//require("adodb5/adodb-exceptions.inc.php");
require("adodb5/adodb.inc.php");
$conn = NewADOConnection("oci8");
$conn->Connect($url, $user, $password, $service_name);
$rs;
try {
$rs = $conn->Execu ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号