Java Doc for CallableStatementTest.java in  » Database-JDBC-Connection-Pool » jTDS » net » sourceforge » jtds » test » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database JDBC Connection Pool » jTDS » net.sourceforge.jtds.test 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


net.sourceforge.jtds.test.TestBase
   net.sourceforge.jtds.test.CallableStatementTest

CallableStatementTest
public class CallableStatementTest extends TestBase (Code)

version:
   1.0



Constructor Summary
public  CallableStatementTest(String name)
    

Method Summary
public static  voidmain(String[] args)
     Test that output result sets, return values and output parameters are correctly handled for a remote procedure call. To set up this test you will a local and remote server where the remote server allows logins from the local test server. Install the following stored procedure on the remote server: create proc jtds_remote @in varchar(16), @out varchar(32) output as begin select 'result set' set @out = 'Test ' + @in; return 1 end Uncomment this test and amend the remoteserver name in the prepareCall statement below to be the actual name of your remote server. The TDS stream for this test will comprise a result set, a dummy return (0x79) value and then the actual return and output parameter (0xAC) records. This call will fail with jtds 1.1 as the dummy return value of 0 in the TDS stream will preempt the capture of the actual value 1.
public  voidtestBigDecimal()
     Test for bug [1236078] Procedure doesn't get called for some BigDecimal values - invalid bug.
public  voidtestCallableError1()
    
public  voidtestCallableRegisterOutParameter1()
    
public  voidtestCallableRegisterOutParameter2()
    
public  voidtestCallableRegisterOutParameter3()
    
public  voidtestCallableRegisterOutParameter4()
    
public  voidtestCallableSetNull1()
     Test for reature request [956800] setNull(): Not implemented.
public  voidtestCallableStatement()
    
public  voidtestCallableStatement1()
    
public  voidtestCallableStatementCall1()
    
public  voidtestCallableStatementCall2()
    
public  voidtestCallableStatementCall3()
    
public  voidtestCallableStatementCall4()
    
public  voidtestCallableStatementExec1()
    
public  voidtestCallableStatementExec2()
    
public  voidtestCallableStatementExec3()
    
public  voidtestCallableStatementExec4()
    
public  voidtestCallableStatementExec5()
    
public  voidtestCallableStatementExec6()
    
public  voidtestCallableStatementExec7()
    
public  voidtestCallableStatementExec8()
    
public  voidtestCallableStatementExec9()
    
public  voidtestCallableStatementParsing1()
    
public  voidtestCallableStatementParsing2()
     Test for bug [938632] String index out of bounds error in 0.8rc1.
public  voidtestCallableStatementParsing3()
     Test for bug [1006845] Stored procedure with 18 parameters.
public  voidtestCallableStatementParsing4()
     Test for incorrect exception thrown/no exception thrown when invalid call escape is used.
public  voidtestCallableStatementParsing5()
     Test for bug [1052942] Error processing JDBC call escape.
public  voidtestCallableStatementParsing6()
     Test for incorrect exception thrown/no exception thrown when invalid call escape is used.
public  voidtestCallableStatementParsing7()
     Test for incorrect exception thrown/no exception thrown when invalid call escape is used.
public  voidtestErrorOutputParams()
     Test for bug [1047208] SQLException chaining not implemented correctly: checks that all errors are returned and that output variables are also returned.
public  voidtestInOutParameters()
    
public  voidtestNonRpcProc1()
     Test that procedure calls with both literal parameters and parameterr markers are executed correctly (bug [1078927] Callable statement fails).
public  voidtestNonRpcProc2()
     Test that procedure calls with both literal parameters and parameterr markers are executed correctly (bug [1078927] Callable statement fails).
public  voidtestProcessUpdateCounts1()
     Test that procedure outputs are available immediately for procedures that do not return ResultSets (i.e that update counts are cached).
public  voidtestProcessUpdateCounts2()
     Test that procedure outputs are available immediately after processing the last ResultSet returned by the procedure (i.e that update counts are cached).
public  voidtestProcessUpdateCounts3()
     Test that procedure outputs are available immediately after processing the last ResultSet returned by the procedure (i.e that update counts are cached) even if getMoreResults() is not called.
public  voidtestProcessUpdateCounts4()
     Test that procedure outputs are available immediately after processing the last ResultSet returned by the procedure (i.e that update counts are cached) even if getMoreResults() and ResultSet.close() are not called.
public  voidtestSemicolonProcedures()
     Test that procedure names containing semicolons are parsed correctly.
public  voidtestTsEscape()
    
public  voidtestWritetext()
     Test for bug [1152329] Spurious output params assigned (TIMESTMP).

If a stored procedure execute WRITETEXT or UPDATETEXT commands, spurious output parameter data is returned to the client.



Constructor Detail
CallableStatementTest
public CallableStatementTest(String name)(Code)




Method Detail
main
public static void main(String[] args)(Code)
Test that output result sets, return values and output parameters are correctly handled for a remote procedure call. To set up this test you will a local and remote server where the remote server allows logins from the local test server. Install the following stored procedure on the remote server: create proc jtds_remote @in varchar(16), @out varchar(32) output as begin select 'result set' set @out = 'Test ' + @in; return 1 end Uncomment this test and amend the remoteserver name in the prepareCall statement below to be the actual name of your remote server. The TDS stream for this test will comprise a result set, a dummy return (0x79) value and then the actual return and output parameter (0xAC) records. This call will fail with jtds 1.1 as the dummy return value of 0 in the TDS stream will preempt the capture of the actual value 1. In addition the return value will be assigned to the output parameter and the actual output parameter value will be lost. public void testRemoteCallWithResultSet() throws Exception { CallableStatement cstmt = con.prepareCall( "{?=call remoteserver.database.user.jtds_remote(?,?)}"); cstmt.registerOutParameter(1, Types.INTEGER); cstmt.setString(2, "data"); cstmt.registerOutParameter(3, Types.VARCHAR); cstmt.execute(); ResultSet rs = cstmt.getResultSet(); assertNotNull(rs); assertTrue(rs.next()); assertEquals("result set", rs.getString(1)); assertFalse(rs.next()); rs.close(); assertEquals(1, cstmt.getInt(1)); assertEquals("Test data", cstmt.getString(3)); cstmt.close(); }



testBigDecimal
public void testBigDecimal() throws Exception(Code)
Test for bug [1236078] Procedure doesn't get called for some BigDecimal values - invalid bug.



testCallableError1
public void testCallableError1() throws Exception(Code)
Test for bug [991640] java.sql.Date error and RAISERROR problem



testCallableRegisterOutParameter1
public void testCallableRegisterOutParameter1() throws Exception(Code)
Test for bug [974284] retval on callable statement isn't handled correctly



testCallableRegisterOutParameter2
public void testCallableRegisterOutParameter2() throws Exception(Code)
Test for bug [994888] Callable statement and Float output parameter



testCallableRegisterOutParameter3
public void testCallableRegisterOutParameter3() throws Exception(Code)
Test for bug [994988] Network error when null is returned via int output parm



testCallableRegisterOutParameter4
public void testCallableRegisterOutParameter4() throws Exception(Code)
Test for bug [983432] Prepared call doesn't work with jTDS 0.8



testCallableSetNull1
public void testCallableSetNull1() throws Exception(Code)
Test for reature request [956800] setNull(): Not implemented.



testCallableStatement
public void testCallableStatement() throws Exception(Code)



testCallableStatement1
public void testCallableStatement1() throws Exception(Code)



testCallableStatementCall1
public void testCallableStatementCall1() throws Exception(Code)



testCallableStatementCall2
public void testCallableStatementCall2() throws Exception(Code)



testCallableStatementCall3
public void testCallableStatementCall3() throws Exception(Code)



testCallableStatementCall4
public void testCallableStatementCall4() throws Exception(Code)
Test for bug [974801] stored procedure error in Northwind



testCallableStatementExec1
public void testCallableStatementExec1() throws Exception(Code)



testCallableStatementExec2
public void testCallableStatementExec2() throws Exception(Code)



testCallableStatementExec3
public void testCallableStatementExec3() throws Exception(Code)



testCallableStatementExec4
public void testCallableStatementExec4() throws Exception(Code)



testCallableStatementExec5
public void testCallableStatementExec5() throws Exception(Code)



testCallableStatementExec6
public void testCallableStatementExec6() throws Exception(Code)



testCallableStatementExec7
public void testCallableStatementExec7() throws Exception(Code)



testCallableStatementExec8
public void testCallableStatementExec8() throws Exception(Code)



testCallableStatementExec9
public void testCallableStatementExec9() throws Exception(Code)
Test for bug [978175] 0.8: Stored Procedure call doesn't work anymore



testCallableStatementParsing1
public void testCallableStatementParsing1() throws Exception(Code)



testCallableStatementParsing2
public void testCallableStatementParsing2() throws Exception(Code)
Test for bug [938632] String index out of bounds error in 0.8rc1.



testCallableStatementParsing3
public void testCallableStatementParsing3() throws Exception(Code)
Test for bug [1006845] Stored procedure with 18 parameters.



testCallableStatementParsing4
public void testCallableStatementParsing4() throws SQLException(Code)
Test for incorrect exception thrown/no exception thrown when invalid call escape is used.

See https://sourceforge.net/forum/forum.php?thread_id=1144619&forum_id=104389 for more detail.




testCallableStatementParsing5
public void testCallableStatementParsing5() throws Exception(Code)
Test for bug [1052942] Error processing JDBC call escape. (A blank before the final } causes the parser to fail).



testCallableStatementParsing6
public void testCallableStatementParsing6() throws SQLException(Code)
Test for incorrect exception thrown/no exception thrown when invalid call escape is used.

A message containing the correct missing terminator should be generated.




testCallableStatementParsing7
public void testCallableStatementParsing7() throws SQLException(Code)
Test for incorrect exception thrown/no exception thrown when invalid call escape is used.

A message containing the correct missing terminator should be generated.




testErrorOutputParams
public void testErrorOutputParams() throws Exception(Code)
Test for bug [1047208] SQLException chaining not implemented correctly: checks that all errors are returned and that output variables are also returned.



testInOutParameters
public void testInOutParameters() throws Exception(Code)
Test for separation of IN and INOUT/OUT parameter values



testNonRpcProc1
public void testNonRpcProc1() throws Exception(Code)
Test that procedure calls with both literal parameters and parameterr markers are executed correctly (bug [1078927] Callable statement fails).



testNonRpcProc2
public void testNonRpcProc2() throws Exception(Code)
Test that procedure calls with both literal parameters and parameterr markers are executed correctly (bug [1078927] Callable statement fails).



testProcessUpdateCounts1
public void testProcessUpdateCounts1() throws SQLException(Code)
Test that procedure outputs are available immediately for procedures that do not return ResultSets (i.e that update counts are cached).



testProcessUpdateCounts2
public void testProcessUpdateCounts2() throws SQLException(Code)
Test that procedure outputs are available immediately after processing the last ResultSet returned by the procedure (i.e that update counts are cached).



testProcessUpdateCounts3
public void testProcessUpdateCounts3() throws SQLException(Code)
Test that procedure outputs are available immediately after processing the last ResultSet returned by the procedure (i.e that update counts are cached) even if getMoreResults() is not called.



testProcessUpdateCounts4
public void testProcessUpdateCounts4() throws SQLException(Code)
Test that procedure outputs are available immediately after processing the last ResultSet returned by the procedure (i.e that update counts are cached) even if getMoreResults() and ResultSet.close() are not called.



testSemicolonProcedures
public void testSemicolonProcedures() throws Exception(Code)
Test that procedure names containing semicolons are parsed correctly.



testTsEscape
public void testTsEscape() throws Exception(Code)
Test for bug [ 1062671 ] SQLParser unable to parse CONVERT(char,{ts ?},102)



testWritetext
public void testWritetext() throws Exception(Code)
Test for bug [1152329] Spurious output params assigned (TIMESTMP).

If a stored procedure execute WRITETEXT or UPDATETEXT commands, spurious output parameter data is returned to the client. This additional data can be confused with the real output parameter data leading to an output string parameter returning the text ?TIMESTMP? on SQL Server 7+ or binary garbage on other servers.




Fields inherited from net.sourceforge.jtds.test.TestBase
Connection con(Code)(Java Doc)
final public static Properties props(Code)(Java Doc)

Methods inherited from net.sourceforge.jtds.test.TestBase
public void compareInputStreams(InputStream is1, InputStream is2) throws IOException(Code)(Java Doc)
public void compareReaders(Reader r1, Reader r2) throws IOException(Code)(Java Doc)
protected void connect() throws Exception(Code)(Java Doc)
public void dump(ResultSet rs) throws SQLException(Code)(Java Doc)
public void dumpRow(ResultSet rs) throws SQLException(Code)(Java Doc)
public Connection getConnection() throws Exception(Code)(Java Doc)
public Connection getConnection(Properties override) throws Exception(Code)(Java Doc)
public void makeObjects(Statement stmt, int count) throws SQLException(Code)(Java Doc)
protected void makeTestTables(Statement stmt) throws SQLException(Code)(Java Doc)
public void setUp() throws Exception(Code)(Java Doc)
public void tearDown() throws Exception(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.