List Info

Thread: Call Storedprocedure




Call Storedprocedure
user name
2006-08-22 21:05:00
Hello,

I have a  this kind ot stored procedure :

CREATE PROC spTest
    Param1 int,
    Prama2 float
AS

DECLARE ID int;

INSERT INTO MyTable
(Field1, Field2)
VALUES
(Param1 , Param2)

SELECT ID = IDENTITY

return ID

On  the C# side, I have a typed dataset and Table Adapter
... 3 Tiers.

How can I call the stored procedure, I tried this :

        MyTableTableAdapter t = new
ORDER_MyTableTableAdapter();
        i = (int)o.spTest(250, 560);


But I receive this error : Nullable object must have a
value.

Any idea ?

Thanks,

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )