Danny
|
| Posted: 03/30/2002, 9:52 AM |
|
I have d/l the jsp template of the forum, and when i try to add a new thread, the following error is shown:
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver][SQLServer]Cannot insert the value NULL into column 'message_id', table 'CSF.dbo.messages'; column does not allow nulls. INSERT fails.
What can I do to fix this error?
Thx~
|
|
|
 |
Nicole
|
| Posted: 04/01/2002, 1:01 AM |
|
Danny,
mesage_id field should contain value different to NULL.
Check what is message_id field type on CC form? It seems to me that is of non updatable type (Label or URL).
Here is some helpful explanation. There're two field types:
- updatable(editable):Hidden, TextBox, TextArea, LestBox, RadioList, Checkbox
- nonupdateable: Label, URL.
CC events may be departed into two groups:
- "show". Like Open, Close, BeforeShow, BeforeShowInsert, BeforeShowUpdate, BeforeShowDelete.
- "action". Like BeforeExecute, BeforeInsert, BeforeUpdate, AfterDelete.
Nonupdateable fields aren't including to SQL statements, and their values are accessable in "show" events only. You can't get their values in any "action" event. Updatable fields are included into sql statements and you can access their values both in "show" and "action" events.
So set message_id type to any updatable type. If you want to display it as e.g. Label type field as well, add 2 message_id fields to the form and assign different names for them in field properties.
|
|
|
 |
|