| Home | Software Support | Training | Conferences |

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:
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.
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:
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">
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:
Server.CreateObject() in VBScript in ASP pages. CreateObject() alone should only be used in Visual Basic.
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.
|