Click here to Skip to main content
12,697,699 members (27,097 online)
   

ASP.NET

 
AnswerRe: Display Images from a database in a tile view Pin
Ali Al Omairi(Abu AlHassan)10-Dec-12 3:23
memberAli Al Omairi(Abu AlHassan)10-Dec-12 3:23 
Questionlinq connection in asp.net Pin
JonBrynjar8-Dec-12 4:58
memberJonBrynjar8-Dec-12 4:58 
AnswerRe: linq connection in asp.net Pin
@AmitGajjar11-Dec-12 8:00
member@AmitGajjar11-Dec-12 8:00 
QuestionChange root path Pin
John Simmons / outlaw programmer8-Dec-12 4:40
mvpJohn Simmons / outlaw programmer8-Dec-12 4:40 
AnswerRe: Change root path Pin
Richard Deeming10-Dec-12 2:35
memberRichard Deeming10-Dec-12 2:35 
GeneralRe: Change root path Pin
John Simmons / outlaw programmer10-Dec-12 2:42
mvpJohn Simmons / outlaw programmer10-Dec-12 2:42 
AnswerRe: Change root path Pin
@AmitGajjar11-Dec-12 8:10
member@AmitGajjar11-Dec-12 8:10 
QuestionUpdating the column using entity framework Pin
indian1437-Dec-12 13:46
memberindian1437-Dec-12 13:46 
Hi All,

I am trying to update a database table using entity framework, but some how I dont know why, but entity framework is updating the other column of the table which I am not setting up in my code. In my update statement after else statement, I am calling to update only column docid (rq.doc_id = doc_id) but I dont know why it is updating even the request_status column also. It is updating with 4 spaces and updating thats all.
I am actually not resetting the request_status value. It is very strange for me.

Can any body please help me in resolving this and getting rid of this problem.

I have my code as below

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

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

                    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 = "OANEW"
                        rq.last_update_ts = DateTime.Now
                        rq.create_ts = DateTime.Now
                        rq.comments = String.Empty
                        context.AddTorequests(rq)
                        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 = "OANEW"
                        rq.last_update_ts = DateTime.Now
                        rq.create_ts = DateTime.Now
                        rq.comments = String.Empty
                        context.AddTorequests(rq)
                        Return context.SaveChanges()
                    Else
                        Dim rq = reqs.FirstOrDefault()
                        'If Not rq.claimReference.IsLoaded Then
                        '    rq.claimReference.Load()
                        'End If
                        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

Questionasp.NET composite control cannot raise an event Pin
michal.cerbak7-Dec-12 5:50
membermichal.cerbak7-Dec-12 5:50 
Questionhow to convert hex to rgb color code in asp.net Pin
Deenuji vellore7-Dec-12 0:14
groupDeenuji vellore7-Dec-12 0:14 
AnswerRe: how to convert hex to rgb color code in asp.net Pin
Richard MacCutchan7-Dec-12 1:32
mvpRichard MacCutchan7-Dec-12 1:32 
Questionasp.net threads, see if thread with same name is running to wait a couple of seconds Pin
jkirkerx6-Dec-12 11:45
memberjkirkerx6-Dec-12 11:45 
AnswerRe: asp.net threads, see if thread with same name is running to wait a couple of seconds Pin
Keith Barrow7-Dec-12 6:21
mentorKeith Barrow7-Dec-12 6:21 
GeneralRe: asp.net threads, see if thread with same name is running to wait a couple of seconds Pin
jkirkerx7-Dec-12 7:47
memberjkirkerx7-Dec-12 7:47 
QuestionPagination worries Pin
cizu6-Dec-12 6:12
membercizu6-Dec-12 6:12 
AnswerRe: Pagination worries Pin
deflinek7-Dec-12 2:40
memberdeflinek7-Dec-12 2:40 
AnswerRe: Pagination worries Pin
AnkitGoel.com10-Dec-12 18:33
memberAnkitGoel.com10-Dec-12 18:33 
QuestionHtml Mail Formate Error Pin
mukusingh5-Dec-12 19:49
membermukusingh5-Dec-12 19:49 
AnswerRe: Html Mail Formate Error Pin
jkirkerx6-Dec-12 11:41
memberjkirkerx6-Dec-12 11:41 
GeneralRe: Html Mail Formate Error Pin
mukusingh6-Dec-12 20:18
membermukusingh6-Dec-12 20:18 
Questionhow to set og tag at runtime Pin
Jassim Rahma5-Dec-12 10:12
memberJassim Rahma5-Dec-12 10:12 
AnswerRe: how to set og tag at runtime Pin
deflinek7-Dec-12 2:50
memberdeflinek7-Dec-12 2:50 
Questionis this a correct og prefix? Pin
Jassim Rahma5-Dec-12 8:36
memberJassim Rahma5-Dec-12 8:36 
Questionasp.net vb Pin
Nada ALsalami5-Dec-12 4:09
memberNada ALsalami5-Dec-12 4:09 
AnswerRe: asp.net vb Pin
ryanb315-Dec-12 5:34
memberryanb315-Dec-12 5:34 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 20 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid