资源简介
Microsoft SQL Server JDBC Driver 3.0下载下来,解压下来有2个jar,一个是sqljdbc,一个是sqljdbc4.
其中sqljdbc是为JDK1.5用的,而JDK1.6必须用sqljdbc4。否则出错!
代码片段和文件信息
/*=====================================================================
File: executeStoredProcedure.java
Summary: This Microsoft SQL Server JDBC Driver sample application
demonstrates how to retrieve a large OUT parameter from
a stored procedure and how to get the adaptive buffering mode.
---------------------------------------------------------------------
This file is part of the Microsoft SQL Server JDBC Driver Code Samples.
Copyright (C) Microsoft Corporation. All rights reserved.
This source code is intended only as a supplement to Microsoft
Development Tools and/or on-line documentation. See these other
materials for detailed information regarding Microsoft code samples.
THIS CODE AND INFORMATION ARE PROVIDED “AS IS“ WITHOUT WARRANTY OF
ANY KIND EITHER EXPRESSED OR IMPLIED INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
=====================================================================*/
import java.sql.*;
import java.io.*;
import com.microsoft.sqlserver.jdbc.SQLServerCallableStatement;
public class executeStoredProcedure {
public static void main(String[] args) {
// Create a variable for the connection string.
String connectionUrl =
“jdbc:sqlserver://localhost:1433;“ +
“databaseName=AdventureWorks;integratedSecurity=true;“;
// Declare the JDBC objects.
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try {
// Establish the connection.
Class.forName(“com.microsoft.sqlserver.jdbc.SQLServerDriver“);
con = DriverManager.getConnection(connectionUrl);
// Create test data as an example.
StringBuffer buffer = new StringBuffer(4000);
for (int i = 0; i < 4000; i++)
buffer.append( (char) (‘A‘));
PreparedStatement pstmt = con.prepareStatement(
“UPDATE Production.Document “ +
“SET DocumentSummary = ? WHERE (DocumentID = 1)“);
pstmt.setString(1 buffer.toString());
pstmt.executeUpdate();
pstmt.close();
// Query test data by using a stored procedure.
CallableStatement cstmt =
con.prepareCall(“{call dbo.GetLargeDataValue(? ? ? ?)}“);
cstmt.setInt(1 1);
cstmt.registerOutParameter(2 java.sql.Types.INTEGER);
cstmt.registerOutParameter(3 java.sql.Types.CHAR);
cstmt.registerOutParameter(4 java.sql.Types.LONGVARCHAR);
// Display the response buffering mode.
SQLServerCallableStatement SQLcstmt = (SQLServerCallableStatement) cstmt;
System.out.println(“Response buffering mode is: “ +
SQLcstmt.getResponseBuffering());
SQLcstmt.execute();
System.ou
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 174472 2010-04-19 10:12 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\auth\IA64\sqljdbc_auth.dll
文件 86408 2010-04-19 10:12 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\auth\x64\sqljdbc_auth.dll
文件 69000 2010-04-19 10:12 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\auth\x86\sqljdbc_auth.dll
文件 547 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\default.htm
文件 6938 2010-04-19 10:12 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\002496f7-8ec0-4267-b4e6-ba095e2ef306.htm
文件 7168 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\0041f9e1-09b6-4487-b052-afd636c8e89a.htm
文件 11326 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\00f9e25a-088e-4ac6-aa75-43eacace8f03.htm
文件 3816 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\018cd71b-4b58-49a7-990e-d28dbb12da70.htm
文件 3645 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\02287122-5dc1-455d-987f-95fd9a69d503.htm
文件 3629 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\023a238b-37f2-4966-bc91-ef2b22aebc46.htm
文件 3059 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\027edab7-9b5c-4f5f-9469-fe00cf7798b6.htm
文件 3825 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\028b8d61-9557-4c9f-b732-29e87a962de8.htm
文件 3799 2010-04-19 10:12 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\02c2443d-44e1-4f16-a0d5-08d197838214.htm
文件 4098 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\030a1631-cfcd-41e0-beb5-47f93c01e8e0.htm
文件 3498 2010-04-19 10:12 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\030ad599-0431-4242-9428-e9ead7b75b1d.htm
文件 3423 2010-04-19 10:12 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\031c01e2-2c65-4fe4-9700-fdbcc7a39f30.htm
文件 3725 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\0330ca1d-5e24-4ce3-9d2a-b931f20a0fcf.htm
文件 2511 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\03649d56-3319-4867-bef1-559dfd221b8b.htm
文件 22463 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\04178645-915f-4569-8907-d45e299bbe7d.htm
文件 3744 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\048fe245-157f-4fd8-be75-ce54b83e02b3.htm
文件 1947 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\04cf56ad-11a8-4ae5-a612-39f3f8680501.htm
文件 4256 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\04d36a25-7f95-4675-9690-4462671b3d67.htm
文件 3697 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\04ea83b2-db5e-4b46-b016-9e496363827e.htm
文件 3066 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\04eebd6a-016f-4462-82f5-ab34b945eec4.htm
文件 1967 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\050548ca-c708-4224-8014-8b7830a860dd.htm
文件 3510 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\053549ee-2018-47ab-9538-789dac2b150a.htm
文件 3420 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\05bdb61f-26e8-480f-a1c1-1e46a8ed4b70.htm
文件 8175 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\0610d667-a16d-4201-a14b-0a40048911e1.htm
文件 3508 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\06225a1a-a58d-4bff-b2ef-be303f051644.htm
文件 4012 2010-04-19 10:11 Microsoft_SQL_Server_JDBC_Driver 3.0\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\chs\help\html\069c68ff-442d-4104-917f-3445a3ad264a.htm
............此处省略1226个文件信息
相关资源
- jsp+servlet+jdbc开发学生信息后台管理系
- cglib-2.2.2.jar 和 asm-all-3.0.jar
- 基于CenGRP3.0 烟草行业企业整合解决方
- mysql与java连接的适配包mysql-connector-
- oracle11g jar包for JDBC
- oracle 11g jdbc jar包
- spring3.0 API 中文 CHM文档
- sql server jar包
- mysql5.6 jdbc jar
- Java jdbc三层及事务转账案例
- Wifi万能钥匙4.3.05去广告去更新显密码
- 基于JAVA的航空订票系统
- JAVA写的信用卡管理系统
- commons-httpclient-3.0
- lucene3.0 整合庖丁解牛
-
xm
lpull-1.1.3.1.jar和kxm l2-2.3.0.jar - 蛐蛐施工进度查询系统 v3.0.zip
- net.sf.jadclipse_3.3.0.jar和jad.exe.rar
- 学生管理系统Swing+Java+JDBC,原创
- mysql-connector-java-8.0.19_仅含jar包.zip
- 课工场新闻管理系统.rar
- 最新版的JDBC驱动jar包
- JavaGUI+JDBC模拟ATM项目
- Spring_jdbc模板相关jar包连接文件版本:
- java做的教务管理系统
- informix数据库jdbc驱动
- mysql-connector-java-5.1.47
- android-support-v4-23.0.0.jar
- JDBC连接MySQL数据库8.0.13的驱动包
- 基于Java 的果蔬交易网站的设计与实现
评论
共有 条评论