Click here to Skip to main content
14,659,852 members
Home » Discussions » .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionNeeded: PGP source code Pin
Gregory Gadow26-Dec-12 5:30
MemberGregory Gadow26-Dec-12 5:30 
AnswerRe: Needed: PGP source code Pin
Gregory Gadow26-Dec-12 5:35
MemberGregory Gadow26-Dec-12 5:35 
QuestionPrivate byte is being increased continuously without any request Pin
nishantenet23-Dec-12 20:14
Membernishantenet23-Dec-12 20:14 
AnswerRe: Private byte is being increased continuously without any request Pin
Dave Kreskowiak24-Dec-12 5:10
mveDave Kreskowiak24-Dec-12 5:10 
AnswerRe: Private byte is being increased continuously without any request Pin
jschell24-Dec-12 7:57
Memberjschell24-Dec-12 7:57 
QuestionMSI not taking/Installing .NET framework Pin
sjs4u19-Dec-12 17:25
Membersjs4u19-Dec-12 17:25 
AnswerRe: MSI not taking/Installing .NET framework Pin
Dave Kreskowiak19-Dec-12 18:55
mveDave Kreskowiak19-Dec-12 18:55 
QuestionEntity Framework is Updating other column also Pin
indian14319-Dec-12 15:51
Memberindian14319-Dec-12 15:51 
Hi All,

I am using EF 1.0 trying to update a column called doc id which is nullable column, but the EF is updating the other column also along with this column. There is no other place that I am updating that column mistakenly.

Is there any way that I can avoid this kind of situation happening. Because it is happening only in Integration Env, but not in Dev. I dont know what to do now. Please help me.

Below is my code which is updating doc id field:

Using _databasefactory As New DatabaseFactory()
    Dim context = _databasefactory.DatabaseContext

    If Not String.IsNullOrEmpty(temp_doc_id) And Not String.IsNullOrEmpty(doc_id) Then
        Dim reqs = (From r In context.requests Where r.claim.claim_no.Equals(claim_no) And r.temp_doc_id.Equals(temp_doc_id)) 'r.empl_accnt_no.Equals(emplacctnumber) and _

        Dim i = reqs.Count()
        If Constants.EnableLogger And logr IsNot Nothing And Constants.DirectoryExists(Constants.GetLoggerDirectory()) Then
            logr.log(1, "Begin RequestEntity : UpdateOrInsertRequestDocId, claim_no, temp_doc_id, i: " + claim_no + ", " + temp_doc_id + ", " + i.ToString())
        End If

        If Constants.EnableLogger And logr IsNot Nothing And Constants.DirectoryExists(Constants.GetLoggerDirectory()) Then
            logr.log(1, "Inserting RequestEntity : UpdateOrInsertRequestDocId emplacctnumber, ManualClaimNo, doc_id, temp_doc_id, request_status, requestreceivedhow: " + _
                     emplacctnumber + ", " + ManualClaimNo.ToString + ", " + doc_id + ", " + temp_doc_id + ", " + request_status + ", " + requestreceivedhow)
        End If

        Dim res = 0
        If reqs Is Nothing Then
            Dim rq = New request()
            rq.claim = (From r In context.claims Where r.claim_no.Equals(claim_no)).FirstOrDefault()
            rq.empl_accnt_no = emplacctnumber
            rq.manual_claim_no = ManualClaimNo
            rq.doc_id = doc_id
            rq.temp_doc_id = temp_doc_id
            rq.request_status = request_status '"OANEW"
            rq.request_received_how = requestreceivedhow
            rq.last_update_ts = DateTime.Now
            rq.created_ts = DateTime.Now
            rq.created_by = created_by
            rq.last_updated_by = lastupdated_by
            rq.comments = String.Empty
            context.AddTorequests(rq)

            If Constants.EnableLogger And logr IsNot Nothing And Constants.DirectoryExists(Constants.GetLoggerDirectory()) Then
                logr.log(1, "Inserting RequestEntity : UpdateOrInsertRequestDocId emplacctnumber, ManualClaimNo, doc_id, temp_doc_id, request_status, requestreceivedhow: " + _
                         emplacctnumber + ", " + ManualClaimNo.ToString + ", " + doc_id + ", " + temp_doc_id + ", " + request_status + ", " + requestreceivedhow)
            End If

            Return context.SaveChanges()
        ElseIf reqs.Count() <= 0 Then
            Dim rq = New request()
            rq.claim = (From r In context.claims Where r.claim_no.Equals(claim_no)).FirstOrDefault()
            rq.empl_accnt_no = emplacctnumber
            rq.manual_claim_no = ManualClaimNo
            rq.doc_id = doc_id
            rq.temp_doc_id = temp_doc_id
            rq.request_status = request_status '"OANEW"
            rq.request_received_how = requestreceivedhow
            rq.last_update_ts = DateTime.Now
            rq.created_ts = DateTime.Now
            rq.created_by = created_by
            rq.last_updated_by = lastupdated_by
            rq.comments = String.Empty

            If Constants.EnableLogger And logr IsNot Nothing And Constants.DirectoryExists(Constants.GetLoggerDirectory()) Then
                logr.log(1, "Inserting RequestEntity : UpdateOrInsertRequestDocId, emplacctnumber, ManualClaimNo, doc_id, temp_doc_id, request_status, requestreceivedhow: " + _
                         emplacctnumber + ", " + ManualClaimNo.ToString + ", " + doc_id + ", " + temp_doc_id + ", " + request_status + ", " + requestreceivedhow)
            End If

            context.AddTorequests(rq)
            Return context.SaveChanges()
        Else
            Dim rq = reqs.FirstOrDefault()
            rq.doc_id = doc_id
            res = context.SaveChanges()
            Return res
        End If
    End If
End Using

Thanks & Regards,

Abdul Aleem Mohammad
St Louis MO - USA

QuestionUnable to start program http://localhost:1837/default.aspx using VS 2008 in Windows XP IE 8 Pin
sr15918-Dec-12 23:26
Membersr15918-Dec-12 23:26 
SuggestionRe: Unable to start program http://localhost:1837/default.aspx using VS 2008 in Windows XP IE 8 Pin
Richard MacCutchan18-Dec-12 23:52
mveRichard MacCutchan18-Dec-12 23:52 
QuestionCustomer Hacking System Time Pin
Klockness18-Dec-12 4:33
MemberKlockness18-Dec-12 4:33 
AnswerRe: Customer Hacking System Time Pin
Richard MacCutchan18-Dec-12 6:46
mveRichard MacCutchan18-Dec-12 6:46 
GeneralRe: Customer Hacking System Time Pin
Klockness18-Dec-12 10:25
MemberKlockness18-Dec-12 10:25 
AnswerRe: Customer Hacking System Time Pin
Richard Deeming18-Dec-12 7:32
mveRichard Deeming18-Dec-12 7:32 
GeneralRe: Customer Hacking System Time Pin
Klockness18-Dec-12 10:26
MemberKlockness18-Dec-12 10:26 
QuestionCan only book for yourself and not other users? Pin
xnaLearner17-Dec-12 1:26
MemberxnaLearner17-Dec-12 1:26 
AnswerRe: Can only book for yourself and not other users? Pin
Richard MacCutchan17-Dec-12 3:27
mveRichard MacCutchan17-Dec-12 3:27 
Questionusing [Authorize] mvc3 Pin
xnaLearner17-Dec-12 1:02
MemberxnaLearner17-Dec-12 1:02 
QuestionRe: using [Authorize] mvc3 Pin
Eddy Vluggen17-Dec-12 1:08
professionalEddy Vluggen17-Dec-12 1:08 
AnswerRe: using [Authorize] mvc3 Pin
xnaLearner17-Dec-12 1:25
MemberxnaLearner17-Dec-12 1:25 
QuestionAdding a flash webcam photo capture Pin
lhsunshine16-Dec-12 19:33
Memberlhsunshine16-Dec-12 19:33 
AnswerRe: Adding a flash webcam photo capture Pin
Eddy Vluggen17-Dec-12 0:42
professionalEddy Vluggen17-Dec-12 0:42 
GeneralRe: Adding a flash webcam photo capture Pin
lhsunshine17-Dec-12 1:55
Memberlhsunshine17-Dec-12 1:55 
AnswerRe: Adding a flash webcam photo capture Pin
Eddy Vluggen17-Dec-12 2:01
professionalEddy Vluggen17-Dec-12 2:01 
GeneralRe: Adding a flash webcam photo capture Pin
lhsunshine17-Dec-12 2:07
Memberlhsunshine17-Dec-12 2:07 

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.