File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Equivalent of OracleTypes.CURSOR

 
A Agrawal
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody plz tell me what is equivalent of OracleTypes.CURSOR in case of database is SQL Server.

Actually the problem I am facing is, wat to pass as second parameter of registerOutParameter().

cstmt.registerOutParameter(3,OracleTypes.CURSOR);
// where cstmt is callable statement.

we pass OracleTypes.CURSOR when we want to retrieve ResultSet by executing a stored procedure but I am unable to find its equivalent in SQLServer.

I couldn�t locate any thing in java.sql.Types for this purpose.

(I had to import oracle.jdbc.driver.*; to get OracleTypes.CURSOR recognized).

------------------
Amit Agrawal,
New Delhi, India.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Notice that the Oracle driver was provided by Oracle - NOT Sun. Sun provides the java.sql stuff.
You would need to get the MicroSoft provided driver imported, I would think.
 
A Agrawal
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree Cindy but that's where I am struck.
Orcale provide very neat classes in its driver with proper names like OracleStatemnet, OracleConnection etc...so one can easily locate such things...
but SQL Server's Driver has classes like a.class, b.class ...up to z.class with many inner classes in each class. So I am unable to locate Oracle's equivalent in SQLServer's driver.
I posted here with the hope somebody must have faced this problem and might have got some solution to it.

------------------
Amit Agrawal,
New Delhi, India.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apparently you can use ADODB.RecordSet and a cursor is automatically opened. Then you can use the CursorType property to specify whether the cursor is forward-only, static, keyset-driven, or dynamic.
Microsoft has a whole section under SQLServer discussing java implementations.
The cursor discussion is here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlsg/html/msdn_adosql.asp
The whole thing is here: http://msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp?contentid=28000409
 
Himanshu Gupta
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Even I am facing the same problem.
Did anybody get something substantial on this?
Looking forward for help on this topic?
Thanks in anticipation,
Himanshu
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic