Home             Free Software             Software Support             Training             Conferences                    

  Stonebroom.SaveForm Technical Support

The product support pages contain information about the topics which arise most frequently. If you need more help or wish to report a problem with SaveForm or any of our other products please mail us directly at support@stonebroom.com. You can also use the contact details on the home page to submit comments, suggestions, or technical queries.


Using SaveForm under the .NET Framework.

The SaveForm component is not specifically designed for use under the Microsoft .NET Framework. It is a standard COM DLL, and so will require you to run any managed code application or ASP.NET page that uses it in "compatibility" mode (i.e. include AspCompat="true" in the <%@Page ... %> directive). Alternatively you can use the .NET TLBIMP utility to create a managed code wrapper for the component. However, please note that we cannot provide support for issues that arise in conjunction with using the component within a .NET application.


Checking the component version number.

If you are having problems with SaveForm, you should check the component version number and include this with your inquiry. The component file is stnsvfrm.dll, which is installed by default in your Winnt\System32 folder. To check which version you have installed:

  • Open the Winnt\System32 folder and select the file stnsvfrm.dll.
  • Right-click on it, select Properties, and open the Version page.
  • The version number is shown at the top of this page, in the format xx.xxxx

Updates to the component in version 1.2x

The following changes were made to SaveForm as of version 1.2x. They are designed to make it easier to store user-specific information, easier to handle retrieval of values, and improve the debugging information that is available.

  • The PersistRequest method now supports a new optional property, CustomUserID (String). If you wish to store values against your own custom user identifiers, and be able to extract them later for each specific user based on that identifier, specify the identifier for this parameter. It is stored in the table with that entry, and can be used in the RetrieveRequest method to retrieve those specific values. See Documentation: PersistRequest for more details.
  • The RetrieveRequest method now supports a new optional property CustomUserID (String). If you store a set of user values by specifying a custom user identifier in the PersistRequest method, you can extract this set of values by specifying the custom identifier for this parameter. It can be used with or without a value for the pageURL parameter. See Documentation: RetrieveRequest for more details.
  • The RetrieveRequest method also supports another new optional property UseRefererURL (Boolean). The default for this parameter if omitted is True, meaning that the method will use the 'coded' URL of the referring page as the lookup key for the set of values to retrieve. If set to False, the method will use the 'coded' URL of the current page instead. See Documentation: RetrieveRequest for more details.
  • To benefit from the improved debugging information in SaveForm, be sure to turn Degbug mode on while building and testing your application. Debug mode is supported in all the components methods. See the component documentation for more details.

Getting the latest version of SaveForm.

The main SaveForm file is stnsvfrm.dll, which is installed by default in your Winnt\System32 folder. The current versions of this file are 1.20 (evaluation version) and 1.21 (full version).

To check which version you have installed:

  • Open the Winnt\System32 folder and select the file stnsvfrm.dll.
  • Right-click on it, select Properties, and open the Version page.
  • If the File Version entry is earlier than the current version you can:
    • Click here to download the new file, and unzip it into a temporary folder.
    • Delete the existing version of this file from your Web server's Winnt\System32 folder.
      (You may in some circumstances have to stop and restart IIS or the server itself
      to release the operating system lock on the file before you can delete it).
    • Replace it with the new version of the file.
  • NOTE: This is the evaluation version of the component. If you have purchased a full copy of SaveForm and would like to upgrade to the latest version, please send a request to us showing the name of your supplier, including your original invoice number and date of purchase.

Changes to the Database Format from v1.0.

In version 1.2x and later, the format of the database table required to persist values to a database has changed. If you upgrade from an earlier version of SaveForm, you must update the PersistedValues table in your database to the new format.

A SQL script is included to recreate the table in the correct format, or alternatively you can manually edit the existing table in Design View. Add an new column named sCustomID to the existing table, and give it a data type of vchar (SQL Server) or Text/String/Character depending on the type of database system you are using.

You must also remove any existing primary key setting. You may wish to create an index (Repeated Values / Not Unique) on this column if you intend to store and retrieve values using the new Custom ID parameters of the component.


Problems when using a <TEXTAREA> control.

The SaveForm component uses carriage returns - i.e. Chr(13) + Chr(10) - to delimit the values that it saves in a session, text file or database. This can cause a problem if you are trying to save the contents of an HTML control such as a <TEXTAREA> when you have physical carriage returns included (i.e. when there is a WRAP="PHYSICAL" attribute in the opening <TEXTAREA> tag). Under these conditions, only the first line of the text is returned when you retrieve the value.

To get round this problem, you can encode the value with one or more different characters to represent the carriage return. For example, in the code here we have replaced carriage returns with the character string "*|*":

<FORM ACTION="textareapersist.asp" NAME="theForm" METHOD="POST">
...
<% '-- server-side ASP to get value for control --
strValue = objSaveForm.GetSavedValue("HiddenControlName")
strRealValue = Replace(strValue, "*|*", Chr(13) & Chr(10))
%>
<TEXTAREA WRAP="PHYSICAL" NAME="ActualControlName"
          ROWS="10" COLS="40"><% = strRealValue %></TEXTAREA>
<INPUT TYPE="HIDDEN" NAME="HiddenControlName">
...
<!-- must include event definition to encode value -->
<INPUT TYPE="SUBMIT" VALUE="Persist" ONCLICK="doEncode()">  
</FORM>

<SCRIPT LANGUAGE="JavaScript">
<!--
// client-side script to encode string before submitting
function doEncode() {
  var objForm = document.forms['theForm'];
  var strRealValue = objForm.elements['ActualControlName'].value;
  strCodedValue = CREncodeString (strRealValue, '*|*');
  objForm.elements['HiddenControlName'].value = strCodedValue;
}
//generic encode function
function CREncodeString (strToEncode, strDelimChars) {
  var strCRLF = String.fromCharCode(13,10);
  var strLeft;
  var strRight;
  var intCRLF = strToEncode.indexOf(strCRLF);
  while (intCRLF != -1) {
    strLeft = '';
    strRight = '';
    if (intCRLF > 0)
      var strLeft = strToEncode.substring(0, intCRLF);
    if (intCRLF < strToEncode.length - 1)
      var strRight = strToEncode.substring(intCRLF + 2, strToEncode.length);
    strToEncode = strLeft + strDelimChars + strRight;
    intCRLF = strToEncode.indexOf(strCRLF);
  }
  return strToEncode;
}
//-->
</SCRIPT>

Before the values are submitted, the string in the <TEXTAREA> control is encoded to replace all carriage returns with the chosen character(s), and then it is placed into a HIDDEN-type <INPUT> control on the same <FORM>. This value is then persisted (along with the current value of the <TEXTAREA> control).

When the page is reloaded and the values retrieved, the value of the HIDDEN-type control is extracted within the ASP and un-encoded to convert the replacement characters back into real carriage returns for the <TEXTAREA> control. You can download this example code to experiment with and use in your own applications.


Errors when creating user directories.

SaveForm persists values as text files within a directory named STNBSaveForm which is created in the WWWRoot (or 'root') folder of your default Web site. You can create this folder manually if required after installing SaveForm. You must give this folder Write or Full Control permissions for the account that will access it. If the component is being accessed anonymously, the account in use will be either IUSR_machinename or IWAM_machinename depending on whether you have installed the component as a Virtual Application in Internet Service Manager.

Within this folder the component creates a subfolder for each user that has the user ID (a 17 character numeric string) as its name. Within each user's folder the component creates a subfolder for each page that they access (if it persists values to a text file). These subfolders are named with the 'coded' URL of the page.


I can't replace or delete the SaveForm DLL file.

Windows NT and the Web server cache the components they use in memory, and lock them so that they cannot be moved or deleted while in use. In some cases stopping and restarting the Web server may release the component. Otherwise restarting Windows or rebooting the server will do the trick. To avoid this problem, if you are using Internet Information Server 4 or higher, you can create Virtual Applications and place all your ASP pages that use the component inside this folder. It's then possible to unload the component from memory using the Properties dialog of the Virtual Application folder in Internet Service Manager.


How do I view the documentation from a remote machine?

The documentation and sample pages for SaveForm are found in the directory where you installed ServerZip. By default this is C:\Program Files\Stonebroom\SaveForm . To make these files available through the Web server so that you can view them from another machine, you can either copy them into a directory underneath your WWWRoot directory, or create a virtual root (or Alias) that points to the SaveForm directory. Make sure that you specify 'Script Executable' permission for the directory. If you only want to view the HTML documentation pages you don't need to specify Executable permission for the directory.


Runtime error 800a01ad 'ActiveX component can't create object'.

This general error message can be caused by many things. To cure it, try the following:

  • Make sure you are using Server.CreateObject() in VBScript in ASP pages. CreateObject() alone should only be used in Visual Basic.
  • If you are running the object in a separate process in IIS4, it may be that MTS has become confused and is holding an invalid object pointer. Try unloading the object using the Properties dialog of the virtual application directory. Otherwise reboot the server.
  • Alternatively, it might be that the DLL has been moved or deleted, or that for some reason the registered information is wrong. Re-register the DLL (probably in Winnt\System32) using the RegSvr32 utility:

    regsvr32 path_to_dll\stnsvfrm.dll

Finally, if you've got any suggestions - or any comments on SaveForm generally - we'd love to hear from you.


Home | Free utilities | Software support | Training | Conferences | Contact
  ©2013 Stonebroom Limited, England