Visual Studio 2010
.net Framework 3.5
Stored Procedure for Insert / Update is:
CREATE PROCEDURE TMMailAdmGroups (IN Type int, IN GroupID int, IN GroupName nvarchar(100))
AS
BEGIN
IF :Type = 1 THEN
SELECT "GroupID", "GroupName",
Case when exists(select '' from "TMMail" where "GroupID" = T0."GroupID" and "mailID" >= 0) Then 1 Else 0 End AS Verfy
from "TMMailGroups" T0
order by 2;
ELSEIF :Type = 2 THEN
SELECT COALESCE( MAX("GroupID") + 1, 0) into GroupID FROM "TMMailGroups";
INSERT INTO "TMMailGroups"("GroupID", "GroupName")
VALUES(:GroupID, :GroupName);
ELSEIF :Type = 3 THEN
UPDATE "TMMailGroups" SET "GroupName" = :GroupName WHERE "GroupID" = :GroupID;
ELSEIF :Type = 4 THEN
DELETE FROM "TMMailGroups" WHERE "GroupID" = :GroupID;
END IF;
END;
When I do a manual call to the stored procedure it workes well...
The connection string is directly to the schema:
Server=HANASERVER:30015;UserID=SYSTEM;Password=Sap12345;Current Schema=TMMAILER