Sharon Niles
|
| Posted: 03/03/2003, 8:40 AM |
|
I can't get the Custom Insert to work. Let's say I have 2 tables. Table 1 is going to add records to Table 2.
The properties in the editable grid are:
Datasource is Table1
Return Page is blank
Remove parameters is blank
Convert URL is none
Records per page is 30
Max records is 100
Restricted No
Empty Rows 0
Allow Insert Yes
Allow Update Yes
Allow Delete Yes
Delete Control Check Box Delete
Preserve Parameters Get
Custom Insert Type Table
Custom Insert Table 2
Field Parameter Name
AccCode AccCode Control
Issue Issue Control
TType TType Control
Month AccMonth Control
I want to add these four fields (based on a Issue Date search) to find these records, then add the above fields to the Table 2. When I press submit, the information is found, but when I check Table 2, there are no additions. Any help will be most appreciated.
Thank you,
Sharon Niles
|
|
|
 |
M.Masri
|
| Posted: 04/05/2003, 3:09 PM |
|
Look at the end of The Editable Grid in the CCS Help file:
________________________________________
DataSource Column Parameters
If an Editable Grid is based on a query or a stored procedure, you have to specify the Custom Insert, Custom Update and Custom Delete properties in order to facilitate the insert, update and delete operations respectively. When you specify the Custom Update and Custom Delete properties, you have to specify a where clause which determines the records that need to be updated or deleted. However, unlike an ordinary record form which operates on single records, an Editable Grid deals with multiple records at the same time. This means that when the Editable Grid is submitted for update or delete operations, the form submits multiple primary key corresponding to the records that need to be updated or deleted.
The implication of this is that the where parameter for the Custom update or Custom delete properties cannot simply specify URL or Form parameter types as the source of the primary keys. For this reason, there is a special parameter type which is designed to deal with the multiple values submitted by an Editable Grid. This is the DataSource Column parameter Type as shown in the screenshot below.
[Snip]
Therefore, whenever you specify a Custom Update or Custom Delete operation for an Editable Grid, make sure that the Type of the source parameter is set to DataSource Column.
Note that a Custom Insert operation simply inserts a new record into a table without the need for a where clause. As such, there is no need for specifying input parameters like is the case with Custom Update and Custom Delete operations.
____________________________________________________________
hope that help
|
|
|
 |
|