资源简介
轻量高效,无需安装,直接解压即可,方便快捷!欢迎大家下载,不谢!
代码片段和文件信息
/*=====================================================================
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
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 361237 2008-09-11 02:16 SQLServer2008Client\chinese.lng
文件 7965 2008-08-15 17:16 SQLServer2008Client\inv.nfo
文件 6934528 2008-08-15 16:39 SQLServer2008Client\Manager.exe
文件 184 2008-08-15 16:19 SQLServer2008Client\registor.reg
文件 172368 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\auth\IA64\sqljdbc_auth.dll
文件 86336 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\auth\x64\sqljdbc_auth.dll
文件 68928 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\auth\x86\sqljdbc_auth.dll
文件 547 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\default.htm
文件 7612 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\0041f9e1-09b6-4487-b052-afd636c8e89a.htm
文件 11668 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\00f9e25a-088e-4ac6-aa75-43eacace8f03.htm
文件 3938 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\018cd71b-4b58-49a7-990e-d28dbb12da70.htm
文件 3743 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\023a238b-37f2-4966-bc91-ef2b22aebc46.htm
文件 3075 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\027edab7-9b5c-4f5f-9469-fe00cf7798b6.htm
文件 3848 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\028b8d61-9557-4c9f-b732-29e87a962de8.htm
文件 3911 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\02c2443d-44e1-4f16-a0d5-08d197838214.htm
文件 3514 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\030ad599-0431-4242-9428-e9ead7b75b1d.htm
文件 3753 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\0330ca1d-5e24-4ce3-9d2a-b931f20a0fcf.htm
文件 2489 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\03649d56-3319-4867-bef1-559dfd221b8b.htm
文件 22039 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\04178645-915f-4569-8907-d45e299bbe7d.htm
文件 3958 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\048fe245-157f-4fd8-be75-ce54b83e02b3.htm
文件 6658 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\04cf56ad-11a8-4ae5-a612-39f3f8680501.htm
文件 4454 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\04d36a25-7f95-4675-9690-4462671b3d67.htm
文件 3343 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\04ea83b2-db5e-4b46-b016-9e496363827e.htm
文件 3147 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\04eebd6a-016f-4462-82f5-ab34b945eec4.htm
文件 6556 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\050548ca-c708-4224-8014-8b7830a860dd.htm
文件 3602 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\053549ee-2018-47ab-9538-789dac2b150a.htm
文件 3437 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\05bdb61f-26e8-480f-a1c1-1e46a8ed4b70.htm
文件 8194 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\0610d667-a16d-4201-a14b-0a40048911e1.htm
文件 3498 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\06225a1a-a58d-4bff-b2ef-be303f051644.htm
文件 4160 2009-03-09 18:11 SQLServer2008Client\sqljdbc_2.0\enu\help\html\069c68ff-442d-4104-917f-3445a3ad264a.htm
............此处省略1190个文件信息
相关资源
- SQL必知必会第4版 中英文合集 超清非
- 博信GSP医药进销存管理系统SQL网络版
- struts2+mysql图书馆管理系统
- MySQL性能监控工具-MONyog-5.6.6-3安装文件
- 迷你SQL2000v1.2.9
- SQLite Developer 免安装绿色版 破解版
- SQL2003标准
- 将postgres数据导入到sqlite
- sqlserver课程设计图书管理系统
- qsqlmysql.rar
- SQLiteSpy软件
- 基于QT4与MySQL的考试系统设计与实现
- 32/64位MySqllib、dll资源
- Mastering PostgreSQL 11 2nd Edition
- mysql、oracle 等数据字典生成工具
- 非常棒的数据迁移工具,支持mysql,
- SQL2005 NET Data Provider for mySAP Business S
- 学生管理系统sql
- SQL sever 编写的学生成绩管理系统初级
- 六天带你玩转MySQL-学习笔记
- generatorSqlmapCustom-淘淘商城专用
- 全国区划代码sql表,5级联动,与淘宝
- postgresql
- 远程手术指导及示教系统的springboot项
- Microsoft SQL Server 2012 Native Client
- nodejs+mssql+SQL Server实现增删改查
- 售票系统 数据库SQL Server 2008
- libmysql_e.dll、libmysqld.dll
- 史上最全Oracle和SQL数据库面试题打包
- 电子商务网站+sqlserver
评论
共有 条评论