ID: Q163948
The information in this article applies to:
Moderate: Requires basic macro, coding, and interoperability skills.
When you try to enter or change data on an ASP file that is linked to a Microsoft Access database, the new data will be committed only for fields that do not have spaces in their field names. You will not receive any errors about the data not being saved.
In order to have the data saved back to a Microsoft Access database, make sure that the underlying recordset does not contain field names that have space in them. Three possible solutions are as follows:
NOTE: If you select this option, be sure to update all of the other objects in the database which use the newly modified fields. Otherwise, you will receive errors when you try use those objects.
NOTE: This solution contains information about editing ASP files and assumes that you are familiar with editing HTML files, Active Server Pages, and Visual Basic Scripting. Microsoft Access Product Support professionals do not support customization of any HTML, HTX, IDC, or ASP files.
The following example demonstrates how to change the VBScript code in an ASP file. To modify the VBScript for a particular file, follow these steps:
1. Open the <object name>alx.asp file. It has a function that looks
something like this:
NOTE: In the following sample code, an underscore (_) at the end
of a line is used as a line-continuation character. Remove the
underscore from the end of the line when re-creating this code.
Function GetCtrlQueryString()
Dim szRet
Dim i
for i = 1 to cMaxCtrls
if rgszCtrls(i, 1) = "" Then Exit For
szRet = szRet & rgszCtrls(i, 2) & "=" &
MakeHTMLValue(Test_Formalx.Controls(rgszCtrls(i, 1)).Value) & _
"&"
next
GetCtrlQueryString = szRet
End Function
2. Modify the function, changing only the line that sets szRet so it
looks like the following (note the use of MakeHTMLValue):
Function GetCtrlQueryString()
Dim szRet
Dim i
for i = 1 to cMaxCtrls
if rgszCtrls(i, 1) = "" Then Exit For
szRet = szRet & MakeHTMLValue(rgszCtrls(i, 2)) & "=" &
MakeHTMLValue(Test_Formalx.Controls(rgszCtrls(i, 1)).Value) & _
"&"
next
GetCtrlQueryString = szRet
End Function
Microsoft has confirmed this to be a problem in Microsoft Access 97.
1. Create the following new table called Table1:
Table: Table1
-------------------------------
Field Name: ID
Data Type: Counter
Indexed: Yes (No Duplicates)
Field Name: FirstName
Data Type: Text
Field Name: Last Name
Data Type: Text
2. Create an AutoForm based on this table.
3. Use the "Publish to the Web Wizard" to create an ASP File. Please note
this must be publish to a site which supports ASP file formats and has
a system DSN assigned to your database.
4. Use a Web browser to open your new ASP file.
5. Enter and save data in your ASP form.
6. Check the underlining data in the table.
Note that the data you entered into the FirstName field is saved, but
that the data you entered into the Last Name field is not saved.
For more information about aliasing fields, search the Help Index for "alias," or ask the Microsoft Access 97 Office Assistant.
Additional query words: missing gone saved maintained
Keywords : kbinterop GnlDe IntpWeb IntAsp
Version : 97
Platform : WINDOWS
Hardware : x86
Issue type : kbbug
Last Reviewed: May 18, 1999