View Full Version : Could not find a property named '... ' on the type specified by the DataObjectTypeName property in ObjectDataSource '...'


Anabela Silva
11-01-2006, 07:08 PM
To anyone who has experienced this problem!

Could not find a property named '... ' on the type specified by the
DataObjectTypeName property in ObjectDataSource '...'

I've been looking at forums about the problem that devellopers have in using
ObjectDataSource when trying to update or delete a record.
There has been a lot of talk like... you have to implement a list if you
wanna use direct methods in such operations, etc etc

It was also an headache to me :-s

Well, i found a way that works

In design-time, go to the properties window and choose the ObjectDataSource
control. Then, in property DataObjectTypeName just remove whatever that
is... and it will work.

For example, in my case i was using a gridview that loads database users
(the primary key of that table is of type Uniqueidentifier).

When i configured the ObjectDataSource thorugh the .Net's wizard, it put
automatically in the DataObjectTypeName the type System.Guid
for that, i couldn't delete or update any record of the grid, so i removed
it and let the property blank.
Then, I just tried to delete and update a record and IT WORKED FINE (yes!)
:-D

i hope this helps you like it helped me

Best regards to all interested :-)

Anabela Silva