VS2005, ADO.NET 2.0 How to build a typed data set based on and oracle stord procedure?

A

A.M-SG

Hi,

Using VS2005 and ADO.NET 2.0,

How can I build a typed dataset based on an Oracle stored procedure?

Thank you,
Alan
 
K

Kevin Yu [MSFT]

Hi Alan,

To create a typed DataSet in VS.NET 2005 with the return of a stored
procedure in Oracle, you can try the following steps:

1. Right click on the project and add a DataSet.
2. Double click on the DataSet in Solution Explorer to open the DataSet
designer.
3. Right click on the designer, select Add / TableAdapter from the popup
menu.
4. Follow the wizard, connect to the Oracle database and then set the
stored procedure as the insert command.

When you finished the wizard, the DataSet with the schema from the stored
procedure will be created.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
A

A.M-SG

Hi Kevin,


4. Follow the wizard, connect to the Oracle database and then set the
stored procedure as the insert command.



At the step 4, the stored procedure is disables. I don't know how enable it.



Have you ever tried the step 4 for a stored procedure?



Thank you,

Alan
 
C

Cowboy \(Gregory A. Beamer\)

Another option:

1. Get a dataset from the sproc using code
2. Add the following line and save your DataSet schema

datasetName.WriteXml(@"locationHere");

Option 1
3. Include the DataSet in your project
4. Right click the DataSet and choose "Run Custom Tool" (at least that is
the option in my current IDE - it may say something else on other IDE
setups)

Option 2
3. Add DataSet with same name in your project
4. Open saved DataSet and copy the XML from it to the one in your project

Either one will create the STD from the XSD.

NOTE: If you go this route, create a Windows App that can automate most, if
not all, of this garbage.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***********************************************
Think Outside the Box!
***********************************************
 
K

Kevin Yu [MSFT]

Hi Alan,

It seems the designer doesn't support creating the TableAdapter from an
Oracle stored procedure. I tried this on a SQL server database and it
works. So in this case, I suggest you try Gregory's steps to create the
typed DataSet manually. Note saving the schema has to be

datasetName.WriteXmlSchema(@"locationHere");

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
A

A.M-SG

Hi Kevin,

Our client has Oracle and we have to develop our application based on Oracle
backend.

Does Microsoft has any plan to support Oracle's stored procedure for typed
DataSets? This is big system and we cannot survive without stored
procedures. I hope you underestand our situation.

Is there any 3rd party tools that help us to create Typed datasets based on
PLSQL stored procedures?

Thank you,
Alan
 
K

Kevin Yu [MSFT]

Hi Alan,

As the return from Oracle stored procedure is different from SQL ones,
currently VS.NET IDE doesn't support creating the schema from an Oracle
stored procedure. I don't know whether the product team is going to support
this. Nor do I know if there is some 3rd-party tools that can achieve this.
Let wait here to see if any community member can shed some light on this
issue.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
K

Kevin Yu [MSFT]

You're welcome.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
H

Howard Hoffman

I'm not sure what they will come out with exactly in the end, but Oracle
will be adding their own VS.NET IDE plug-ins
to support VS.NET 2005 w/in the next 6 months or so.

See http://www.oracle.com/technology/tech/dotnet/index.html.

As you may know, they have that kind of support today for VS.NET 2003,
including a customized Server Exporer (according to the powerpoint and demos
on the above web site).

HTH,

Howard Hoffman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top