Save Method Not Saving |
Post Reply |
Author | |
hildegoat
Newbie Joined: 30 November 2006 Status: Offline Points: 11 |
Post Options
Thanks(0)
Posted: 23 May 2007 at 5:09pm |
I currently have the calendar control working on a VB.NET front-end with a SQL Server 2000 back end (custom data provider). Since I'm still having speed issues with it, I thought I'd try it with an Access back-end instead and use built-in data provider code.
It looks like it works properly (i.e. the events in my .mdb populate into the calendar), but when I call CalendarControl.DataProvider.Save() the data doesn't save back to the source database. I've modified an event and stepped through the code. The EventChanged event fires, but I then do the Save call and nothing happens, not even an error. I'm able to write to the mdb because I run an OLEDBCommand to update the ModifiedDate in the Event table (a field I added) during the EventChanged event, so it doesn't seem to be a permissions issue. Do you have any ideas of what could be going on? |
|
hildegoat
Newbie Joined: 30 November 2006 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
I think I've figured it out. I removed my added fields from the Event table and it seems to work. It seems like the built-in data provider code doesn't like a modified table and just refuses to commit data without an error.
|
|
hildegoat
Newbie Joined: 30 November 2006 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
Okay, I was somewhat wrong with my diagnosis. It turns out that the AllowZeroLength property of the text fields in the Event table were set to No and I my code to build the event puts empty strings in a few fields. If I set the AllowZeroLength to Yes, my saving works. I added my custom fields back in, and the table still works, so it wasn't my custom fields that were causing the problem.
So I should still be able to add my own fields to the tables, which keeps my database (relatively) simple. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |