Assign the editor properties dynamical from database

Last post 06-01-2007, 10:03 AM by djlurch. 5 replies.
Sort Posts: Previous Next
  •  07-29-2005, 8:27 AM 9130

    Assign the editor properties dynamical from database

    Hi all
     
    Anyone can help me? In which way is possibel, that i can set editor-properties from database?

    Example-Code:



     ' Set the ID of this editor-class
    strEditorID       = "Editor1"
    ' Create a new editor class-object
    Set objEditor       = New CuteEditor
    objEditor.ID        = strEditorID

     ' Get Properties-Configuration from DB
    SQL = "SELECT CE_ItemName, CE_ItemValue FROm tbl_CuteEditor ORDER BY OrderID;"

     Set rs = Server.CreateObject("ADODB.Recordset")
     rs.Open SQL, Conn, 2, 1, 1
     
      DO WHILE NOT rs.EOF
       objEditor.rs("CE_ItemName") = rs("CE_ItemValue")
      rs.MoveNext
      Loop
       
     rs.Close
     Set rs = Nothing

    --- cut ---



    Can't work... other trys with: objEditor."&rs("CE_ItemName")&" = rs("CE_ItemValue") does't work too. ASP don't allow this.

    Anyone from the Support-Team have a other way/ideal to doing the same functionality?

    Greetings
    Siff
     
     
  •  08-12-2005, 9:08 AM 9524 in reply to 9130

    Re: Assign the editor properties dynamical from database

    Hello?

    Can anybody help me from the support?
     
    Best regards
    Siff
  •  05-17-2007, 4:49 PM 29786 in reply to 9524

    Re: Assign the editor properties dynamical from database

    Did you ever get this figured out, I am trying the same thing?
  •  05-25-2007, 6:20 AM 30110 in reply to 29786

    Re: Assign the editor properties dynamical from database

    hurrikane,
     
    Just save the setting your need into the DB then read it when editor loads.

    Example:

          MySQL="select top 1 * from test order by id DESC"
           set rs2=conn.execute(MySQL)
           if not rs2.eof then
                EditorBodyStyle = rs2("EditorBodyStyle ")
                EditorWysiwygModeCss= rs2("EditorWysiwygModeCss")
                rs2.close
                set rs2=nothing
           end if
     
     
    editor.EditorBodyStyle =EditorBodyStyle
    editor.EditorWysiwygModeCss = EditorWysiwygModeCss
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  05-25-2007, 7:25 AM 30113 in reply to 30110

    Re: Assign the editor properties dynamical from database

    That doesn't answer the question.  What we are trying to do is this....


    MySQL="select top 1000 * from test order by id DESC"
           set rs2=conn.execute(MySQL)
           if not rs2.eof then
               
    DynamicEditorNumber.XXXXXXX
    DynamicEditorNumber.XXXXXXX
    DynamicEditorNumber.XXXXXXX
    DynamicEditorNumber.XXXXXXX

                rs2.close
                set rs2=nothing
           end if
     


  •  06-01-2007, 10:03 AM 30313 in reply to 30113

    Re: Assign the editor properties dynamical from database

    I'm not sure why this question is being asked of Adam. It is more of an ASP question than a CE question.

    Here is a sample from my code library:

    Sub LoadTheVariables(sql)
          Dim field, RS
          Set RS = objConn.Execute(sql)
          For Each field In RS.Fields
                EXECUTE(field.Name & "=RS(""" & field.Name & """)")
          Next
          RS.Close
          Set RS = Nothing
    End Sub

    So, where i is a counter, you could:

    EXECUTE("Editor" & i & "." & rs("property") & " = " & rs("property_value"))




View as RSS news feed in XML