Hello,
I'm building a RadCalendar with ToolTip to show the time and summary of the events. The example "RadToolTip for RadCalendar " is very helpful, but i'm having a problem that there's always an error "Return Integer.Parse(result.ToString())"--- Input string was not in a correct format. The difference is that I didn't use int for the eventID as the example did, i used uniqueidentifier.
When I debugged, the result is always 0.
Can someone help me with this? Thank you very much for your help !
I'm building a RadCalendar with ToolTip to show the time and summary of the events. The example "RadToolTip for RadCalendar " is very helpful, but i'm having a problem that there's always an error "Return Integer.Parse(result.ToString())"--- Input string was not in a correct format. The difference is that I didn't use int for the eventID as the example did, i used uniqueidentifier.
Private Function IsDayRegisteredForTooltip(ByVal [date] As DateTime) As Integer |
Dim connectionString As String = ConfigurationManager.ConnectionStrings("eCalendarConnectionString").ConnectionString |
Dim con As New SqlConnection(connectionString) |
Dim cmd As New SqlCommand("SELECT GUID FROM tblActivities WHERE convert( varchar(10), Start, 101 ) = convert( varchar(10), @Start, 101 )", con) |
cmd.Parameters.Add(New SqlParameter("@Start", [date])) |
Using con |
con.Open() |
Dim result As Object = cmd.ExecuteScalar() |
If result <> Nothing Then |
Return Integer.Parse(result.ToString()) |
End If |
Return -1 |
End Using |
End Function |
When I debugged, the result is always 0.
Can someone help me with this? Thank you very much for your help !