.NETGURU
Returning multiple results from Oracle
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-oracle' list.


Srinivasa Sivakumar
-- Moved from [aspngdata] to [ngfx-oracle] by adam gibson <Click here to reveal e-mail address> --

Hello All,

I'm trying to return multiple results from Oracle database. The code works fine with SQL server. But when I try it with Oracle it doesn't work. I tryed using OleDb version as well as .NET Oracle native driver from MS. Here is the code.

Any help would be appriciated.

Thanks,
Srinivasa Sivakumar

SQL Code:
========

Protected Sub Page_Load(Sender As Object, E As EventArgs)
Dim strSQL strSQL4 as String

strSQL = "Select * from authors; Select * from discounts; Select * from employee"
cnConnection.Open()

DS = New DataSet()
Dim cnCommand As SqlCommand = New SqlCommand(strSQL, cnConnection)

cnAdapter.SelectCommand = cnCommand
cnAdapter.Fill(DS)

ID4.DataSource = DS.Tables("Table")
ID4.DataValueField = "au_id"
ID4.DataTextField = "au_lname"
ID4.DataBind()

ID5.DataSource = DS.Tables("Table1")
ID5.DataValueField = "stor_id"
ID5.DataTextField = "discounttype"
ID5.DataBind()

ID6.DataSource = DS.Tables("Table2")
ID6.DataValueField = "emp_id"
ID6.DataTextField = "fname"
ID6.DataBind()
CnConnection.Close()
End sub

Reply to this message...
 
    
Sreedhar Koganti
Srini,

Even I too got same kind of problem.
Actually It's not problem of .Net Classes. When you make a call these simply
make a call to corresponding server.
Oracle dosn't support "select * From A;Select * from b;" syntax. You can try
this in SQL Plus. There also you will get error. Since Oracle Under lying
technology dosn't support, I would think you are getting this error.
It's not the probelm of Oledb provides class also. Since SQLServer supports
this syntax you are able to get results from there.

I hope it's might clarified your question.

Sreedhar
http://www.w3coder.com

[Original message clipped]

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

Reply to this message...
 
    
Srinivasa Sivakumar
Sridhar,

Actutall I can get the same SQL Server effect from oracle using the Ref
cursors using stored procedures.

Thanks,
Srinivasa Sivakumar
Author, Developer and Reviewer
http://www3.brinkster.com/webguru/
----- Original Message -----
From: "Sreedhar Koganti" <Click here to reveal e-mail address>
To: "ngfx-oracle" <Click here to reveal e-mail address>
Sent: Thursday, August 08, 2002 8:25 PM
Subject: [ngfx-oracle] Re: Returning multiple results from Oracle

[Original message clipped]

Reply to this message...
 
    
Sreedhar Koganti
Yes Srini,

I know By using Refcursor We can solve this problem.
We got to do additional work to get this effect.

I kind of solved this problem by using Refcursor only.
But if I don't know how many selects I will keep in that [Dynamic Multiple
selects building,] then I am facing difficult in Oracle. [for that I got of
keeping max 10 selects accepting in Oracle.
If you have better Idea, please pass to me.

Sreedhar
http://www.w3coder.com

[Original message clipped]

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

Reply to this message...
 
    
Manoj Kumar
Hi,
Is there a way i can pass a array from .Net into an oracle Procedure ?. I
mean is there a way to add an array as a input parameter from .NET ?

I would really appreciate if can get some help on this.

Thanks

-----Original Message-----
From: Sreedhar Koganti [mailto:Click here to reveal e-mail address]
Sent: Friday, August 09, 2002 10:41 AM
To: ngfx-oracle
Subject: [ngfx-oracle] Re: Returning multiple results from Oracle

Yes Srini,

I know By using Refcursor We can solve this problem.
We got to do additional work to get this effect.

I kind of solved this problem by using Refcursor only.
But if I don't know how many selects I will keep in that [Dynamic Multiple
selects building,] then I am facing difficult in Oracle. [for that I got of
keeping max 10 selects accepting in Oracle.
If you have better Idea, please pass to me.

Sreedhar
http://www.w3coder.com

[Original message clipped]

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

| [ngfx-oracle] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-oracle.asp = JOIN/QUIT

Reply to this message...
 
 
System.Data.DataSet
System.Data.SqlClient.SqlCommand
System.EventArgs




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification