西湖BLOG正在为您加载数据中……www.xhblog.com

 
[J2EE][原创]利用JDBC连接取数据并导入到EXCEL中
[ 2009-9-24 9:57:00 | By: 风色 ]
 
public void run(){
        String sql = "select * from SFA_CUST_WZ";
        try{
            FileOutputStream fos = new FileOutputStream("d:\\foo.xls");  
            HSSFWorkbook wb = new HSSFWorkbook();  
            HSSFSheet s = wb.createSheet();  
            wb.setSheetName(0, "Matrix"); &
……
 
 
[J2EE][原创]加载数据库驱动并取得连接
[ 2009-9-24 9:55:00 | By: 风色 ]
 
package com.glf.sfa.report;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class SqlConn{
    private Connection conn;    
    
    private final String oracleDriverName = "oracle.jdbc.driver.OracleDriver";
    private final static String oracleUrlToConnect = "jdbc:oracle:thin:@192.168.101.233:1521:orathiz";
    private final static String user = "sfa_sqa_test";
    private final static String password =
……
 
 
[SQL][转]Oracle删除当前用户下的所有表、视图、序列、函数、存储过程、包
[ 2009-8-21 15:12:00 | By: 风色 ]
 
--delete tables
Sql代码:select 'drop table ' || table_name ||';'||chr(13)||chr(10) from user_tables;   

--delete views
Sql代码:select 'drop view ' || view_name||';'||chr(13)||chr(10) from user_views;   

--delete seqs
Sql代码:select 'drop sequence ' || sequence_name||';'||chr(13)||chr(10) from user_sequences;  

--delete s
Sql代码:select 'drop ' || object_name||';'||chr(13)||chr(10) from user_objects where object_type='';   

--delete procedure
Sql代码: select 'drop procedure ' || object_name||';'||chr(13)||chr(10) from user_obj
……
 
 
[SQL]让字符以数字格式排序
[ 2009-6-10 11:22:00 | By: 风色 ]
 
ORDER BY CAST (cust_id_ AS INT)
 
 
[J2EE]取项目路径的真实地址
[ 2009-5-27 11:54:00 | By: 风色 ]
 
public static String queryReportPath() {
  
  String os = System.getProperty("os.name");
  URL source = FundTools.class.getResource("");
  String head = null;
  String body = null;
  int index = 0;
  if (os.equals("Windows XP")) {//windows
   body = source.toString();
   String protocol = source.getProtocol();
   if (protocol.equals("file")) {//tomcat
    head = source.getProtocol() + ":/";
   } else {//weblogi
……
 
 
[SQL]Insert 语句的用法
[ 2009-5-15 15:30:00 | By: 风色 ]
 
1、最常见的是 insert into table(field1,field2,...) values(value1,value2,...)

2、取已有表格数据插入其他表的是 insert into table1 (field1,field2,...) (select value1,value2,... from table2)

3、也有一种用法是 SELECT vale1, value2 into Table2 from Table1 该语句table2必须不存在

 
 
[J2SE]JAVA的绝对路径与相对路径
[ 2009-5-7 10:15:00 | By: 风色 ]
 

/**
 * 在JAVA后台取文件路径
 */
//取根的绝对路径
URL basePath = Thread.currentThread().getContextClassLoader().getResource("");
//取相对路径
String realPath = new File(basePath.getFile(),"../../" + url).getCanonicalPath();
//转换空格
realPath = URLDecoder.decode(realPath,"utf-8");
//打开文件
InputStream is = new FileInputStream(realPath);


……
 
 
[JasperReport]JasperReport学习手记:demo演示目录
[ 2009-4-29 14:29:00 | By: 风色 ]
 

alterdesign-颜色填充

antcompile-利用Ant自动生成class文件和japser文件

barbecue-生成条形码

barcode-生成各种不同的条形码

batchexport-几份不同的报表连在一起输出

beanshell-数学运算

charts-图表(IReport中预设21种)其中部分图表还分左右两栏,形式多样(需重点学习)

chartthemes-图表模板

crosstabs-交叉表格(需重点学习)

csvdatasource-使用csv作为数据来源

ejbql-子报表

fonts-字条的设置应用(部分设置可能对PDF中的中文显示无效)

genericelement-图片引入

groovy-Groovy语言应用(一种与JAVA相似的开发语言)

hibernate-Hibernate应用

horizontal-detail栏中分成横向多栏数据的应用(有加入图片应用)

hyperlink-报表内超连接、对外超连接

i18n-国际化


……
 
 
[ANT]ANT学习笔记:如何安装
[ 2009-4-29 13:39:00 | By: 风色 ]
 

1、去http://ant.apache.org/bindownload.cgi下载Ant包

2、解压缩整个包

3、在你想放置的位置建一个目录,比如C:\Ant

4、将解压缩得到的/lib和/bin两个目录整个拷贝到之前建好的C:\Ant

5、在环境变量中设置 ANT_HOME = C:\Ant

6、在环境变量的CLASSPATH及Path中添加:%ANT_HOME%\bin


……
 
 
[SQL]ibatis中iterate的使用
[ 2008-8-15 10:37:00 | By: 风色 ]
 

<iterate property="map_sav_attr_list" open="" close="" conjunction=",">   
#map_sav_attr_list[].MAP_SAV_VAL#  
</iterate>

property:list集合
open:代码开始处的标记,例如in语句中的"("
close:代码结束处的标记,列如in语句中的")"
conjunction:代码中的分割标记,列如in语句中的","
#map_sav_attr_list[].MAP_SAV_VAL# :list集合中某一项的某一字段

 
首页 上一页 下一页 尾页 页次:1/4页  10篇日志/页 转到:

西湖BLOG正在为您加载数据中……www.xhblog.com
时 间 记 忆
<<  < 2009 - >  >>
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
最 新 评 论
西湖BLOG正在为您加载数据中……www.xhblog.com

专 题 分 类
西湖BLOG正在为您加载数据中……www.xhblog.com
最 新 日 志
西湖BLOG正在为您加载数据中……www.xhblog.com
最 新 留 言
西湖BLOG正在为您加载数据中……www.xhblog.com
搜 索
用 户 登 录
西湖BLOG正在为您加载数据中……www.xhblog.com
友 情 连 接
博 客 信 息
西湖BLOG正在为您加载数据中……www.xhblog.com