Click here to Skip to main content
15,881,380 members
Home / Discussions / Database
   

Database

 
AnswerRe: What do you think of MongoDB? Pin
Nathan Minier20-Aug-18 2:09
professionalNathan Minier20-Aug-18 2:09 
GeneralRe: What do you think of MongoDB? Pin
Eddy Vluggen20-Aug-18 3:07
professionalEddy Vluggen20-Aug-18 3:07 
GeneralRe: What do you think of MongoDB? Pin
Nathan Minier20-Aug-18 3:37
professionalNathan Minier20-Aug-18 3:37 
GeneralRe: What do you think of MongoDB? Pin
Eddy Vluggen20-Aug-18 3:46
professionalEddy Vluggen20-Aug-18 3:46 
GeneralRe: What do you think of MongoDB? Pin
Nathan Minier20-Aug-18 3:52
professionalNathan Minier20-Aug-18 3:52 
GeneralRe: What do you think of MongoDB? Pin
Eddy Vluggen20-Aug-18 3:56
professionalEddy Vluggen20-Aug-18 3:56 
Questionhow to create a sum query between multiple tables in Microsoft access Pin
Member 1028319111-Aug-18 8:50
Member 1028319111-Aug-18 8:50 
AnswerRe: how to create a sum query between multiple tables in Microsoft access Pin
Eddy Vluggen11-Aug-18 9:08
professionalEddy Vluggen11-Aug-18 9:08 
GeneralRe: how to create a sum query between multiple tables in Microsoft access Pin
Member 1028319111-Aug-18 9:14
Member 1028319111-Aug-18 9:14 
GeneralRe: how to create a sum query between multiple tables in Microsoft access Pin
Eddy Vluggen11-Aug-18 9:20
professionalEddy Vluggen11-Aug-18 9:20 
AnswerRe: how to create a sum query between multiple tables in Microsoft access Pin
Mycroft Holmes11-Aug-18 13:15
professionalMycroft Holmes11-Aug-18 13:15 
AnswerRe: how to create a sum query between multiple tables in Microsoft access Pin
CHill6015-Aug-18 2:15
mveCHill6015-Aug-18 2:15 
GeneralRe: how to create a sum query between multiple tables in Microsoft access Pin
Mycroft Holmes15-Aug-18 13:09
professionalMycroft Holmes15-Aug-18 13:09 
GeneralRe: how to create a sum query between multiple tables in Microsoft access Pin
CHill6020-Aug-18 4:15
mveCHill6020-Aug-18 4:15 
GeneralRe: how to create a sum query between multiple tables in Microsoft access Pin
Mycroft Holmes20-Aug-18 12:57
professionalMycroft Holmes20-Aug-18 12:57 
QuestionStored Procedure execution from Entity Framework should return 0 or -1 if insert or update fails Pin
indian1437-Aug-18 14:27
indian1437-Aug-18 14:27 
Hi all,

I have a stored procedure below:
ALTER PROCEDURE [dbo].[Usp_Add_ProgramType] (@Type varchar(15), @Description varchar(15), @IsValid bit
, @CreatedBy varchar(500), @ModifiedBy varchar(500))
AS
BEGIN
    if not exists(select top 1 1 from [dbo].[ProgramTypeLKP] where [Type]=@Type)
    begin
      INSERT INTO [dbo].[ProgramTypeLKP] ([Type], [Description], IsValid, CreatedDate, CreatedBy, ModifiedDate, ModifiedBy)
      values(@Type, @Description, @IsValid, getdate(), @CreatedBy, GETDATE(), @ModifiedBy)
    end
    --else
    --begin
    ----Want to return some thing here that makes EF funnction to return 0 or -1 or some value so that I can show user a message that its a duplicate record.
    --end
END
Even if the Condition fails the EF method is returning value as 1, but I want to get a value on which I will show the end user a message that he is trying to attempt to insert a duplicate record.
Like in the below script, I am checking for the result or errors, I have to get error in the response, or at least in the result some where so that I can show the user a message, I am using Kendo Grid, Create and Update with Popup (just a foot-note):
function onRequestEnd(e)
{
    //Check request type
    if (e.type == "create")
    {
        if ((e.response != null) && ((e.response.Errors != null) || (e.response.data["0"].Result <= 1)))
        {
            //Set some label value in red only when to say attempt to insert duplicate record          
        }      
    }
    else if (e.type == "update")
    {
        if ((e.response != null) && ((e.response.Errors != null) || (e.response.data["0"].Result <= 1)))
        {
            //Set some label value in red only when to say attempt to insert duplicate record          
        }        
    }
}
Can anybody please help me in this regards, thanks in advance.

Thanks,

Abdul Aleem

"There is already enough hatred in the world lets spread love, compassion and affection."
AnswerRe: Stored Procedure execution from Entity Framework should return 0 or -1 if insert or update fails Pin
Mycroft Holmes7-Aug-18 14:37
professionalMycroft Holmes7-Aug-18 14:37 
GeneralRe: Stored Procedure execution from Entity Framework should return 0 or -1 if insert or update fails Pin
indian1437-Aug-18 14:39
indian1437-Aug-18 14:39 
GeneralRe: Stored Procedure execution from Entity Framework should return 0 or -1 if insert or update fails Pin
Mycroft Holmes7-Aug-18 16:38
professionalMycroft Holmes7-Aug-18 16:38 
GeneralRe: Stored Procedure execution from Entity Framework should return 0 or -1 if insert or update fails Pin
indian1438-Aug-18 6:38
indian1438-Aug-18 6:38 
GeneralRe: Stored Procedure execution from Entity Framework should return 0 or -1 if insert or update fails Pin
Richard Deeming8-Aug-18 0:27
mveRichard Deeming8-Aug-18 0:27 
GeneralRe: Stored Procedure execution from Entity Framework should return 0 or -1 if insert or update fails Pin
indian1438-Aug-18 6:42
indian1438-Aug-18 6:42 
GeneralRe: Stored Procedure execution from Entity Framework should return 0 or -1 if insert or update fails Pin
Richard Deeming8-Aug-18 8:23
mveRichard Deeming8-Aug-18 8:23 
GeneralRe: Stored Procedure execution from Entity Framework should return 0 or -1 if insert or update fails Pin
indian1439-Aug-18 6:05
indian1439-Aug-18 6:05 
QuestionDATABASE Maintainance Pin
ricardobrooks6-Aug-18 3:12
ricardobrooks6-Aug-18 3:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.