Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Save Method Not Saving
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Save Method Not Saving

 Post Reply Post Reply
Author
Message
hildegoat View Drop Down
Newbie
Newbie


Joined: 30 November 2006
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote hildegoat Quote  Post ReplyReply Direct Link To This Post Topic: Save Method Not Saving
    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?
Back to Top
hildegoat View Drop Down
Newbie
Newbie


Joined: 30 November 2006
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote hildegoat Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2007 at 11:49am
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.
Back to Top
hildegoat View Drop Down
Newbie
Newbie


Joined: 30 November 2006
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote hildegoat Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2007 at 12:55pm
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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.