Home  |  Products  |  Projects  |  Articles  |  Contact  

ssCurrConv ASP Component Home Page

Description | Installation | Interface | Downloads | Register | ASP example code | FAQ | Links | Terms and Conditions

Version: 1.2 (updated 2004-09-09)
Licence:  shareware 
Price: EURO 50

Description:
Active Server Object for use in ASP scripts. Provides methods and properties to retrieve and cache real time currency conversions. Currency conversion results are retreived in the background from existing real-time currency conversion web services. These results are cached for high speed retrieval. An administration utility allows you to manage the configuration of this component by for example adding your own web services, changing the cache latency, etc. You may test run a trial version for a period of 30 days. After that, if you want to keep using the product, you must register it to recieve your unique unlocking registration key.

Installation:
First of all remove any previous version (if any) by calling regsvr32 with the /U parameter like this:
C:\>regsvr32 /U c:\Windows\System32\ssCurrConv.dll
Then delete that file.

Copy your new ssCurrConv.DLL to any location, but a good place is usually your Windows system directory or a directory specially assigned for 3rd party ASP components. Register ssCurrConv.DLL in Windows with RegSvr32.EXE. You must supply the full path to the DLL in the parameter.
Example:C:\>regsvr32 c:\Windows\System32\ssCurrConv.dll

It may be necessary to register the component as a "COM+ component service" on some Windows systems.

Interface:

Property Summary
BSTR copyright (read only)
          The ssCurrConv.Converter copyright string.
BSTR logFileName (read only)
          The full name of the log file that will be used. If an invalid or no name is used then nothing will be logged.
byte logLevel (read only)
          What must messages must be logged, ranging from 0 (nothing) to 3 (everything).
long refreshAfter (read only)
          The maximum amount of seconds that a conversion may be left in the cache before refreshing the data from a web server.
BSTR registrationInfo (read only)
          The ssCurrConv.Converter registration information string.
BSTR version (read only)
          The ssCurrConv.Converter version string.
 
Method Summary
double convert(currfrom, currto)
          Returns a currency conversion.

Parameter typesParameter descriptions
BSTRfrom currency
BSTRto currency

The currency strings must contain the 3 character ISO currency codes such as "USD", "EUR", "NLG". If no up to date cached conversion is available, this method will retrieve the conversion from a web server.
long reloadServices()
          Reloads all service settings from the registry and returns the number of services loaded.

The services are located in the registry under key HKEY_LOCAL_MACHINE\Software\Skybound Software\ssCurrConv\Services. Each service has it's own key name (usually '1','2','3', etc.) and are loaded in alphabetical order. When a conversion needs to take place and cannot be found in the cache then the first service setting found that did not return any error previously will be used. If all services returned an error previously, then the service with the least recent error will be used.
long sampleAge(const currfrom: BSTR; const currto: BSTR)
          Returns the cache age in seconds of the given conversion.

Parameter typesParameter descriptions
BSTRfrom currency
BSTRto currency

The currency strings must contain the 3 character ISO currency codes such as "USD", "EUR", "NLG". If no matching cached conversion is found, then the method returns the maximum integer value (2147483647).

Downloads:
Be sure to read the TERMS AND CONDITIONS before downloading anything here.

Register:
Send an email to "ssCurrConv at skybound dot nl" for details.

ASP example code:
The ASP code below demonstrates the usage of all the properties and methods of ssCurrConv.

<HTML>
<BODY>
<TITLE>ssCurrConv example code</TITLE>
<HR>
<%
Set Obj = Server.CreateObject("ssCurrConv.Converter")
response.write "The current log level is (0 = none, 3 = max): " & Obj.logLevel & "<br>"
response.write "Current log file (if empty then no logging occurs): " & Obj.logFileName & "<br>"
response.write "Cache will be refreshed after " & Obj.refreshAfter & " seconds.<br>"
response.write "You are using version " & Obj.version & " of ssCurrConv.Converter<br>"
response.write "The last time the conversion Euros to Dollars was done was "
               & Obj.sampleAge("EUR","USD") & " seconds ago.<br>"
response.write "1 Euro = " & Obj.convert("EUR","USD") & " Dollar<br>"
response.write "Copyright: " & Obj.copyright & "<br>"
response.write "Registration info: " & Obj.registrationInfo & "<br>"
'The next line is important.
Set Obj = nothing
%>
<HR>
</BODY>
</HTML>

FAQ:

Q: What happens when ssCurrConv fails to extract currency data from a website because the site is down or the HTML structure has been changed?
A: ssCurrConv will automatically select and continue to use a configured web service that has not caused any errors before, if any, or else a web service that has caused an error the longest time ago.

Links:
Regular expression basics:

Online currency conversion sites: