Copied to clipboard

Flag this post as spam?

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


  • Erik Ernst 70 posts 90 karma points
    Apr 07, 2010 @ 22:46
    Erik Ernst
    0

    Different database

    Is it possible to specify to use a different database than the current database?

     

    Rgds,
    Erik

  • Jesper Ordrup 1019 posts 1528 karma points MVP
    Apr 27, 2010 @ 11:09
    Jesper Ordrup
    0

    Hi Erik,

    Sorry for the slow response. It sure is: 

    Configuring another db
    Just add the following to your web.config
    <add key="MYOWNDB" value="server=myservername.dk;database=test;user id=testuser;password=ddd33422" />

    /Jesper

  • Erik Ernst 70 posts 90 karma points
    Apr 28, 2010 @ 08:10
    Erik Ernst
    0

    Thank you I'll try that.

    Erik

  • ioulia 1 post 21 karma points
    May 25, 2010 @ 11:17
    ioulia
    0

    I am trying to use this extention for creating a callback from the Secure trading. Retrieving data from the other database is not a problem, however can't  devise the XSLT file for inserting the callback data - is it possible at all?

    Here is the code I am using:

    <xsl:param name="currentPage"/>
    <xsl:variable name="formattedamount" select="string('100')"/>
    <xsl:variable name="stauthcode" select="string('stauthcode2')" />
    <xsl:variable name="streference" select="string('streference2')" />
    <xsl:variable name="securitymessage" select="string('securitymessage2')" />
    <xsl:variable name="securityresponsesecuritycode" select="string('securityresponsesecuritycode2')" />
    <xsl:variable name="securityresponsepostcode" select="string('securityresponsepostcode2')" />
    <xsl:variable name="securityresponseaddress" select="string('securityresponseaddress2')"/>
    <xsl:variable name="name" select="string('name2')"/>
    <xsl:variable name="email" select="string('email2')"/>
    <xsl:variable name="company" select="string('company2')"/>
    <xsl:variable name="address" select="string('Address2')"/>
    <xsl:variable name="town" select="string('Town2')"/>
    <xsl:variable name="county" select="string('County2')"/>
    <xsl:variable name="postcode" select="string('Postcode2')"/>
    <xsl:variable name="country" select="string('country2')"/>
    <xsl:variable name="telephone" select="string('telephone2')"/>
    <xsl:variable name="orderref" select="string('orderref2')"/>
    <xsl:variable name="orderinfo" select="string('orderinfo2')"/>

    <xsl:template match="/">
    <xsl:variable name="sqlexp">
    INSERT INTO [Transactions]
                (
     [formattedamount]
    ,[stauthcode]
    ,[streference]
    ,[securitymessage]
    ,[securityresponsesecuritycode]
    ,[securityresponsepostcode]
    ,[securityresponseaddress]
    ,[name]
    ,[email]
    ,[company]
    ,[address]
    ,[town]
    ,[county]
    ,[postcode]
    ,[country]
    ,[telephone]
    ,[orderref]
    ,[orderinfo] )
    VALUES (
     <xsl:value-of select="$formattedamount"/>,
     <xsl:value-of select="$stauthcode"/>,
     <xsl:value-of select="$streference"/>,
     <xsl:value-of select="$securitymessage"/>,
     <xsl:value-of select="$securityresponsesecuritycode"/>,
     <xsl:value-of select="$securityresponsepostcode"/>,
     <xsl:value-of select="$securityresponseaddress"/>,
     <xsl:value-of select="$name"/>,
     <xsl:value-of select="$email"/>,
     <xsl:value-of select="$company"/>,
     <xsl:value-of select="$address"/>,
     <xsl:value-of select="$town"/>,
     <xsl:value-of select="$county"/>,
     <xsl:value-of select="$postcode"/>,
     <xsl:value-of select="$country"/>,
     <xsl:value-of select="$telephone"/>,
     <xsl:value-of select="$orderref"/>,
     <xsl:value-of select="$orderinfo"/>

    </xsl:variable>

    <xsl:variable name="sqlresult" select="jesper.sql:SQLXml($sqlexp,'database2')"/>
    <xsl:value-of select="$sqlresult//."/>

    </xsl:template>

    </xsl:stylesheet>

Please Sign in or register to post replies

Write your reply to:

Draft