Print Page | Close Window

Bug in CustomProperties?

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=16427
Printed Date: 02 June 2024 at 1:50pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Bug in CustomProperties?
Posted By: chris3105
Subject: Bug in CustomProperties?
Date Posted: 10 March 2010 at 3:34pm
Hello,
 
I wrote a little procedure for inserting/updating custom properties, and it seems, that there's a bug. Any help would be nice.
 
 
Code:
 
Private ModifiedEvent As CalendarEvent
Private m_pCalendar As CalendarControl
 
Private sub SaveProp()
 
    Dim I As Long
    Dim propName
    Dim propVal
   
    ModifiedEvent.CustomProperties.RemoveAll
   
    For I = 1 To 5
       propName = Trim(Me("editPropName" & I))
      If Len(propName & "") > 0 Then
         propVal = Me("editPropValue" & I)
          ModifiedEvent.CustomProperties.Property(propName) = propVal
          Debug.Print "Save as: ", propName, propVal
        End If
    Next
 
    For Each propName In ModifiedEvent.CustomProperties
        If Len(propName & "") > 0 Then
            Debug.Print "Saved as: ", propName, ModifiedEvent.CustomProperties(propName)
         End If
    Next
   
    Set m_pCalendar = Forms!frmkalender.g_pEditEvenArgs.m_pCalendar
    m_pCalendar.DataProvider.ChangeEvent ModifiedEvent
 
end sub
 
Output Debug1:
Save as:      zeile1        wert1
Save as:      zeile2        wert2
Save as:      zeile3        wert3
 
Output Debug2:
Saved as:     zeile1        wert3
Saved as:     zeile2        wert3
Saved as:     zeile3        wert3
 
Value of field CustomPropertiesXMLDate in table Event:
<Calendar CompactMode="1" Locale="1049"><CustomProperties><CustomProperty Name="zeile1" Value="wert3" VariantType="16396"/><CustomProperty Name="zeile2" Value="wert3" VariantType="16396"/><CustomProperty Name="zeile3" Value="wert3" VariantType="16396"/></CustomProperties></Calendar>
 
 



Replies:
Posted By: SuperMario
Date Posted: 20 April 2010 at 1:43pm
In Access you must tell it what type of variable you are passing. For example:

 Dim propName As String
 Dim propVal As String

I just tried this in Access and it works fine one you tell it what type.  



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