i'm having trouble accessing oracle data (gee... what a shock)
i get the very *helpful* error message: "MinimumCapacity must be
non-negative". no idea what it means. i'm running a sql statement which
calls a stored proc. it runs fine, gets the data fine (i can't use the
wizard because of the above error), but the fields are not retrieved into
the schema for my report layout.
if i set the dataset up in the data page, it works. but before retrieving
the data, the error message above displays and also adds "the list of fields
could not be retrieved". i really don't want to (or should have to) create
all the fields by hand.
the sql is:
{ call pkgMyStuff.sp_MyStoredProc('01/01/1900', '2/26/2004', '1') }
anyone have any ideas here? i know it's not an ms database, but oledb should
be the *universal* data access... so this should work fine.
please help
dushan bilbijaPlease try the managed Oracle provider instead of the OleDB provider when
working with Oracle stored procedures. Just edit your datasource and select
"Oracle" from the data source type dropdown rather than "OleDB". You will
also need to set the correct connection string for the managed provider.
In addition, please follow the guidelines in the following article on MSDN
(scroll down to the
section where it talks about "Oracle REF CURSORs") on how to design the
Oracle stored procedure:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcontheadonetdatareader.asp
Note: You need to make sure that the stored procedure has only one OUTPUT
parameter which is a REF cursor and NO other out parameters.
Here is a basic example of a stored procedure:
CREATE OR REPLACE package test_package as
TYPE T_CURSOR IS REF CURSOR;
procedure get_customers(
customer_name in VARCHAR2,
o_customer_cursor out T_CURSOR);
end test_package;
/
CREATE OR REPLACE package body test_package as
procedure get_customers (
customer_name in VARCHAR2,
o_customer_cursor out T_CURSOR)
IS
begin
open o_customer_cursor for select * from customers where name =customer_name;
end;
end test_package;
/
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dushan Bilbija" <dbilbija@.msn.com> wrote in message
news:%236Xj9%23iXEHA.3284@.TK2MSFTNGP12.phx.gbl...
> i'm having trouble accessing oracle data (gee... what a shock)
> i get the very *helpful* error message: "MinimumCapacity must be
> non-negative". no idea what it means. i'm running a sql statement which
> calls a stored proc. it runs fine, gets the data fine (i can't use the
> wizard because of the above error), but the fields are not retrieved into
> the schema for my report layout.
> if i set the dataset up in the data page, it works. but before retrieving
> the data, the error message above displays and also adds "the list of
fields
> could not be retrieved". i really don't want to (or should have to) create
> all the fields by hand.
> the sql is:
> { call pkgMyStuff.sp_MyStoredProc('01/01/1900', '2/26/2004', '1') }
> anyone have any ideas here? i know it's not an ms database, but oledb
should
> be the *universal* data access... so this should work fine.
> please help
> dushan bilbija
>|||This seems to have been b/c the database was used with a .mdw file that I did not have. When I created a new database and imported the table into that, the query worked fine.
"David Conorozzo" wrote:
> I am getting this on an Access DB using OLEDB. My query is:
> Dim oComm As New OleDb.OleDbCommand("SELECT * FROM " & _formattedtablename & " WHERE 1=-1", _Connection)
> Dim oReader As OleDb.OleDbDataReader = oComm.ExecuteReader(CommandBehavior.SchemaOnly)
> It doesn't really matter what I do in the query. On this particular DB I always get the exception.
> "Robert Bruckner [MSFT]" wrote:
> > Please try the managed Oracle provider instead of the OleDB provider when
> > working with Oracle stored procedures. Just edit your datasource and select
> > "Oracle" from the data source type dropdown rather than "OleDB". You will
> > also need to set the correct connection string for the managed provider.
> >
> > In addition, please follow the guidelines in the following article on MSDN
> > (scroll down to the
> > section where it talks about "Oracle REF CURSORs") on how to design the
> > Oracle stored procedure:
> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcontheadonetdatareader.asp
> >
> > Note: You need to make sure that the stored procedure has only one OUTPUT
> > parameter which is a REF cursor and NO other out parameters.
> >
> > Here is a basic example of a stored procedure:
> >
> > CREATE OR REPLACE package test_package as
> > TYPE T_CURSOR IS REF CURSOR;
> > procedure get_customers(
> > customer_name in VARCHAR2,
> > o_customer_cursor out T_CURSOR);
> > end test_package;
> > /
> >
> > CREATE OR REPLACE package body test_package as
> > procedure get_customers (
> > customer_name in VARCHAR2,
> > o_customer_cursor out T_CURSOR)
> > IS
> > begin
> > open o_customer_cursor for select * from customers where name => > customer_name;
> > end;
> > end test_package;
> > /
> >
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> >
> >
> >
> >
> > "Dushan Bilbija" <dbilbija@.msn.com> wrote in message
> > news:%236Xj9%23iXEHA.3284@.TK2MSFTNGP12.phx.gbl...
> > > i'm having trouble accessing oracle data (gee... what a shock)
> > >
> > > i get the very *helpful* error message: "MinimumCapacity must be
> > > non-negative". no idea what it means. i'm running a sql statement which
> > > calls a stored proc. it runs fine, gets the data fine (i can't use the
> > > wizard because of the above error), but the fields are not retrieved into
> > > the schema for my report layout.
> > >
> > > if i set the dataset up in the data page, it works. but before retrieving
> > > the data, the error message above displays and also adds "the list of
> > fields
> > > could not be retrieved". i really don't want to (or should have to) create
> > > all the fields by hand.
> > >
> > > the sql is:
> > >
> > > { call pkgMyStuff.sp_MyStoredProc('01/01/1900', '2/26/2004', '1') }
> > >
> > > anyone have any ideas here? i know it's not an ms database, but oledb
> > should
> > > be the *universal* data access... so this should work fine.
> > >
> > > please help
> > >
> > > dushan bilbija
> > >
> > >
> >
> >
> >
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment