Click here to Skip to main content
15,889,992 members
Home / Discussions / Database
   

Database

 
AnswerRe: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. The statement has been terminated. Pin
RedDk1-Dec-13 9:35
RedDk1-Dec-13 9:35 
AnswerRe: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. The statement has been terminated. PinPopular
Mycroft Holmes1-Dec-13 11:59
professionalMycroft Holmes1-Dec-13 11:59 
Questionprotect my database - your advsie plz Pin
Jassim Rahma1-Dec-13 5:19
Jassim Rahma1-Dec-13 5:19 
AnswerRe: protect my database - your advsie plz Pin
GuyThiebaut1-Dec-13 23:20
professionalGuyThiebaut1-Dec-13 23:20 
GeneralRe: protect my database - your advsie plz Pin
Jassim Rahma2-Dec-13 22:30
Jassim Rahma2-Dec-13 22:30 
GeneralRe: protect my database - your advsie plz Pin
Richard Deeming3-Dec-13 1:36
mveRichard Deeming3-Dec-13 1:36 
AnswerRe: protect my database - your advsie plz Pin
Eddy Vluggen3-Dec-13 7:12
professionalEddy Vluggen3-Dec-13 7:12 
AnswerWindows Form BindingSource not saving changes in database Pin
Dean Henderson29-Nov-13 10:09
Dean Henderson29-Nov-13 10:09 
Update: This did turn out to be a pretty simple issue, so I am marking it now as an Answer. See the end of the message for the Answer...

I suspect I am making a very simple error, because I have a Windows Form application where I have added an Entity Framework DataSource bound to controls via a BindingSource/BindingNavigator that is not saving changes to the underlying SQL database.

I started by dragging the Entity Framework DataSource (as Details) onto a form.

This automatically created the form controls, the BindingSource and BindingNavigator.

When I first brought up the form, no records where being returned from the Entity Framework DataSource, so I created the following variable to initially load data that I was then able to view:

Private TblList As ObjectQuery(Of tblMyTableRec) = From tbl In ObjCntxt.tblMyTableRecs


Then I set the DataSource property of the appropriate BindingSource to this ObjectQuery:

MyBindingSource.DataSource = TblList


So far, so good ... The BindingNavigator now lets me move through the various records in the 'tblMyTableRecs' table.

But, when I make a modification of the data in any of the records (via one of the data bound controls), my changes are not being saved to the underlying SQL database the Entity Framework is setup to use.

I would greatly appreciate any suggestions about what steps I might need to take so that I am able to have changes saved in my SQL database.

Answer: The code generated for the Windows Form BindingSource and BindingNavigator do not automatically perform the Entity Framework ObjectContext SaveChanges operation. Once the SaveChanges function was executed in the Save button Event logic for the appropriate Entity Framework ObjectContext, the changes were saved to the SQL database.
Thanks, Dean


modified 5-Dec-13 21:18pm.

QuestionReference Pin
tsunamigang29-Nov-13 1:59
tsunamigang29-Nov-13 1:59 
AnswerRe: Reference Pin
Corporal Agarn29-Nov-13 2:06
professionalCorporal Agarn29-Nov-13 2:06 
GeneralRe: Reference Pin
tsunamigang29-Nov-13 2:12
tsunamigang29-Nov-13 2:12 
GeneralRe: Reference Pin
Chris Quinn29-Nov-13 2:41
Chris Quinn29-Nov-13 2:41 
AnswerRe: Reference Pin
Richard MacCutchan29-Nov-13 6:15
mveRichard MacCutchan29-Nov-13 6:15 
AnswerRe: Reference Pin
RedDk29-Nov-13 8:43
RedDk29-Nov-13 8:43 
Questionhow to find the return value of reader in mysql Pin
Member 1026351928-Nov-13 1:20
Member 1026351928-Nov-13 1:20 
AnswerRe: how to find the return value of reader in mysql Pin
Simon_Whale28-Nov-13 1:32
Simon_Whale28-Nov-13 1:32 
GeneralRe: how to find the return value of reader in mysql Pin
Member 1026351928-Nov-13 1:51
Member 1026351928-Nov-13 1:51 
GeneralRe: how to find the return value of reader in mysql Pin
Simon_Whale28-Nov-13 1:57
Simon_Whale28-Nov-13 1:57 
GeneralRe: how to find the return value of reader in mysql Pin
Member 1026351928-Nov-13 17:52
Member 1026351928-Nov-13 17:52 
GeneralRe: how to find the return value of reader in mysql Pin
Member 1026351928-Nov-13 19:11
Member 1026351928-Nov-13 19:11 
QuestionCursors Pin
tsunamigang27-Nov-13 18:40
tsunamigang27-Nov-13 18:40 
AnswerRe: Cursors Pin
GuyThiebaut27-Nov-13 21:41
professionalGuyThiebaut27-Nov-13 21:41 
GeneralRe: Cursors Pin
tsunamigang29-Nov-13 2:41
tsunamigang29-Nov-13 2:41 
GeneralRe: Cursors Pin
GuyThiebaut29-Nov-13 2:43
professionalGuyThiebaut29-Nov-13 2:43 
QuestionCash Register Express - PC America Pin
Member 1042751427-Nov-13 1:43
Member 1042751427-Nov-13 1:43 

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.