Click here to Skip to main content
11,582,850 members (71,488 online)

.NET Framework

 
QuestionNullable(Of Decimal) type variable is throwing exception "Nullable object must have a value." Pin
indian14327-Dec-12 18:14
memberindian14327-Dec-12 18:14 
AnswerRe: Nullable(Of Decimal) type variable is throwing exception "Nullable object must have a value." Pin
Eddy Vluggen28-Dec-12 8:41
memberEddy Vluggen28-Dec-12 8:41 
QuestionC# statement var indirect val Pin
codejuggler927-Dec-12 6:33
membercodejuggler927-Dec-12 6:33 
AnswerRe: C# statement var indirect val Pin
Dave Kreskowiak27-Dec-12 7:23
mvpDave Kreskowiak27-Dec-12 7:23 
GeneralRe: C# statement var indirect val Pin
codejuggler927-Dec-12 7:58
membercodejuggler927-Dec-12 7:58 
GeneralRe: C# statement var indirect val Pin
Dave Kreskowiak27-Dec-12 8:47
mvpDave Kreskowiak27-Dec-12 8:47 
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
mvpDave 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
mvpDave 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
mvpRichard 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
mvpRichard 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
memberRichard 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
mvpRichard 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
memberEddy 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
memberEddy 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
memberEddy Vluggen17-Dec-12 2:01 
GeneralRe: Adding a flash webcam photo capture Pin
lhsunshine17-Dec-12 2:07
memberlhsunshine17-Dec-12 2:07 
QuestionRe: Adding a flash webcam photo capture Pin
Eddy Vluggen17-Dec-12 2:09
memberEddy Vluggen17-Dec-12 2:09 
AnswerRe: Adding a flash webcam photo capture Pin
lhsunshine17-Dec-12 13:49
memberlhsunshine17-Dec-12 13:49 
AnswerRe: Adding a flash webcam photo capture Pin
Eddy Vluggen18-Dec-12 2:01
memberEddy Vluggen18-Dec-12 2:01 
GeneralRe: Adding a flash webcam photo capture Pin
lhsunshine18-Dec-12 18:03
memberlhsunshine18-Dec-12 18:03 
GeneralRe: Adding a flash webcam photo capture Pin
lhsunshine18-Dec-12 19:18
memberlhsunshine18-Dec-12 19:18 
GeneralRe: Adding a flash webcam photo capture Pin
Eddy Vluggen18-Dec-12 20:40
memberEddy Vluggen18-Dec-12 20:40 
GeneralRe: Adding a flash webcam photo capture Pin
lhsunshine19-Dec-12 2:28
memberlhsunshine19-Dec-12 2:28 
QuestionSplitting a url Pin
El daniel14-Dec-12 22:02
memberEl daniel14-Dec-12 22:02 
Questionpulling across value from list to display in view Pin
xnaLearner14-Dec-12 5:58
memberxnaLearner14-Dec-12 5:58 
AnswerRe: pulling across value from list to display in view Pin
xnaLearner14-Dec-12 6:49
memberxnaLearner14-Dec-12 6:49 
AnswerRe: pulling across value from list to display in view Pin
frazzle-me14-Dec-12 17:41
memberfrazzle-me14-Dec-12 17:41 
GeneralRe: pulling across value from list to display in view Pin
xnaLearner15-Dec-12 8:28
memberxnaLearner15-Dec-12 8:28 
Questionproblem with relationships Pin
xnaLearner13-Dec-12 2:45
memberxnaLearner13-Dec-12 2:45 
AnswerRe: problem with relationships Pin
Richard Deeming13-Dec-12 3:48
memberRichard Deeming13-Dec-12 3:48 
GeneralRe: problem with relationships Pin
xnaLearner13-Dec-12 4:37
memberxnaLearner13-Dec-12 4:37 
Question[VB.NET 2008] DataSet and XML files Pin
steve_949661313-Dec-12 0:06
membersteve_949661313-Dec-12 0:06 
AnswerRe: [VB.NET 2008] DataSet and XML files Pin
Eddy Vluggen13-Dec-12 4:28
memberEddy Vluggen13-Dec-12 4:28 
GeneralRe: [VB.NET 2008] DataSet and XML files Pin
steve_949661313-Dec-12 21:21
membersteve_949661313-Dec-12 21:21 
GeneralRe: [VB.NET 2008] DataSet and XML files Pin
Eddy Vluggen14-Dec-12 0:34
memberEddy Vluggen14-Dec-12 0:34 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 6 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid