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

MS SQL Server2000 在tomcat下的数据源配置

MS SQL Server2000 数据源配置
(注:sqljdbc.jar下载不到的话,找我索取pengqinghui110@126.com)
1、在项目的WebRoot下的META-INF中新建context.xml文件。内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
    <Resource name="jdbc/sqlserver"
       auth="Container"
       type="javax.sql.DataSource"
       driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
       url="jdbc:sqlserver://localhost:1433"
       username="sa"
       password="123456"
       maxActive="20"
       maxIdle="10"
       maxWait="-1" />
</Context>
2、往项目下的web.xml中新增如下代码:
<resource-ref>
    <res-ref-name>jdbc/sqlserver</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>
3、把sqljdbc.jar放到tomcat的lib目录下
4、编写测试程序如下
<%@ page language="java" import="javax.naming.*,javax.sql.*,java.sql.*" pageEncoding="UTF-8"%>
 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   
    <title>数据源测试</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">   
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet"


相关文档:

SQL Server Version

I'm continually trying to track down what service packs are installed on various SQL Servers I support. I can never find the right support page on Microsoft's site. So here's an article with all the SQL Server version information I can track down. If you know of any older versions or can help me fil ......

5本经典SQL电子书


SQL宝典

SQL必知必会第三版

SQL入门经典第四版

Sams Teach Yourself SQL in 10 Minutes Third Edition

SQL The Complete Reference

......

SQL 2005溢用之:分拆列值

问题描述:
有表tb, 如下:
id          values
----------- -----------
1           aa,bb
2           aaa,bbb,ccc
欲按,分拆values列, 分拆后结果如下:
id& ......

ORACLE SQL优化 ORACLE执行计划

Last login: Mon Feb  8 14:13:19 2010 from 192.168.1.249
ipnet
-bash-3.00$
-bash-3.00$ ipnet
-bash: ipnet: command not found
-bash-3.00$ su - oracle
Password:
eastcsu: incorrect password
-bash-3.00$ eastcom
-bash: eastcom: command not found
-bash-3.00$ su - oracle
Password:
[oracl ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号