Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > DetailsView/ObjectDataSource not auto populating all Original_ parameters.

Reply
Thread Tools

DetailsView/ObjectDataSource not auto populating all Original_ parameters.

 
 
davidjgonzalez@gmail.com
Guest
Posts: n/a
 
      04-09-2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GridView not populating, but not all the time, clearing cache fixe jjb3rd ASP .Net 2 04-22-2010 04:04 PM
Auto Shipping Auto Shipping Scheduling:car moving auto transport linkswanted ASP .Net 0 02-16-2008 02:40 AM
Disabling auto-populating of form elements Jason Galvin ASP .Net 1 12-10-2003 06:49 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57