0 Replies - 398 Views - Last Post: 06 June 2014 - 05:36 AM Rate Topic: -----

#1 DarenR  Icon User is offline

  • D.I.C Lover

Reputation: 593
  • View blog
  • Posts: 3,823
  • Joined: 12-January 10

cannot perfrom runtime binding on a null reference error

Posted 06 June 2014 - 05:36 AM

i get " cannot perfrom runtime binding on a null reference" when running

 var rating = db.BMS_RATG_EVNT_HST.FindAll(db.BMS_RATG_EVNT_HST.BRKEY == m_sBrKey).OrderByDescending(db.BMS_RATG_EVNT_HST.RATG_EVNT_ID).FirstOrDefault().RATG_EVNT_ID;

i know the db is null for the specific item i am looking for-- i need to make this connection so i can insert into the db. the reason for the long query string is because it has to look for the history of the events and if there is some show them in an update else it will insert into the table---
however i get the above error when the table is blank for the brkey id

does anyone know a way to fix this?


Is This A Good Question/Topic? 0
  • +

Page 1 of 1