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

SQL Server 2005 Driver for JDBC


Load the SQL Server 2005 Driver for JDBC before you load the SQL Server 2000 Driver for JDBC. To do this, use the DriverManager class as in the following code example.
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); // 2005 version
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); // 2000 version
Use a SQL Server 2005 Driver for JDBC connection URL to establish a connection. To do this, use code that resembles the following code example.
Connection con = DriverManager.getConnection("jdbc:sqlserver://<ServerName>;user=<UserName>;password=<Password>");
For more information about how to connect with data sources and how to use a connection URL, visit the following Microsoft Developer Network (MSDN) Web sites:
Building the connection URL
http://msdn2.microsoft.com/en-us/library/ms378428.aspx (http://msdn2.microsoft.com/en-us/library/ms378428.aspx)
Setting the connection properties
http://msdn2.microsoft.com/en-us/library/ms378988.aspx (http://msdn2.microsoft.com/en-us/library/ms378988.aspx)
The SQL Server 2000 JDBC driver accepts connection URLs from the SQL Server 2005 JDBC Driver. The SQL Server 2005 JDBC Driver connection string URLs start with the following string:
jdbc:sqlserver://ConnectionString
The SQL Server 2000 Driver for JDBC should only accept connection string URLs that start with the following string:
jdbc:microsoft:sqlserver://ConnectionString
However, the SQL Server 2000 Driver for JDBC also accepts connections that have the following format:
jdbc:sqlserver://ConnectionString
The exception occurs because the SQL Server 2000 Driver for JDBC is not designed to connect to a SQL Server 2005 database.


相关文档:

SQL语言基础 数据定义

1、定义基本表
SQL语言使用动词CREATE定义基本表,其具体语法格式如下:
CREATE TABLE <表名>
(<列名><数据类型>[列级完整性约束条件]...[,<列名><数据类型>[列级完整性约束条件]][,<表级完整性约束条件>]);
例如:建立一个学生表Student,它由学号Sno,姓名Sname,性别Ssex,年 ......

[Sql]EXCEPT 和 INTERSECT关键字

[Sql]EXCEPT 和 INTERSECT关键字
http://www.cnblogs.com/treeyh/archive/2008/07/01/1232845.html
EXCEPT
从 EXCEPT 操作数左边的查询中返回右边的查询未返回的所有非重复值。
INTERSECT
返回 INTERSECT 操作数左右两边的两个查询均返回的所有非重复值。
A. 使用 EXCEPT
在示例中使用 TableA 和 TableB 中的数据。 ......

asp防SQL注入函数


'SQL防注入函数,调用方法,在需要防注入的地方替换以前的request("XXXX")为SafeRequest("XXXX")
  
'www.yongfa365.com
  
  
Function
 SafeRequest(ParaValue)   
    ParaValue = 
Trim
(
Request
(Pa ......

三种SQL分页语句

来自:http://www.cnblogs.com/morningwang/archive/2009/01/02/1367277.html
有关分页 SQL 的资料很多,有的使用存储过程,有的使用游标。本人不喜欢使用游标,我觉得它耗资、效率低;使用存储过程是个不错的选择,因为存储过程是经过预编译的,执行效率高,也更灵活。先看看单条 SQL 语句的分页 SQL 吧。
方法1:
适用 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号