Print Page | Close Window

Save Method Not Saving

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=7218
Printed Date: 26 November 2024 at 9:13pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Save Method Not Saving
Posted By: hildegoat
Subject: Save Method Not Saving
Date 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?



Replies:
Posted By: hildegoat
Date 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.


Posted By: hildegoat
Date 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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net