471,117 Members | 1,230 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,117 software developers and data experts.

formview, objectdatasource, update method

I have an business object bound to a formview with through an object
datasource, in edit mode when i click update i receive the following
error:

The 'ActionID' property on the type specified by the DataObjectTypeName
property in ObjectDataSource 'odsAction' is readonly and its value
cannot be set.

This is correct as the actionid property is readonly (being the primary
key).

I've been trying to find out how to tell the objectdatasource that this
is readonly, im not reading the actionid out to the form as its not
required to be viewable.

I tried putting <DataObjectFieldAttribute(True, True, False) before
the property as suggested in another thread like so:

''' <summary>
''' Property to get the id of the event
''' </summary>
''' <value></value>
''' <returns>The event id</returns>
''' <remarks>DataObjectFieldAttribute is added to let the
objectdatasource control know
''' that this property is the primary key and as such,
readonly</remarks>
<DataObjectFieldAttribute(True, True, False)_
ReadOnly Property ActionID() As Integer
Get
Return _autoBean.GetValue("ActionID")
End Get
End Property

This has made no difference though, i still receive the above error.

Any ideas on how to stop it from tryign to update the actionid?

Cheers,

kidders

Jan 23 '07 #1
0 1152

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Jurgen Appelo | last post: by
3 posts views Thread by Jurgen Appelo | last post: by
reply views Thread by ThePurpleCat | last post: by
reply views Thread by =?Utf-8?B?TGFkaXNsYXYgTXJua2E=?= | last post: by
8 posts views Thread by =?Utf-8?B?QXNo?= | last post: by
2 posts views Thread by Aamir Ghanchi | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.