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

Last post 06-08-2009 4:34 PM by RabidJay. 5 replies.

Sort Posts:

  • Could not find a property named ... on the type specified by the DataObjectTypeName

    07-06-2006, 5:57 PM
    • Member
      164 point Member
    • Idgaf
    • Member since 07-06-2006, 9:29 PM
    • California
    • Posts 24

    I created a new DataSet and dropped a SQL table on it which created a TableAdapter for "SELECT * FROM Table".  I then added a single-row select query which accepts one parameter (the row guid).

    Then, I added a GridView which shows all rows and a DetailsView for the selected row which all works fine except when I click Insert/Update/Delete on the DetailsView, I get something like "Could not find a property named 'Number' on the type specified by the DataObjectTypeName property in ObjectDataSource 'ObjectDataSource2'."

    Any ideas?

  • Re: Could not find a property named ... on the type specified by the DataObjectTypeName

    08-21-2007, 6:53 PM
    • Member
      7 point Member
    • marsonj
    • Member since 08-02-2007, 3:31 PM
    • Posts 30

    Try:

    Look at the properties for the ObjectDataSource and remove everything from DataObjectTypeName property and just leave that property blank; it will be RUN.
    I hope this works for your ASP.NET 2.0 project on Microsoft Visual Studio 2005 Beta 2.0.

    -- http://amastaneh.blogspot.com/2005/11/could-not-find-property.html

  • Re: Could not find a property named ... on the type specified by the DataObjectTypeName

    09-08-2008, 1:19 PM
    • Member
      2 point Member
    • dennis82
    • Member since 09-08-2008, 5:00 PM
    • Posts 1

     

    Hi I have got exactly the same problem... It is definately related to a wizzard in vs2005 /2....As you search for this problem half the Google searches come up with the same problem, this is an answer that works for some people, not for others. Sometimes you see a Microsoft 'pro' answer:  Look at your coding! (which isn't realy helpful because the wizard produced it) with a reference to DataObjectName in the documentation. The problem is the Wizzard. I haven't been able to reproduce the problem in a steady fashion....One time it works ok straight out of the wizard and the other time not.

    When I try to use your solution: delete the Datatypname, it gives me the "could not ind a non-generic method 'update' that has parameters: -followed by all the field names -

    I have spent more than 6 hrs on this problem, and judging by the amount of messages about this subject on the web, hundreds of people with me!

    Is there someone (it should be fixed by MS (but yeah...)) who has solved this problem? please????

    Best regards and thanks in advance!

    Dennis

  • Re: Could not find a property named ... on the type specified by the DataObjectTypeName

    09-24-2008, 6:09 AM
    • Member
      6 point Member
    • nevinph
    • Member since 09-22-2008, 12:24 AM
    • Posts 16

    im having the same problem too,, i also made a post regarding about this but sadly no one answered it yet.. im still finding a solution bout this im new still need to learn.. could someone please help..

    .net learner
  • Re: Could not find a property named ... on the type specified by the DataObjectTypeName

    12-22-2008, 12:32 AM
    • Member
      4 point Member
    • ionFreeman
    • Member since 09-12-2008, 4:56 PM
    • Posts 2
    I solved the problem by changing a publicly exposed variable to a property. That is, I had public String Path which is now protected String path public String Path{get{return path;}set{path=Value;}} hth Ion
    Filed under:
  • Re: Could not find a property named ... on the type specified by the DataObjectTypeName

    06-08-2009, 4:34 PM
    • Member
      3 point Member
    • RabidJay
    • Member since 03-27-2009, 9:12 PM
    • Posts 10

    In case anybody else runs into this for Update operations -

    in stepping through the Update process (Listview EditItemTemplate) , the runtime instantiated my business object using it's default constructor even if I supplied a fully parameterized constructor, so it seems logical that, if you are passing a BO instance to the Update method you defined, it would need accessible BO properties with names that match those used when it first retrieved /bound the data.

    ie - if it doesn't have a complete correct parameter list in the Update statement how else would it map the UI input to the update properties?

    I haven't tried it, but I suspect that if you do specify a full parameter set in the update definition (jnstead of a BO instance) it would still need to know how to map the parameters to the properties and since you can't name them identically, perhaps positionally.

    If I am wrong I am happy to learn :-)


Page 1 of 1 (6 items)