资源简介
Microsoft JDBC Driver 4.0 for SQL Server
代码片段和文件信息
/*=====================================================================
File: executeStoredProcedure.java
Summary: This Microsoft JDBC Driver for SQL Server 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 JDBC Driver for SQL Server 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();
S
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-12-01 21:45 Microsoft JDBC Driver 4.0 for SQL Server\
目录 0 2016-12-01 21:45 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\
目录 0 2016-12-01 21:45 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\
目录 0 2016-12-01 21:45 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\auth\
目录 0 2016-12-01 21:45 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\auth\x64\
文件 85120 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\auth\x64\sqljdbc_auth.dll
目录 0 2016-12-01 21:45 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\auth\x86\
文件 77952 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\auth\x86\sqljdbc_auth.dll
目录 0 2016-12-01 21:45 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\
目录 0 2016-12-01 21:45 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\art\
文件 62160 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\art\JDBCGetterConversions.gif
文件 54889 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\art\JDBC_JDBCSetob
文件 63880 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\art\JDBC_JDBCSetterConversions_v2.gif
文件 61713 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\art\JDBC_JDBCUpdatterConversions.gif
文件 544 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\default.htm
目录 0 2016-12-01 21:45 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\
文件 6183 2012-02-29 17:10 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\002496f7-8ec0-4267-b4e6-ba095e2ef306.htm
文件 7788 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\0041f9e1-09b6-4487-b052-afd636c8e89a.htm
文件 10062 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\00f9e25a-088e-4ac6-aa75-43eacace8f03.htm
文件 4580 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\018cd71b-4b58-49a7-990e-d28dbb12da70.htm
文件 5017 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\02287122-5dc1-455d-987f-95fd9a69d503.htm
文件 4299 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\023a238b-37f2-4966-bc91-ef2b22aebc46.htm
文件 4027 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\027edab7-9b5c-4f5f-9469-fe00cf7798b6.htm
文件 4798 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\028b8d61-9557-4c9f-b732-29e87a962de8.htm
文件 4546 2012-02-29 17:10 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\02c2443d-44e1-4f16-a0d5-08d197838214.htm
文件 4589 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\030a1631-cfcd-41e0-beb5-47f93c01e8e0.htm
文件 4151 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\030ad599-0431-4242-9428-e9ead7b75b1d.htm
文件 4287 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\031c01e2-2c65-4fe4-9700-fdbcc7a39f30.htm
文件 4582 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\0330ca1d-5e24-4ce3-9d2a-b931f20a0fcf.htm
文件 3606 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\03649d56-3319-4867-bef1-559dfd221b8b.htm
文件 18753 2012-02-29 17:11 Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\chs\help\html\04178645-915f-4569-8907-d45e299bbe7d.htm
............此处省略1276个文件信息
- 上一篇:赢通软件常用工具
- 下一篇:工资管理系统数据库的设计与实现
相关资源
- sqljdbc_6.0.8112.200_enu.tar.gz
- jdbc连接程序实现不同数据库数据的迁
- PostgreSQL ODBC 驱动 for Windows
- SQL odbc 驱动程序哦
- SQLite ODBC Driver
- R语言连接oracle/mysql数据库脚本
- ODBC API 数据库 连接
- linux 上的 mysql 连接驱动类文件包
- mysql-connector-odbc-5.2.6-winx64.msi
- 数据库访问技术ODBC Demo
- Access_JDBC30(已破解)
- SQL Server ODBC 驱动
- 初学者第一个小项目基于JDBC+oracle实现
- sqljdbc_4.0.2206.100_chs.tar.gz
- sql server 2008 r2 安装 + JDBC配置
- MySQL-5.5以上JDBC驱动包
- JDBC连接MySQL驱动
- 使用eclipse编写的登录Demo
- 基于JDBC的学生信息管理系统
- KepServer中ODBC Client驱动连接SQL Server数
- MyBatis通过 JDBC连接 SQL server 数据库简
- MyBatis通过 JDBC连接 PostgreSQL数据库 最
- oracle ODBC32位
- instantclient_12_1【带32位ODBC安装】2639
- access数据库 ODBC32位驱动程序包
- mysql-connector-odbc-5.2.6-linux-glibc2.5-x86-
- mysql-connector-odbc-5.3.6-win64_32.msi.rar
- sqlite-netFx46-setup-bundle-x86-2015-1.0.104.0
- 各版本Oracle JDBC驱动
- (3edtion).pdf
评论
共有 条评论