RE: vb.net - datagrids inserting records
- From: "Wally" <myxfactor@xxxxxxxxxxxxxxxx>
- Date: Tue, 24 May 2005 07:20:03 -0700
Kevin thanks for the post!
What I'm trying to do is to have only one field changeable for the user (the
other fields are set to read only) in the DataGrid. If the user inserts or
changes an item and selects the update button I want to replace the other
source column fields with my known user information (Key Field id, userid,
date & time).
When I try to insert data the fields that are read only are set as null
values and I thought that if I set the parameter fields I could override the
null source column values just before the Sql Data Adapter Update command
ran. I known I could write a stored procedure but I wanted to use the
generated code.
Thanks again....
"Kevin Yu [MSFT]" wrote:
> Hi,
>
> First of all, I would like to confirm my understanding of your issue. From
> your description, I understand that when you try to set the parameter
> values to default before updating the data source. However this doesn't
> seem to work. If there is any misunderstanding, please feel free to let me
> know.
>
> As far as I know, this might be caused with the sourcecolumn setting of a
> parameter. Because in Windows Form Generated code set the source column for
> each SqlParameter. The parameter will get the value from the source column
> in the DataSet. So we can try to remove the sourcecolumn settings by
> removing the last argumeng of 4 arguments when add in Parameters. I think
> this will resolved the problem.
>
> HTH.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>
>
.
- Follow-Ups:
- RE: vb.net - datagrids inserting records
- From: Kevin Yu [MSFT]
- RE: vb.net - datagrids inserting records
- References:
- vb.net - datagrids inserting records
- From: Wally
- RE: vb.net - datagrids inserting records
- From: Kevin Yu [MSFT]
- vb.net - datagrids inserting records
- Prev by Date: Interop.ADODB created...why?
- Next by Date: ODBC Transaction inside a SqlTransaction problem
- Previous by thread: RE: vb.net - datagrids inserting records
- Next by thread: RE: vb.net - datagrids inserting records
- Index(es):