r1xliquid
Posts: 41
|
| Posted: 01/15/2007, 9:09 AM |
|
guys,
I am having a problem using en editable gird and custom update with a stored procedure.
Everything is working fine, i am hiding certain controls on the screen from the user. Some of these fields are used in the custom update.
This throws no errors, but the fields are blanked out in my SQL table for the controls that are hidden. In SQL i am using ISNULL. My intention is, if null is passed to the procedure the column will be ignored on the update.
How can i get the desired effect? I want a colmn that is already not null to stay that way unless i pass a value in, other than a blank string.
I hope i am being clear!
|
 |
 |
wkempees
|
| Posted: 01/15/2007, 11:58 AM |
|
What version of CCS are you using?
General answer (not ASP):
Your hidden controls are probablu not hidden but set Visible No.
In that case they are not posted, your procedure does not receive them and
defaults to blank spaces.
OR
you are using the (3.1.xx) switch that does send the not visible fields as
blank spaces.
A solution would be to (BeforeUpdate) check the contents of those specific
fields and if blank spaces modify the SQL to contain NULL.
In fact you would have to inspect the SQL and alter it using ASP flavour of
replace.
USing the databases defaults seems like no option as you state to be doing
an update.
I don't know if someone has a solution setting NULL values in the procedure.
Walter
|
|
|
 |
r1xliquid
Posts: 41
|
| Posted: 01/16/2007, 7:56 AM |
|
Walter,
I appreciate the reply!
Quote wkempees:
What version of CCS are you using?
I am using version 3.0.2.2
Quote wkempees:
Your hidden controls are probablu not hidden but set Visible No.
You are right the control is set to visible = false in the BeforeShowRow even of the eidtable grid.
I have tried adding code to the beforeBuildUpdate event and the beforeExecuteUpdate event to check for spaces and null on my control. This dosent seem to be working.
The main problem i guess is that i am making a control invisible that is being used in the custom update. I have gotten around this in other places by using a hidden field and changing it with javascript on form submit.
I havent been able to get this to work with the fileUpload because the name in the input box for the file is not the same name the file actually gets when its uploaded to the system.
When i try to give the file a custom name using the fileUpload.value in the beforeShowRow event of my grid it does not work.
Any suggestions!!??
Brian
|
 |
 |
|