DetailsView/ObjectDataSource not auto populating all Original_ parameters.

D

davidjgonzalez

I am using a DataSet to interface with my Sql Server 2005 DB.
I have an Item table which looks like:

PK itemId int
name text
desc text

When I look at the Update function that is auto generated by the
ItemDataSet/ItemTableAdapater
i see that it references Original_itemId, Original_name and
Original_desc in the Update SQL statement. (Update ... Where itemId =
@Original_itemId AND name = @Original_name ... )

I created a DetailsView in my website and hooked it up to the
ItemTableAdapter. I am able to select everything just fine, however
when I try to update, only Original_itemId is populated correctly -
Original_name and Original_desc are both null!
I am guessing this is has something to do with the
ObjectDataSource/DetailsView recognizing that the Original_itemId
references a PrimaryKey and Original_name and Original_desc are just
data fields.

Any ideas how to fix it so all my Original_ fields are auto populated?
Also, all Original fields show up in the aspx source in the
<UpdateParameters> section.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,006
Latest member
LauraSkx64

Latest Threads

Top