资源简介
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个文件信息
- 上一篇:赢通软件常用工具
- 下一篇:工资管理系统数据库的设计与实现
相关资源
- 毕业设计-企业工资管理系统struts+jd
- oracle数据库 +springmvc框架 开发的增删
- mysql-connector-odbc-5.2.2-ansi-win32.msi
- Springmvc+jdbc简单学生管理系统
- 医院信息管理系统完整项目
- ojdbc7oracle12连接驱动
- MySql ODBC 驱动官方最新版5.1.11
- 64位 MSDASQL (OLE DB Provider for ODBC)
- mysql-connector-odbc-5.3.9-winx64.zip
- ORACLE ODBC驱动
- JDBC6.0驱动+完美使用代码(适合新人)
- IFIX将数据记录通过ODBC保存到SQL+SERV
- mysql-connector-odbc-5.2.5-win32
- sqljdbc_4.0.2206.100_chs.exeMicrosoft JDBC Dri
- mysql-connector-odbc-3.51.30-winx64 mysql驱动
- PI 实时数据库 JDBC 说明文档
- Oracle Jdbc驱动 OJBDC6
- mysql-connector-odbc-5.3.9-winx64.msi
- mysql-connector-odbc-8.0.13-win32
- mysql-connector-odbc-noinstall-5.3.6-winx64.zi
- springmvc+jdbctemplate+mysql(采用注解方式
- mysql-connector-odbc-noinstall-5.1.11-win32.zi
- mysql-connector-odbc-5.3.6-win32.msi
-
Syba
se odbc驱动 - MySQL-JDBC-src 连接驱动包-包括源码
- sqliteodbc.exe sqlite的ODBC驱动
- mysql 数据源驱动 mysql-connector-odbc-3.5
- Oracle11g安装时需要的包 包括libaio,
- MySQL ODBC driver5.0
- sqljdbc_6.0.8112.200_enu.tar.gz
评论
共有 条评论