Important alert: (current site time 7/16/2013 3:47:54 AM EDT)
 

winzip icon

Oracle to ADO Recordsets

Email
Submitted on: 3/2/2000
By: Aparajit Agarwal 
Level: Advanced
User Rating: By 7 Users
Compatibility: VB 5.0, VB 6.0
Views: 28299
 
     It allows the user to access Oracle Stored Procedures from VB, including getting ADO recordsets back
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
3/3/2000 6:39:41 AMNeo

Wow, this is so great and easy to use. Very flexible too. Nice job there Apu Dude! Code On and Prosper!
(If this comment was disrespectful, please report it.)

 
3/3/2000 9:20:23 AMAparajit Agarwal (Apu)

Hope this works out for folks. Do let me know if you have trouble making this work or need help with stored procedures.
(If this comment was disrespectful, please report it.)

 
4/27/2000 2:24:57 AMDavid Downs

How can I create An Oracle SP that returns data? I'd love to use this code, but the issue seems to be with Orcale.
(If this comment was disrespectful, please report it.)

 
4/30/2000 9:33:15 AMAparajit Agarwal (Apu)

Unfortunately you can only return recordsets from Stored Procedures if you are using Oracle 8.0.5 and higher. BTW the code should work for other db also but I have personally not tested. As far as Oracle goes, for 8.0.5, you need to have a user type as a formal in-out based on a
(If this comment was disrespectful, please report it.)

 
4/30/2000 9:36:18 AMAparajit Agarwal

(contd)... strong cursor variable which in turn is based on a complete select statement in your header specification of your package. You can then open the ref cursor in your stored procedure to return the recordset.

(If this comment was disrespectful, please report it.)

 
4/30/2000 9:37:01 AMAparajit Agarwal

(contd)...Unfortunately, this means that you have to make changes to your SELECT in 2 places any time you need to modify it. The good thing about 8.1.5 is that you do not need the strong variable in your header spec. The better thing about 8.1.5 is the ability to use dynamic where clauses as parameters in your stored procedures.
(If this comment was disrespectful, please report it.)

 
4/30/2000 9:37:37 AMAparajit Agarwal

(contd) REF CURSORS in 8.1.5 cannot be based on dynamically concatenated and built SQL queries.

I would also recommend using the ODBC driver 8.0.5 or 8.1.5 whichever the version might be as opposed to the MSDAORA provider.

Considering the number of "queries" :-) I have had in this regard, I may post a complete example of this on the site soon.
(If this comment was disrespectful, please report it.)

 
9/3/2000 1:33:47 PMNatasha Rani

Aparjit Agarwal

Your code has been immense help. I wander if you could tell me how I would take the disconnected recordset from an Oracle Database and add it to a collection?. I am not very familiar with collections but I have heard it is what I need to do. At the moment I am having trouble passing recordsets from a datalayer to a business layer (Oracle 7.0). I would hence like to put the recordset into a collection once I have passed it to the business layer. I can then apss this information to a web interface. If you are able to e-mail me back, natasha_work@hotmail.com. I can send you an example of what i am trying to do.

Your help would be very much appreciated as I am stuck at the moment!

Thanks again Natasha Rani
(If this comment was disrespectful, please report it.)

 
5/17/2001 11:55:15 AMAlona

I'm a beginner in VB, and I am trying to clean up a very simple program that I wrote. I am going into an Oracle Database and querying only one table. I then populate a group of txtBoxes (not in an array) and can go forward through the recordset. BUT, I need to be able to go backward through the recordset, and I can't get it to work... Can anyone help?????

Thanks,
Alona
(If this comment was disrespectful, please report it.)

 
3/7/2002 2:10:24 PMDino

Good code. Bottom line it worked, but I had to spend some time figuring out how to use it (programming the calling object) ...( VB beginner). It would be of great help to post an example of say a Button_onclick event that makes the call to your class module.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.