casting error handling database info
Posted on 2007-04-09
I am having a problem with this error: Specified cast is not valid. This error has been generated from this line of code: Recurrence.UtcOffset = (TDataSet.Tables(0).Rows(i).Item("UtcOffset")). Recurrence.UtcOffset is a timespan value. the TDataSet.Tables(0).Rows(i).Item("UtcOffset")) value coming in is -300. The database field is set to accept int values. The database is a copy of an example database for appointment scheduling through WebScheduleInfo Infragistic NetAdvantage products. The procedure needed to be used is Private Sub FetchRecurrences(ByVal context As FetchRecurrencesContext) is for getting the values from the database and using the values for handling the display of the recurrence value/purposes in the webmonthview, webweekview, or webdayview and handle the recurrence of a given appointment/appointments. The actual question is how do I handle the error.