Copied to clipboard

Flag this post as spam?

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


  • bowling 4 posts 24 karma points
    Apr 24, 2012 @ 05:36
    bowling
    0

    SQL for XSLT (Jesper Package)

    Hi, 

    I've already installed Jesper Package to use SQL command in my xslt.  

    However, I don't understand about configuring to another db 

    I've already add the following to my web.config

     

      <add key="MYOWNDB" value="server=127.0.0.1;database=shop;user id=shop;password=99999999" />

     

    but i still can't select data from table in db .

    I changed xslt to 

     

    <xsl:variable name="sqlexp">

    SELECT *

      FROM [MyTable]

    </xsl:variable>

     

    and when i press save , it said cannot find [MyTable] 

     

    what should i do ?? 

    Please help .

     

    Thanks  

  • Jesper Ordrup 1019 posts 1528 karma points MVP
    Apr 24, 2012 @ 07:08
    Jesper Ordrup
    0

    Hi,

    When calling SQLXML you should add the second parameter specifying the database key from web.config

    <xsl:variablename="sqlresult"select="jesper.sql:SQLXml($sqlexp,'MYOWNDB')"/>

    best

    Jesper

     

Please Sign in or register to post replies

Write your reply to:

Draft