Technote Details :: Multiple insert fails for empty forms

Issue

When trying a multiple insert, on all 6 fields, even though I've entered correct
data in the first two, I get an error message saying that some operations succeeded,
but some columns cannot be null (e.g. "2 operations succeeded, Error: SQL error:
column 'name' cannot be null
").

  • Products: NeXTensio.
  • Operating System: All.
  • Server Models: All.
  • Dreamweaver version: any.

Reason

This happens because some of the fields used in the form are drop-down menus, with data retrieved from a table. This fields always submit a value, since one of the entries is by default selected. When the form is submitted, aside the forms that have been completed by the user, the drop-down menu's value for all of the others is submitted too.

Solution

In order for the multiple insert to work with a NeXTensio form using drop-down menus as form elements, you must edit each of the menus, and add a static option. This option must be marked as initially selected, and must not have a value entered. The label can be anything needed (e.g. none).

Jon Jaques - 09-08-2005 06:14:05 GMT +2
I'm still getting this problem with Nextensio 3, and the behavior affects not only multiple insert forms, but also singular instances, as well. I'm getting this error because the values from the recordset are not being protected with KT_escapeAttribute, and when Cstr tries to convert the result to a string, for whatever reason this fails. (It's an nvarchar field in MSSQL). I've also observed this behavior in PHP, as well, and the answer is to find the database fields in the If-Then-Else statement (two of them) and wrap them with function calls to KT_escapeAttribute.
Home > Support > Knowledge Base > Technote Details
Search the Knowledge Base
© Adobe Systems Romania. All rights reserved.