資源簡(jiǎn)介
本排課系統(tǒng)是自己完成的一個(gè)課程設(shè)計(jì),用JAVA實(shí)現(xiàn),數(shù)據(jù)庫(kù)用的SQLserver,對(duì)于需要做課程設(shè)計(jì)的同學(xué)有一定參考價(jià)值。

代碼片段和文件信息
/*=====================================================================
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
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????文件????????398??2014-12-01?19:02??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件????????390??2014-11-17?15:49??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件?????????78??2014-11-17?15:53??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件????????598??2014-09-27?09:54??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????1542??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????1079??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????1674??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件????????735??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????2280??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????1200??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????5059??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????4847??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????1293??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件????????839??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????4646??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????5215??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????3230??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????1317??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件????????871??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????4709??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????5361??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????1269??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件????????809??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????4550??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????5146??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????4893??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件????????764??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????2168??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????6264??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
?????文件???????5286??2015-01-09?09:47??排課系統(tǒng)代碼--機(jī)密\Databa
............此處省略2739個(gè)文件信息
- 上一篇:校園二手市場(chǎng)
- 下一篇:Java五個(gè)小游戲源碼合集
評(píng)論
共有 條評(píng)論