Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nishant Kumar 1 post 21 karma points
    Aug 07, 2012 @ 15:38
    Nishant Kumar
    0

    Execute an sql query in umbraco at time of package Installation

    I have created a package in umbraco and trying to add Action Script which will create a table in umbraco database.But When I try to save the below action script it is giving error message:

    Actions XML is malformed, either remove the text in the actions field or make sure it is correctly formed XML.

    I am not able to identify what's the mistake I am doing here in below code.Please Help me out here. Thanks in advance.

    Note: I am using Umbraco 4.8.0

     <Action runat="install" undo="false" alias="ExecuteSql">
    <![CDATA
            CREATE TABLE [test_nishantBlog_Comment](
                [__kp_ID] [smallint] IDENTITY(1999,1) NOT NULL,
                [__fk_postID] [smallint] NOT NULL,
                [Comment] [ntext] NOT NULL,
                [CreationTime] [timestamp] NOT NULL,
                [CommentTitle] [varchar](500) NOT NULL,
                [EmailAdd] [varchar](100) NULL,
             CONSTRAINT [PK_test_nishantBlog_Comment] PRIMARY KEY CLUSTERED 
            (
                [__kp_ID] ASC
            )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
            ) 
        ]>
    
    </Action>
  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Aug 07, 2012 @ 16:11
    Dirk De Grave
    0

    Might be a shot in the wild, but shouldn't you have ]]> instead of ]> at the end of your cdata declaration?

     

    Cheers,

    /Dirk

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Aug 07, 2012 @ 16:12
    Dirk De Grave
    1

    And most probably also the starting <![CDATA[ (you're missing the last '[')

     

    Cheers,

    /Dirk

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies