Hello,
for a purpose i have to use SP(stored Procedure) to
create a pk.
1. I use MS-SQL.
2. My Stored Procedure works fine (i tested it with
sql).
3. SP is known in the EOF as
"availablityPK".
4. the table Availabilty which should use this SP
has the property
GetPK :
availablityPK
5. the SP has the
in Argument :
Customer_id
out :
id
6. if i execute the SP from java like
this
NSDictionary arguments = new
NSDictionary(cId, "Customer_id");
NSDictionary result =
EOUtilities.executeStoredProcedureNamed(ec, "availablityPK",
arguments);
i get the correc answer and the log looks like
this
---------------------------------------------------------
[2004-12-13 15:09:00 CET] <main> executeStoredProcedure: availablityPK
withValues:{Customer_id= 200001; }
[2004-12-13 15:09:00 CET] <main> === Begin Internal Transaction
[2004-12-13 15:09:00 CET] <main> evaluateExpression:
<com.webobjects.jdbcadaptor.MicrosoftPlugIn$MicrosoftExpression: "{ ? = call
Availablity_P_K (?)}" withBindings:
1:<com.webobjects.foundation.NSKeyValueCoding$Null>(id), 2:200001(Customer_id)>
[2004-12-13 15:09:00 CET] <main> === Commit Internal
Transaction
---------------------------------------------------------
7. if i try to execute the procedure automatically, this mean when i
a. i create an Availability object
b. set the correct Customer_id
c. ec.saveChanges(); // this mean. EOF executes the
SP when i try to insert an object in the Table Availabilty.
i get such a log // mention the null here.
---------------------------------------------------------
[2004-12-13 15:09:00 CET] <main> executeStoredProcedure: availablityPK
withValues:null
[2004-12-13 15:09:00 CET] <main> === Begin Internal Transaction
[2004-12-13 15:09:00 CET] <main> evaluateExpression:
<com.webobjects.jdbcadaptor.MicrosoftPlugIn$MicrosoftExpression: "{ ? = call
Availablity_P_K (?)}" withBindings:
1:<com.webobjects.foundation.NSKeyValueCoding$Null>(id),
2:<com.webobjects.foundation.NSKeyValueCoding$Null>(Customer_id)>
[2004-12-13 15:09:00 CET] <main> === Commit Internal
Transaction
--------------------------------------------------------- Anybody
knows what do i do wrong?
thank you!
Sako.
|