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" />
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?
Different database
Is it possible to specify to use a different database than the current database?
Rgds,
Erik
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" />
Thank you I'll try that.
Erik
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>
is working on a reply...