I am evaluating EntitySpaces and trying to get it to work with Oracle (the way it is used here). I have already customized the stored procedure / metadata templates creating and calling to generate "CRUD" code that works (inside of oracle packages). Hard but I got it working.
I am now hung up on trying to fill a dataset set from a custom stored procedure. I get the same error if the stored procedure is in a package or not in a package.
- Object reference not set to an instance of an object.
- at EntitySpaces.OracleClientProvider.DataProvider.EntitySpaces.Interfaces.IDataProvider.FillDataSet(esDataRequest request)
at EntitySpaces.Interfaces.esDataProvider.FillDataSet(esDataRequest request, esProviderSignature sig)
at EntitySpaces.Core.esEntityCollection.FillDataSet(esQueryType queryType, String query, esParameters parms)
at EntitySpaces.Core.esUtility.FillDataSet(esQueryType queryType, String query, esParameters parms)
at BusinessObjects.UserProfileCollection.LoadCustomTest(String pUserId)
in c:\Source\Webroot\WamReportSite\App_Code\Custom\UserProfileCollection.vb:line 42
I saw this same error in another post from summer of 2007 and it never really said how to fix it or get around it (at least not that I understood) and that it would be fixed in a newer version. I assume the error was passing in the parameter directly (which I am not doing). The other link is to the same question, left unanswered.
http://community.entityspaces.net/forums/thread/3076.aspx
http://community.entityspaces.net/forums/thread/7844.aspx
Any help you can give me would be appreciated. Below are the details of my install. With the Oracle table (very simple) and the generated load taken out of the package (although it does refer back to the package for the REF CURSOR type definition). I was just trying to make this the example as simple as posible.
As stated above. I can access this stored procedure through the standard "CRUD" code, using load on the object without error.
I am using VS 2008, EntitySpaces 2008, Oracle 10g, MyGeneration 1.2. Generated WITHOUT catalog or schema.
Code:
CREATE TABLE aec_user_profile
(user_id VARCHAR2(50) NOT NULL,
report_display_checks NUMBER(1,0) NOT NULL)
PCTFREE 10
INITRANS 1
MAXTRANS 255
TABLESPACE teg_data
STORAGE (
INITIAL 65536
MINEXTENTS 1
MAXEXTENTS 2147483645
)
/
ALTER TABLE aec_user_profile
ADD CONSTRAINT pk_aec_user_profile PRIMARY KEY (user_id)
USING INDEX
PCTFREE 10
INITRANS 2
MAXTRANS 255
TABLESPACE teg_data
STORAGE (
INITIAL 65536
MINEXTENTS 1
MAXEXTENTS 2147483645
)
/
PROCEDURE "LoadByPrimaryKey"
(
pUSER_ID IN "AEC_USER_PROFILE"."USER_ID"%type,
outCursor OUT SPCKG_AEC_USER_PROFILE_GEN.t_cursor
)
IS
BEGIN
OPEN outCursor FOR
SELECT
"USER_ID",
"REPORT_DISPLAY_CHECKS"
FROM "AEC_USER_PROFILE"
WHERE
"USER_ID" = pUSER_ID;
END;
Code:
Dim oEsU As New esUtility
Dim oParams As New esParameters
oParams.Add("pUSER_ID", 1, esParameterDirection.Input, DbType.String, 50)
Dim ds As DataSet = oEsU.FillDataSet(esQueryType.StoredProcedure, "LoadByPrimaryKey", oParams)