Could not find a property named in ASP.NET 2.0

B

Bart

Hi,
I get this exepction

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

when i try to update a detailgrid or form.
The detail grid is bound to an objectdatasource control
 
K

Kevin Yu [MSFT]

Hi,

Based on the error message, are you updating an ObjectDataSource object to
tthe data source? is there a property named 'COM_NAME' in the object? Are
you doing some COM interop in your code?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
B

Bart

Hi Kevin,

The objectdatasource is indeed updating the database.
There is a COM_NAME field(I have it also on other objectdatasource's)
The object datasource is calling a webservice proxy generated via WSE 3.0
When I call the proxy via a winforms client I don't have any problem
updating the data.

Thanks
Bart
 
S

Steven Cheng[MSFT]

Thanks for your response Bart,

So do you mean that the "COM_NAME" is a normal public field rather than a
property in your objectdatasoure or the configured dataobject class? If
so, based on my understanding, those datacontrol which define some XXXField
property use reflection to dynamically query the member (of that field
name) in the class, and it only support querying Properties rather than
field, so if you're using field, I'd suggest you try changing it to
property instead.... In addition, if convenient, you can also create a
simplified example of the datasource object you used to us so that we can
have a more detailed view on it...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| Thread-Topic: Could not find a property named in ASP.NET 2.0
| thread-index: AcX+eBleQO149wnMTKijUodQdPdPVw==
| X-WBNR-Posting-Host: 84.195.200.73
| From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: Could not find a property named in ASP.NET 2.0
| Date: Sun, 11 Dec 2005 09:27:02 -0800
| Lines: 25
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridcontrol:14890
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
|
| Hi Kevin,
|
| The objectdatasource is indeed updating the database.
| There is a COM_NAME field(I have it also on other objectdatasource's)
| The object datasource is calling a webservice proxy generated via WSE 3.0
| When I call the proxy via a winforms client I don't have any problem
| updating the data.
|
| Thanks
| Bart
|
| "Kevin Yu [MSFT]" wrote:
|
| > Hi,
| >
| > Based on the error message, are you updating an ObjectDataSource object
to
| > tthe data source? is there a property named 'COM_NAME' in the object?
Are
| > you doing some COM interop in your code?
| >
| > Kevin Yu
| > =======
| > "This posting is provided "AS IS" with no warranties, and confers no
| > rights."
| >
| >
|
 
B

Bart

Hi Steven,

below you see my code snipped of the asp.net 2.0 form:

<asp:FormView ID="FormView1" runat="server" BackColor="LightGoldenrodYellow"
BorderColor="Tan"
BorderWidth="1px" CellPadding="2" DataKeyNames="COM_ID"
DataSourceID="ObjectDataSource1"
ForeColor="Black" Width="300px"
meta:resourcekey="FormView1Resource1">
<EditItemTemplate>
<table style="width: 220px">
<tr>
<asp:TextBox ID="COM_NAMETextBox" runat="server"
Text='<%# Bind("COM_NAME") %>'
meta:resourcekey="COM_NAMETextBoxResource1"></asp:TextBox></td>
......
</asp:FormView>


ObjectDataSource1 code snipped:

<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DataObjectTypeName="YCommDataSet+COMPANYDataTable"
SelectMethod="GetCompany" TypeName="BusinessProxy"
UpdateMethod="SaveCompany"></asp:ObjectDataSource>

This is the property COM_NAME generated by the WSE 3.0 tool wsewsdl3.exe:
public string COM_NAME {
get {
return ((string)(this[this.tableCOMPANY.COM_NAMEColumn]));
}
set {
this[this.tableCOMPANY.COM_NAMEColumn] = value;
}
}

Steven Cheng said:
Thanks for your response Bart,

So do you mean that the "COM_NAME" is a normal public field rather than a
property in your objectdatasoure or the configured dataobject class? If
so, based on my understanding, those datacontrol which define some XXXField
property use reflection to dynamically query the member (of that field
name) in the class, and it only support querying Properties rather than
field, so if you're using field, I'd suggest you try changing it to
property instead.... In addition, if convenient, you can also create a
simplified example of the datasource object you used to us so that we can
have a more detailed view on it...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| Thread-Topic: Could not find a property named in ASP.NET 2.0
| thread-index: AcX+eBleQO149wnMTKijUodQdPdPVw==
| X-WBNR-Posting-Host: 84.195.200.73
| From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: Could not find a property named in ASP.NET 2.0
| Date: Sun, 11 Dec 2005 09:27:02 -0800
| Lines: 25
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridcontrol:14890
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
|
| Hi Kevin,
|
| The objectdatasource is indeed updating the database.
| There is a COM_NAME field(I have it also on other objectdatasource's)
| The object datasource is calling a webservice proxy generated via WSE 3.0
| When I call the proxy via a winforms client I don't have any problem
| updating the data.
|
| Thanks
| Bart
|
| "Kevin Yu [MSFT]" wrote:
|
| > Hi,
| >
| > Based on the error message, are you updating an ObjectDataSource object
to
| > tthe data source? is there a property named 'COM_NAME' in the object?
Are
| > you doing some COM interop in your code?
| >
| > Kevin Yu
| > =======
| > "This posting is provided "AS IS" with no warranties, and confers no
| > rights."
| >
| >
|
 
S

Steven Cheng[MSFT]

Hi Bart,

Thanks for the followup.
Seems a bit strange. Would you try just creating a list (Array) of the
objects returned by "GetCompany" method, and directly bind the list to the
GridView control so see whether it can display well? Or If possible you can
simplified the WSDL document and paste to me
so that I can create a proxy class locally and test it ....

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: Could not find a property named in ASP.NET 2.0
| thread-index: AcX/GZatTL6SAATwQCaZkYNQJCiLmg==
| X-WBNR-Posting-Host: 84.195.200.73
| From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| Subject: RE: Could not find a property named in ASP.NET 2.0
| Date: Mon, 12 Dec 2005 04:43:01 -0800
| Lines: 118
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridcontrol:14893
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
|
| Hi Steven,
|
| below you see my code snipped of the asp.net 2.0 form:
|
| <asp:FormView ID="FormView1" runat="server"
BackColor="LightGoldenrodYellow"
| BorderColor="Tan"
| BorderWidth="1px" CellPadding="2"
DataKeyNames="COM_ID"
| DataSourceID="ObjectDataSource1"
| ForeColor="Black" Width="300px"
| meta:resourcekey="FormView1Resource1">
| <EditItemTemplate>
| <table style="width: 220px">
| <tr>
| <asp:TextBox ID="COM_NAMETextBox" runat="server"
| Text='<%# Bind("COM_NAME") %>'
| meta:resourcekey="COM_NAMETextBoxResource1"></asp:TextBox></td>
| .....
| </asp:FormView>
|
|
| ObjectDataSource1 code snipped:
|
| <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| DataObjectTypeName="YCommDataSet+COMPANYDataTable"
| SelectMethod="GetCompany" TypeName="BusinessProxy"
| UpdateMethod="SaveCompany"></asp:ObjectDataSource>
|
| This is the property COM_NAME generated by the WSE 3.0 tool wsewsdl3.exe:
| public string COM_NAME {
| get {
| return ((string)(this[this.tableCOMPANY.COM_NAMEColumn]));
| }
| set {
| this[this.tableCOMPANY.COM_NAMEColumn] = value;
| }
| }
|
| "Steven Cheng[MSFT]" wrote:
|
| > Thanks for your response Bart,
| >
| > So do you mean that the "COM_NAME" is a normal public field rather than
a
| > property in your objectdatasoure or the configured dataobject class?
If
| > so, based on my understanding, those datacontrol which define some
XXXField
| > property use reflection to dynamically query the member (of that field
| > name) in the class, and it only support querying Properties rather than
| > field, so if you're using field, I'd suggest you try changing it to
| > property instead.... In addition, if convenient, you can also create
a
| > simplified example of the datasource object you used to us so that we
can
| > have a more detailed view on it...
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| > --------------------
| > | Thread-Topic: Could not find a property named in ASP.NET 2.0
| > | thread-index: AcX+eBleQO149wnMTKijUodQdPdPVw==
| > | X-WBNR-Posting-Host: 84.195.200.73
| > | From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| > | References: <[email protected]>
| > <[email protected]>
| > | Subject: RE: Could not find a property named in ASP.NET 2.0
| > | Date: Sun, 11 Dec 2005 09:27:02 -0800
| > | Lines: 25
| > | Message-ID: <[email protected]>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14890
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > |
| > | Hi Kevin,
| > |
| > | The objectdatasource is indeed updating the database.
| > | There is a COM_NAME field(I have it also on other objectdatasource's)
| > | The object datasource is calling a webservice proxy generated via WSE
3.0
| > | When I call the proxy via a winforms client I don't have any problem
| > | updating the data.
| > |
| > | Thanks
| > | Bart
| > |
| > | "Kevin Yu [MSFT]" wrote:
| > |
| > | > Hi,
| > | >
| > | > Based on the error message, are you updating an ObjectDataSource
object
| > to
| > | > tthe data source? is there a property named 'COM_NAME' in the
object?
| > Are
| > | > you doing some COM interop in your code?
| > | >
| > | > Kevin Yu
| > | > =======
| > | > "This posting is provided "AS IS" with no warranties, and confers
no
| > | > rights."
| > | >
| > | >
| > |
| >
| >
|
 
B

Bart

Hi Steven, showing the data is no problem. The GetCompany funtion works fine.
It is the update that isn't working and producing this error.

Can I send you the proxy class by email?

Thanks
Bart

Steven Cheng said:
Hi Bart,

Thanks for the followup.
Seems a bit strange. Would you try just creating a list (Array) of the
objects returned by "GetCompany" method, and directly bind the list to the
GridView control so see whether it can display well? Or If possible you can
simplified the WSDL document and paste to me
so that I can create a proxy class locally and test it ....

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: Could not find a property named in ASP.NET 2.0
| thread-index: AcX/GZatTL6SAATwQCaZkYNQJCiLmg==
| X-WBNR-Posting-Host: 84.195.200.73
| From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| Subject: RE: Could not find a property named in ASP.NET 2.0
| Date: Mon, 12 Dec 2005 04:43:01 -0800
| Lines: 118
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridcontrol:14893
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
|
| Hi Steven,
|
| below you see my code snipped of the asp.net 2.0 form:
|
| <asp:FormView ID="FormView1" runat="server"
BackColor="LightGoldenrodYellow"
| BorderColor="Tan"
| BorderWidth="1px" CellPadding="2"
DataKeyNames="COM_ID"
| DataSourceID="ObjectDataSource1"
| ForeColor="Black" Width="300px"
| meta:resourcekey="FormView1Resource1">
| <EditItemTemplate>
| <table style="width: 220px">
| <tr>
| <asp:TextBox ID="COM_NAMETextBox" runat="server"
| Text='<%# Bind("COM_NAME") %>'
| meta:resourcekey="COM_NAMETextBoxResource1"></asp:TextBox></td>
| .....
| </asp:FormView>
|
|
| ObjectDataSource1 code snipped:
|
| <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| DataObjectTypeName="YCommDataSet+COMPANYDataTable"
| SelectMethod="GetCompany" TypeName="BusinessProxy"
| UpdateMethod="SaveCompany"></asp:ObjectDataSource>
|
| This is the property COM_NAME generated by the WSE 3.0 tool wsewsdl3.exe:
| public string COM_NAME {
| get {
| return ((string)(this[this.tableCOMPANY.COM_NAMEColumn]));
| }
| set {
| this[this.tableCOMPANY.COM_NAMEColumn] = value;
| }
| }
|
| "Steven Cheng[MSFT]" wrote:
|
| > Thanks for your response Bart,
| >
| > So do you mean that the "COM_NAME" is a normal public field rather than
a
| > property in your objectdatasoure or the configured dataobject class?
If
| > so, based on my understanding, those datacontrol which define some
XXXField
| > property use reflection to dynamically query the member (of that field
| > name) in the class, and it only support querying Properties rather than
| > field, so if you're using field, I'd suggest you try changing it to
| > property instead.... In addition, if convenient, you can also create
a
| > simplified example of the datasource object you used to us so that we
can
| > have a more detailed view on it...
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| > --------------------
| > | Thread-Topic: Could not find a property named in ASP.NET 2.0
| > | thread-index: AcX+eBleQO149wnMTKijUodQdPdPVw==
| > | X-WBNR-Posting-Host: 84.195.200.73
| > | From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| > | References: <[email protected]>
| > <[email protected]>
| > | Subject: RE: Could not find a property named in ASP.NET 2.0
| > | Date: Sun, 11 Dec 2005 09:27:02 -0800
| > | Lines: 25
| > | Message-ID: <[email protected]>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14890
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > |
| > | Hi Kevin,
| > |
| > | The objectdatasource is indeed updating the database.
| > | There is a COM_NAME field(I have it also on other objectdatasource's)
| > | The object datasource is calling a webservice proxy generated via WSE
3.0
| > | When I call the proxy via a winforms client I don't have any problem
| > | updating the data.
| > |
| > | Thanks
| > | Bart
| > |
| > | "Kevin Yu [MSFT]" wrote:
| > |
| > | > Hi,
| > | >
| > | > Based on the error message, are you updating an ObjectDataSource
object
| > to
| > | > tthe data source? is there a property named 'COM_NAME' in the
object?
| > Are
| > | > you doing some COM interop in your code?
| > | >
| > | > Kevin Yu
| > | > =======
| > | > "This posting is provided "AS IS" with no warranties, and confers
no
| > | > rights."
| > | >
| > | >
| > |
| >
| >
|
 
S

Steven Cheng[MSFT]

Thanks for your response.

Sorry that I missed the point that the error occur when you updating it....
well, you can send me that file through the email in my signature(remove
the "online" in it...), You can also attach a simplifed asp.net page code
so that I can also have a look...

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)





--------------------
| Thread-Topic: Could not find a property named in ASP.NET 2.0
| thread-index: AcX/zfE3tV4zlNrvSh6S4Un3I6NUjA==
| X-WBNR-Posting-Host: 84.195.200.73
| From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| Subject: RE: Could not find a property named in ASP.NET 2.0
| Date: Tue, 13 Dec 2005 02:14:03 -0800
| Lines: 189
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridcontrol:14902
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
|
| Hi Steven, showing the data is no problem. The GetCompany funtion works
fine.
| It is the update that isn't working and producing this error.
|
| Can I send you the proxy class by email?
|
| Thanks
| Bart
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Bart,
| >
| > Thanks for the followup.
| > Seems a bit strange. Would you try just creating a list (Array) of the
| > objects returned by "GetCompany" method, and directly bind the list to
the
| > GridView control so see whether it can display well? Or If possible you
can
| > simplified the WSDL document and paste to me
| > so that I can create a proxy class locally and test it ....
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| > --------------------
| > | Thread-Topic: Could not find a property named in ASP.NET 2.0
| > | thread-index: AcX/GZatTL6SAATwQCaZkYNQJCiLmg==
| > | X-WBNR-Posting-Host: 84.195.200.73
| > | From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| > | References: <[email protected]>
| > <[email protected]>
| > <[email protected]>
| > <[email protected]>
| > | Subject: RE: Could not find a property named in ASP.NET 2.0
| > | Date: Mon, 12 Dec 2005 04:43:01 -0800
| > | Lines: 118
| > | Message-ID: <[email protected]>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14893
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > |
| > | Hi Steven,
| > |
| > | below you see my code snipped of the asp.net 2.0 form:
| > |
| > | <asp:FormView ID="FormView1" runat="server"
| > BackColor="LightGoldenrodYellow"
| > | BorderColor="Tan"
| > | BorderWidth="1px" CellPadding="2"
| > DataKeyNames="COM_ID"
| > | DataSourceID="ObjectDataSource1"
| > | ForeColor="Black" Width="300px"
| > | meta:resourcekey="FormView1Resource1">
| > | <EditItemTemplate>
| > | <table style="width: 220px">
| > | <tr>
| > | <asp:TextBox ID="COM_NAMETextBox"
runat="server"
| > | Text='<%# Bind("COM_NAME") %>'
| > | meta:resourcekey="COM_NAMETextBoxResource1"></asp:TextBox></td>
| > | .....
| > | </asp:FormView>
| > |
| > |
| > | ObjectDataSource1 code snipped:
| > |
| > | <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| > | DataObjectTypeName="YCommDataSet+COMPANYDataTable"
| > | SelectMethod="GetCompany" TypeName="BusinessProxy"
| > | UpdateMethod="SaveCompany"></asp:ObjectDataSource>
| > |
| > | This is the property COM_NAME generated by the WSE 3.0 tool
wsewsdl3.exe:
| > | public string COM_NAME {
| > | get {
| > | return
((string)(this[this.tableCOMPANY.COM_NAMEColumn]));
| > | }
| > | set {
| > | this[this.tableCOMPANY.COM_NAMEColumn] = value;
| > | }
| > | }
| > |
| > | "Steven Cheng[MSFT]" wrote:
| > |
| > | > Thanks for your response Bart,
| > | >
| > | > So do you mean that the "COM_NAME" is a normal public field rather
than
| > a
| > | > property in your objectdatasoure or the configured dataobject
class?
| > If
| > | > so, based on my understanding, those datacontrol which define some
| > XXXField
| > | > property use reflection to dynamically query the member (of that
field
| > | > name) in the class, and it only support querying Properties rather
than
| > | > field, so if you're using field, I'd suggest you try changing it to
| > | > property instead.... In addition, if convenient, you can also
create
| > a
| > | > simplified example of the datasource object you used to us so that
we
| > can
| > | > have a more detailed view on it...
| > | >
| > | > Thanks,
| > | >
| > | > Steven Cheng
| > | > Microsoft Online Support
| > | >
| > | > Get Secure! www.microsoft.com/security
| > | > (This posting is provided "AS IS", with no warranties, and confers
no
| > | > rights.)
| > | >
| > | >
| > | > --------------------
| > | > | Thread-Topic: Could not find a property named in ASP.NET 2.0
| > | > | thread-index: AcX+eBleQO149wnMTKijUodQdPdPVw==
| > | > | X-WBNR-Posting-Host: 84.195.200.73
| > | > | From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| > | > | References: <[email protected]>
| > | > <[email protected]>
| > | > | Subject: RE: Could not find a property named in ASP.NET 2.0
| > | > | Date: Sun, 11 Dec 2005 09:27:02 -0800
| > | > | Lines: 25
| > | > | Message-ID: <[email protected]>
| > | > | MIME-Version: 1.0
| > | > | Content-Type: text/plain;
| > | > | charset="Utf-8"
| > | > | Content-Transfer-Encoding: 7bit
| > | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > | Content-Class: urn:content-classes:message
| > | > | Importance: normal
| > | > | Priority: normal
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > | Newsgroups:
microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | > | Xref: TK2MSFTNGXA02.phx.gbl
| > | > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14890
| > | > | X-Tomcat-NG:
microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | > |
| > | > | Hi Kevin,
| > | > |
| > | > | The objectdatasource is indeed updating the database.
| > | > | There is a COM_NAME field(I have it also on other
objectdatasource's)
| > | > | The object datasource is calling a webservice proxy generated via
WSE
| > 3.0
| > | > | When I call the proxy via a winforms client I don't have any
problem
| > | > | updating the data.
| > | > |
| > | > | Thanks
| > | > | Bart
| > | > |
| > | > | "Kevin Yu [MSFT]" wrote:
| > | > |
| > | > | > Hi,
| > | > | >
| > | > | > Based on the error message, are you updating an
ObjectDataSource
| > object
| > | > to
| > | > | > tthe data source? is there a property named 'COM_NAME' in the
| > object?
| > | > Are
| > | > | > you doing some COM interop in your code?
| > | > | >
| > | > | > Kevin Yu
| > | > | > =======
| > | > | > "This posting is provided "AS IS" with no warranties, and
confers
| > no
| > | > | > rights."
| > | > | >
| > | > | >
| > | > |
| > | >
| > | >
| > |
| >
| >
|
 
S

Steven Cheng[MSFT]

Hi Bart,

I've had a look into the code you sent me. And I think the problem is the
currently updating model you're using. As for the ASP.NET template
databound controls (GridView, DetailsView......). They can be bound to a
List of data (like DataTable, Array, DataView....). However, when
performing updating or deleting, only single Row(Record) can be passed from
DataBound control to DataSource control, so your the "UpdateMethod" of
your BusinessObject defined in the ObjectDataSource must be a function
which accept a single record object (a DataRow, a object class) rather than
a DataTable or typedDataTAble.....

e.g... we should define a method like:

BusinessProxy.UpdateCompanyTableRow(CompanyTableRow row)

which accept a class instance which has the property that mapped to the
fields in the databound control( GridView or DetailsView...)

rather than BusinessProxy.SaveCompany(CompanyDataTable)

Thus, we can get why the original page always report "can not found
property .... error ", yes? Because it try find a "COM_NAME" field on the
CompanyTable instance which is surely impossible....

If there anything unclear, please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 179263170
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Wed, 14 Dec 2005 08:49:24 GMT
| Subject: RE: Could not find a property named in ASP.NET 2.0
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| Lines: 233
| Path: TK2MSFTNGXA02.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridcontrol:14907
| NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
|
| Thanks for your response.
|
| Sorry that I missed the point that the error occur when you updating
it....
| well, you can send me that file through the email in my signature(remove
| the "online" in it...), You can also attach a simplifed asp.net page code
| so that I can also have a look...
|
| Regards,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
|
|
|
| --------------------
| | Thread-Topic: Could not find a property named in ASP.NET 2.0
| | thread-index: AcX/zfE3tV4zlNrvSh6S4Un3I6NUjA==
| | X-WBNR-Posting-Host: 84.195.200.73
| | From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| | References: <[email protected]>
| <[email protected]>
| <[email protected]>
| <[email protected]>
| <[email protected]>
| <[email protected]>
| | Subject: RE: Could not find a property named in ASP.NET 2.0
| | Date: Tue, 13 Dec 2005 02:14:03 -0800
| | Lines: 189
| | Message-ID: <[email protected]>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="Utf-8"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | Content-Class: urn:content-classes:message
| | Importance: normal
| | Priority: normal
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | Xref: TK2MSFTNGXA02.phx.gbl
| microsoft.public.dotnet.framework.aspnet.datagridcontrol:14902
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| |
| | Hi Steven, showing the data is no problem. The GetCompany funtion works
| fine.
| | It is the update that isn't working and producing this error.
| |
| | Can I send you the proxy class by email?
| |
| | Thanks
| | Bart
| |
| | "Steven Cheng[MSFT]" wrote:
| |
| | > Hi Bart,
| | >
| | > Thanks for the followup.
| | > Seems a bit strange. Would you try just creating a list (Array) of
the
| | > objects returned by "GetCompany" method, and directly bind the list
to
| the
| | > GridView control so see whether it can display well? Or If possible
you
| can
| | > simplified the WSDL document and paste to me
| | > so that I can create a proxy class locally and test it ....
| | >
| | > Thanks,
| | >
| | > Steven Cheng
| | > Microsoft Online Support
| | >
| | > Get Secure! www.microsoft.com/security
| | > (This posting is provided "AS IS", with no warranties, and confers no
| | > rights.)
| | >
| | > --------------------
| | > | Thread-Topic: Could not find a property named in ASP.NET 2.0
| | > | thread-index: AcX/GZatTL6SAATwQCaZkYNQJCiLmg==
| | > | X-WBNR-Posting-Host: 84.195.200.73
| | > | From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| | > | References: <[email protected]>
| | > <[email protected]>
| | > <[email protected]>
| | > <[email protected]>
| | > | Subject: RE: Could not find a property named in ASP.NET 2.0
| | > | Date: Mon, 12 Dec 2005 04:43:01 -0800
| | > | Lines: 118
| | > | Message-ID: <[email protected]>
| | > | MIME-Version: 1.0
| | > | Content-Type: text/plain;
| | > | charset="Utf-8"
| | > | Content-Transfer-Encoding: 7bit
| | > | X-Newsreader: Microsoft CDO for Windows 2000
| | > | Content-Class: urn:content-classes:message
| | > | Importance: normal
| | > | Priority: normal
| | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | > | Path:
| TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | > | Xref: TK2MSFTNGXA02.phx.gbl
| | > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14893
| | > | X-Tomcat-NG:
microsoft.public.dotnet.framework.aspnet.datagridcontrol
| | > |
| | > | Hi Steven,
| | > |
| | > | below you see my code snipped of the asp.net 2.0 form:
| | > |
| | > | <asp:FormView ID="FormView1" runat="server"
| | > BackColor="LightGoldenrodYellow"
| | > | BorderColor="Tan"
| | > | BorderWidth="1px" CellPadding="2"
| | > DataKeyNames="COM_ID"
| | > | DataSourceID="ObjectDataSource1"
| | > | ForeColor="Black" Width="300px"
| | > | meta:resourcekey="FormView1Resource1">
| | > | <EditItemTemplate>
| | > | <table style="width: 220px">
| | > | <tr>
| | > | <asp:TextBox ID="COM_NAMETextBox"
| runat="server"
| | > | Text='<%# Bind("COM_NAME") %>'
| | > | meta:resourcekey="COM_NAMETextBoxResource1"></asp:TextBox></td>
| | > | .....
| | > | </asp:FormView>
| | > |
| | > |
| | > | ObjectDataSource1 code snipped:
| | > |
| | > | <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| | > | DataObjectTypeName="YCommDataSet+COMPANYDataTable"
| | > | SelectMethod="GetCompany" TypeName="BusinessProxy"
| | > | UpdateMethod="SaveCompany"></asp:ObjectDataSource>
| | > |
| | > | This is the property COM_NAME generated by the WSE 3.0 tool
| wsewsdl3.exe:
| | > | public string COM_NAME {
| | > | get {
| | > | return
| ((string)(this[this.tableCOMPANY.COM_NAMEColumn]));
| | > | }
| | > | set {
| | > | this[this.tableCOMPANY.COM_NAMEColumn] = value;
| | > | }
| | > | }
| | > |
| | > | "Steven Cheng[MSFT]" wrote:
| | > |
| | > | > Thanks for your response Bart,
| | > | >
| | > | > So do you mean that the "COM_NAME" is a normal public field
rather
| than
| | > a
| | > | > property in your objectdatasoure or the configured dataobject
| class?
| | > If
| | > | > so, based on my understanding, those datacontrol which define
some
| | > XXXField
| | > | > property use reflection to dynamically query the member (of that
| field
| | > | > name) in the class, and it only support querying Properties
rather
| than
| | > | > field, so if you're using field, I'd suggest you try changing it
to
| | > | > property instead.... In addition, if convenient, you can also
| create
| | > a
| | > | > simplified example of the datasource object you used to us so
that
| we
| | > can
| | > | > have a more detailed view on it...
| | > | >
| | > | > Thanks,
| | > | >
| | > | > Steven Cheng
| | > | > Microsoft Online Support
| | > | >
| | > | > Get Secure! www.microsoft.com/security
| | > | > (This posting is provided "AS IS", with no warranties, and
confers
| no
| | > | > rights.)
| | > | >
| | > | >
| | > | > --------------------
| | > | > | Thread-Topic: Could not find a property named in ASP.NET 2.0
| | > | > | thread-index: AcX+eBleQO149wnMTKijUodQdPdPVw==
| | > | > | X-WBNR-Posting-Host: 84.195.200.73
| | > | > | From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| | > | > | References:
<[email protected]>
| | > | > <[email protected]>
| | > | > | Subject: RE: Could not find a property named in ASP.NET 2.0
| | > | > | Date: Sun, 11 Dec 2005 09:27:02 -0800
| | > | > | Lines: 25
| | > | > | Message-ID: <[email protected]>
| | > | > | MIME-Version: 1.0
| | > | > | Content-Type: text/plain;
| | > | > | charset="Utf-8"
| | > | > | Content-Transfer-Encoding: 7bit
| | > | > | X-Newsreader: Microsoft CDO for Windows 2000
| | > | > | Content-Class: urn:content-classes:message
| | > | > | Importance: normal
| | > | > | Priority: normal
| | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | > | > | Newsgroups:
| microsoft.public.dotnet.framework.aspnet.datagridcontrol
| | > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | > | > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | > | > | Xref: TK2MSFTNGXA02.phx.gbl
| | > | > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14890
| | > | > | X-Tomcat-NG:
| microsoft.public.dotnet.framework.aspnet.datagridcontrol
| | > | > |
| | > | > | Hi Kevin,
| | > | > |
| | > | > | The objectdatasource is indeed updating the database.
| | > | > | There is a COM_NAME field(I have it also on other
| objectdatasource's)
| | > | > | The object datasource is calling a webservice proxy generated
via
| WSE
| | > 3.0
| | > | > | When I call the proxy via a winforms client I don't have any
| problem
| | > | > | updating the data.
| | > | > |
| | > | > | Thanks
| | > | > | Bart
| | > | > |
| | > | > | "Kevin Yu [MSFT]" wrote:
| | > | > |
| | > | > | > Hi,
| | > | > | >
| | > | > | > Based on the error message, are you updating an
| ObjectDataSource
| | > object
| | > | > to
| | > | > | > tthe data source? is there a property named 'COM_NAME' in the
| | > object?
| | > | > Are
| | > | > | > you doing some COM interop in your code?
| | > | > | >
| | > | > | > Kevin Yu
| | > | > | > =======
| | > | > | > "This posting is provided "AS IS" with no warranties, and
| confers
| | > no
| | > | > | > rights."
| | > | > | >
| | > | > | >
| | > | > |
| | > | >
| | > | >
| | > |
| | >
| | >
| |
|
|
 
B

Bart

Hi, Steven,

Thanks for clearing this out.
Now I have the problem that a datarow doesn't have a parameterless contructor.
Does it mean that I have to create a class with a property for each field?
Or is there a way to let the wsewsdl3 tool generate it?

Thanks again

Steven Cheng said:
Hi Bart,

I've had a look into the code you sent me. And I think the problem is the
currently updating model you're using. As for the ASP.NET template
databound controls (GridView, DetailsView......). They can be bound to a
List of data (like DataTable, Array, DataView....). However, when
performing updating or deleting, only single Row(Record) can be passed from
DataBound control to DataSource control, so your the "UpdateMethod" of
your BusinessObject defined in the ObjectDataSource must be a function
which accept a single record object (a DataRow, a object class) rather than
a DataTable or typedDataTAble.....

e.g... we should define a method like:

BusinessProxy.UpdateCompanyTableRow(CompanyTableRow row)

which accept a class instance which has the property that mapped to the
fields in the databound control( GridView or DetailsView...)

rather than BusinessProxy.SaveCompany(CompanyDataTable)

Thus, we can get why the original page always report "can not found
property .... error ", yes? Because it try find a "COM_NAME" field on the
CompanyTable instance which is surely impossible....

If there anything unclear, please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 179263170
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Wed, 14 Dec 2005 08:49:24 GMT
| Subject: RE: Could not find a property named in ASP.NET 2.0
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| Lines: 233
| Path: TK2MSFTNGXA02.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridcontrol:14907
| NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
|
| Thanks for your response.
|
| Sorry that I missed the point that the error occur when you updating
it....
| well, you can send me that file through the email in my signature(remove
| the "online" in it...), You can also attach a simplifed asp.net page code
| so that I can also have a look...
|
| Regards,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
|
|
|
| --------------------
| | Thread-Topic: Could not find a property named in ASP.NET 2.0
| | thread-index: AcX/zfE3tV4zlNrvSh6S4Un3I6NUjA==
| | X-WBNR-Posting-Host: 84.195.200.73
| | From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| | References: <[email protected]>
| <[email protected]>
| <[email protected]>
| <[email protected]>
| <[email protected]>
| <[email protected]>
| | Subject: RE: Could not find a property named in ASP.NET 2.0
| | Date: Tue, 13 Dec 2005 02:14:03 -0800
| | Lines: 189
| | Message-ID: <[email protected]>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="Utf-8"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | Content-Class: urn:content-classes:message
| | Importance: normal
| | Priority: normal
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | Xref: TK2MSFTNGXA02.phx.gbl
| microsoft.public.dotnet.framework.aspnet.datagridcontrol:14902
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| |
| | Hi Steven, showing the data is no problem. The GetCompany funtion works
| fine.
| | It is the update that isn't working and producing this error.
| |
| | Can I send you the proxy class by email?
| |
| | Thanks
| | Bart
| |
| | "Steven Cheng[MSFT]" wrote:
| |
| | > Hi Bart,
| | >
| | > Thanks for the followup.
| | > Seems a bit strange. Would you try just creating a list (Array) of
the
| | > objects returned by "GetCompany" method, and directly bind the list
to
| the
| | > GridView control so see whether it can display well? Or If possible
you
| can
| | > simplified the WSDL document and paste to me
| | > so that I can create a proxy class locally and test it ....
| | >
| | > Thanks,
| | >
| | > Steven Cheng
| | > Microsoft Online Support
| | >
| | > Get Secure! www.microsoft.com/security
| | > (This posting is provided "AS IS", with no warranties, and confers no
| | > rights.)
| | >
| | > --------------------
| | > | Thread-Topic: Could not find a property named in ASP.NET 2.0
| | > | thread-index: AcX/GZatTL6SAATwQCaZkYNQJCiLmg==
| | > | X-WBNR-Posting-Host: 84.195.200.73
| | > | From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| | > | References: <[email protected]>
| | > <[email protected]>
| | > <[email protected]>
| | > <[email protected]>
| | > | Subject: RE: Could not find a property named in ASP.NET 2.0
| | > | Date: Mon, 12 Dec 2005 04:43:01 -0800
| | > | Lines: 118
| | > | Message-ID: <[email protected]>
| | > | MIME-Version: 1.0
| | > | Content-Type: text/plain;
| | > | charset="Utf-8"
| | > | Content-Transfer-Encoding: 7bit
| | > | X-Newsreader: Microsoft CDO for Windows 2000
| | > | Content-Class: urn:content-classes:message
| | > | Importance: normal
| | > | Priority: normal
| | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | > | Path:
| TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | > | Xref: TK2MSFTNGXA02.phx.gbl
| | > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14893
| | > | X-Tomcat-NG:
microsoft.public.dotnet.framework.aspnet.datagridcontrol
| | > |
| | > | Hi Steven,
| | > |
| | > | below you see my code snipped of the asp.net 2.0 form:
| | > |
| | > | <asp:FormView ID="FormView1" runat="server"
| | > BackColor="LightGoldenrodYellow"
| | > | BorderColor="Tan"
| | > | BorderWidth="1px" CellPadding="2"
| | > DataKeyNames="COM_ID"
| | > | DataSourceID="ObjectDataSource1"
| | > | ForeColor="Black" Width="300px"
| | > | meta:resourcekey="FormView1Resource1">
| | > | <EditItemTemplate>
| | > | <table style="width: 220px">
| | > | <tr>
| | > | <asp:TextBox ID="COM_NAMETextBox"
| runat="server"
| | > | Text='<%# Bind("COM_NAME") %>'
| | > | meta:resourcekey="COM_NAMETextBoxResource1"></asp:TextBox></td>
| | > | .....
| | > | </asp:FormView>
| | > |
| | > |
| | > | ObjectDataSource1 code snipped:
| | > |
| | > | <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| | > | DataObjectTypeName="YCommDataSet+COMPANYDataTable"
| | > | SelectMethod="GetCompany" TypeName="BusinessProxy"
| | > | UpdateMethod="SaveCompany"></asp:ObjectDataSource>
| | > |
| | > | This is the property COM_NAME generated by the WSE 3.0 tool
| wsewsdl3.exe:
| | > | public string COM_NAME {
| | > | get {
| | > | return
| ((string)(this[this.tableCOMPANY.COM_NAMEColumn]));
| | > | }
| | > | set {
| | > | this[this.tableCOMPANY.COM_NAMEColumn] = value;
| | > | }
| | > | }
| | > |
| | > | "Steven Cheng[MSFT]" wrote:
| | > |
| | > | > Thanks for your response Bart,
| | > | >
| | > | > So do you mean that the "COM_NAME" is a normal public field
rather
| than
| | > a
| | > | > property in your objectdatasoure or the configured dataobject
| class?
| | > If
| | > | > so, based on my understanding, those datacontrol which define
some
| | > XXXField
| | > | > property use reflection to dynamically query the member (of that
| field
| | > | > name) in the class, and it only support querying Properties
rather
| than
| | > | > field, so if you're using field, I'd suggest you try changing it
to
| | > | > property instead.... In addition, if convenient, you can also
| create
| | > a
| | > | > simplified example of the datasource object you used to us so
that
| we
| | > can
| | > | > have a more detailed view on it...
| | > | >
| | > | > Thanks,
| | > | >
| | > | > Steven Cheng
| | > | > Microsoft Online Support
| | > | >
| | > | > Get Secure! www.microsoft.com/security
| | > | > (This posting is provided "AS IS", with no warranties, and
confers
| no
| | > | > rights.)
| | > | >
| | > | >
| | > | > --------------------
| | > | > | Thread-Topic: Could not find a property named in ASP.NET 2.0
| | > | > | thread-index: AcX+eBleQO149wnMTKijUodQdPdPVw==
| | > | > | X-WBNR-Posting-Host: 84.195.200.73
| | > | > | From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| | > | > | References:
<[email protected]>
| | > | > <[email protected]>
| | > | > | Subject: RE: Could not find a property named in ASP.NET 2.0
| | > | > | Date: Sun, 11 Dec 2005 09:27:02 -0800
| | > | > | Lines: 25
| | > | > | Message-ID: <[email protected]>
| | > | > | MIME-Version: 1.0
| | > | > | Content-Type: text/plain;
| | > | > | charset="Utf-8"
| | > | > | Content-Transfer-Encoding: 7bit
| | > | > | X-Newsreader: Microsoft CDO for Windows 2000
| | > | > | Content-Class: urn:content-classes:message
| | > | > | Importance: normal
| | > | > | Priority: normal
| | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | > | > | Newsgroups:
| microsoft.public.dotnet.framework.aspnet.datagridcontrol
| | > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | > | > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | > | > | Xref: TK2MSFTNGXA02.phx.gbl
| | > | > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14890
| | > | > | X-Tomcat-NG:
| microsoft.public.dotnet.framework.aspnet.datagridcontrol
| | > | > |
| | > | > | Hi Kevin,
| | > | > |
| | > | > | The objectdatasource is indeed updating the database.
| | > | > | There is a COM_NAME field(I have it also on other
| objectdatasource's)
| | > | > | The object datasource is calling a webservice proxy generated
via
| WSE
| | > 3.0
 
S

Steven Cheng[MSFT]

Thanks for your reply Bart,

I think we have to manually do some modification in the generated proxy
classes's code. So far the wsewsdl3.exe will only help generate a normal
standard proxy class and there has few options for defining the detailed
class's code style, etc.....
Also, as for ObjectDataSource, it dosn't matter where the class come or how
does it get generated, but require it to meet the requirements (like the
default constructor needed....).

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| Thread-Topic: Could not find a property named in ASP.NET 2.0
| thread-index: AcYCUfO8K4g8SnV9SUqH85mUFewgLA==
| X-WBNR-Posting-Host: 84.195.200.73
| From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| Subject: RE: Could not find a property named in ASP.NET 2.0
| Date: Fri, 16 Dec 2005 07:04:03 -0800
| Lines: 311
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridcontrol:14928
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
|
| Hi, Steven,
|
| Thanks for clearing this out.
| Now I have the problem that a datarow doesn't have a parameterless
contructor.
| Does it mean that I have to create a class with a property for each field?
| Or is there a way to let the wsewsdl3 tool generate it?
|
| Thanks again
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Bart,
| >
| > I've had a look into the code you sent me. And I think the problem is
the
| > currently updating model you're using. As for the ASP.NET template
| > databound controls (GridView, DetailsView......). They can be bound to
a
| > List of data (like DataTable, Array, DataView....). However, when
| > performing updating or deleting, only single Row(Record) can be passed
from
| > DataBound control to DataSource control, so your the "UpdateMethod" of
| > your BusinessObject defined in the ObjectDataSource must be a function
| > which accept a single record object (a DataRow, a object class) rather
than
| > a DataTable or typedDataTAble.....
| >
| > e.g... we should define a method like:
| >
| > BusinessProxy.UpdateCompanyTableRow(CompanyTableRow row)
| >
| > which accept a class instance which has the property that mapped to the
| > fields in the databound control( GridView or DetailsView...)
| >
| > rather than BusinessProxy.SaveCompany(CompanyDataTable)
| >
| > Thus, we can get why the original page always report "can not found
| > property .... error ", yes? Because it try find a "COM_NAME" field on
the
| > CompanyTable instance which is surely impossible....
| >
| > If there anything unclear, please feel free to post here.
| >
| > Regards,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | X-Tomcat-ID: 179263170
| > | References: <[email protected]>
| > <[email protected]>
| > <[email protected]>
| > <[email protected]>
| > <[email protected]>
| > <[email protected]>
| > <[email protected]>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain
| > | Content-Transfer-Encoding: 7bit
| > | From: (e-mail address removed) (Steven Cheng[MSFT])
| > | Organization: Microsoft
| > | Date: Wed, 14 Dec 2005 08:49:24 GMT
| > | Subject: RE: Could not find a property named in ASP.NET 2.0
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | Message-ID: <[email protected]>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | Lines: 233
| > | Path: TK2MSFTNGXA02.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14907
| > | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
| > |
| > | Thanks for your response.
| > |
| > | Sorry that I missed the point that the error occur when you updating
| > it....
| > | well, you can send me that file through the email in my
signature(remove
| > | the "online" in it...), You can also attach a simplifed asp.net page
code
| > | so that I can also have a look...
| > |
| > | Regards,
| > |
| > | Steven Cheng
| > | Microsoft Online Support
| > |
| > | Get Secure! www.microsoft.com/security
| > | (This posting is provided "AS IS", with no warranties, and confers no
| > | rights.)
| > |
| > |
| > |
| > |
| > |
| > | --------------------
| > | | Thread-Topic: Could not find a property named in ASP.NET 2.0
| > | | thread-index: AcX/zfE3tV4zlNrvSh6S4Un3I6NUjA==
| > | | X-WBNR-Posting-Host: 84.195.200.73
| > | | From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| > | | References: <[email protected]>
| > | <[email protected]>
| > | <[email protected]>
| > | <[email protected]>
| > | <[email protected]>
| > | <[email protected]>
| > | | Subject: RE: Could not find a property named in ASP.NET 2.0
| > | | Date: Tue, 13 Dec 2005 02:14:03 -0800
| > | | Lines: 189
| > | | Message-ID: <[email protected]>
| > | | MIME-Version: 1.0
| > | | Content-Type: text/plain;
| > | | charset="Utf-8"
| > | | Content-Transfer-Encoding: 7bit
| > | | X-Newsreader: Microsoft CDO for Windows 2000
| > | | Content-Class: urn:content-classes:message
| > | | Importance: normal
| > | | Priority: normal
| > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | | Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | | Xref: TK2MSFTNGXA02.phx.gbl
| > | microsoft.public.dotnet.framework.aspnet.datagridcontrol:14902
| > | | X-Tomcat-NG:
microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | |
| > | | Hi Steven, showing the data is no problem. The GetCompany funtion
works
| > | fine.
| > | | It is the update that isn't working and producing this error.
| > | |
| > | | Can I send you the proxy class by email?
| > | |
| > | | Thanks
| > | | Bart
| > | |
| > | | "Steven Cheng[MSFT]" wrote:
| > | |
| > | | > Hi Bart,
| > | | >
| > | | > Thanks for the followup.
| > | | > Seems a bit strange. Would you try just creating a list (Array)
of
| > the
| > | | > objects returned by "GetCompany" method, and directly bind the
list
| > to
| > | the
| > | | > GridView control so see whether it can display well? Or If
possible
| > you
| > | can
| > | | > simplified the WSDL document and paste to me
| > | | > so that I can create a proxy class locally and test it ....
| > | | >
| > | | > Thanks,
| > | | >
| > | | > Steven Cheng
| > | | > Microsoft Online Support
| > | | >
| > | | > Get Secure! www.microsoft.com/security
| > | | > (This posting is provided "AS IS", with no warranties, and
confers no
| > | | > rights.)
| > | | >
| > | | > --------------------
| > | | > | Thread-Topic: Could not find a property named in ASP.NET 2.0
| > | | > | thread-index: AcX/GZatTL6SAATwQCaZkYNQJCiLmg==
| > | | > | X-WBNR-Posting-Host: 84.195.200.73
| > | | > | From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| > | | > | References:
<[email protected]>
| > | | > <[email protected]>
| > | | > <[email protected]>
| > | | > <[email protected]>
| > | | > | Subject: RE: Could not find a property named in ASP.NET 2.0
| > | | > | Date: Mon, 12 Dec 2005 04:43:01 -0800
| > | | > | Lines: 118
| > | | > | Message-ID: <[email protected]>
| > | | > | MIME-Version: 1.0
| > | | > | Content-Type: text/plain;
| > | | > | charset="Utf-8"
| > | | > | Content-Transfer-Encoding: 7bit
| > | | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | | > | Content-Class: urn:content-classes:message
| > | | > | Importance: normal
| > | | > | Priority: normal
| > | | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | | > | Newsgroups:
microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | | > | Path:
| > | TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | | > | Xref: TK2MSFTNGXA02.phx.gbl
| > | | > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14893
| > | | > | X-Tomcat-NG:
| > microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | | > |
| > | | > | Hi Steven,
| > | | > |
| > | | > | below you see my code snipped of the asp.net 2.0 form:
| > | | > |
| > | | > | <asp:FormView ID="FormView1" runat="server"
| > | | > BackColor="LightGoldenrodYellow"
| > | | > | BorderColor="Tan"
| > | | > | BorderWidth="1px" CellPadding="2"
| > | | > DataKeyNames="COM_ID"
| > | | > | DataSourceID="ObjectDataSource1"
| > | | > | ForeColor="Black" Width="300px"
| > | | > | meta:resourcekey="FormView1Resource1">
| > | | > | <EditItemTemplate>
| > | | > | <table style="width: 220px">
| > | | > | <tr>
| > | | > | <asp:TextBox ID="COM_NAMETextBox"
| > | runat="server"
| > | | > | Text='<%# Bind("COM_NAME") %>'
| > | | > | meta:resourcekey="COM_NAMETextBoxResource1"></asp:TextBox></td>
| > | | > | .....
| > | | > | </asp:FormView>
| > | | > |
| > | | > |
| > | | > | ObjectDataSource1 code snipped:
| > | | > |
| > | | > | <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| > | | > | DataObjectTypeName="YCommDataSet+COMPANYDataTable"
| > | | > | SelectMethod="GetCompany" TypeName="BusinessProxy"
| > | | > | UpdateMethod="SaveCompany"></asp:ObjectDataSource>
| > | | > |
| > | | > | This is the property COM_NAME generated by the WSE 3.0 tool
| > | wsewsdl3.exe:
| > | | > | public string COM_NAME {
| > | | > | get {
| > | | > | return
| > | ((string)(this[this.tableCOMPANY.COM_NAMEColumn]));
| > | | > | }
| > | | > | set {
| > | | > | this[this.tableCOMPANY.COM_NAMEColumn] = value;
| > | | > | }
| > | | > | }
| > | | > |
| > | | > | "Steven Cheng[MSFT]" wrote:
| > | | > |
| > | | > | > Thanks for your response Bart,
| > | | > | >
| > | | > | > So do you mean that the "COM_NAME" is a normal public field
| > rather
| > | than
| > | | > a
| > | | > | > property in your objectdatasoure or the configured dataobject
| > | class?
| > | | > If
| > | | > | > so, based on my understanding, those datacontrol which define
| > some
| > | | > XXXField
| > | | > | > property use reflection to dynamically query the member (of
that
| > | field
| > | | > | > name) in the class, and it only support querying Properties
| > rather
| > | than
| > | | > | > field, so if you're using field, I'd suggest you try changing
it
| > to
| > | | > | > property instead.... In addition, if convenient, you can
also
| > | create
| > | | > a
| > | | > | > simplified example of the datasource object you used to us so
| > that
| > | we
| > | | > can
| > | | > | > have a more detailed view on it...
| > | | > | >
| > | | > | > Thanks,
| > | | > | >
| > | | > | > Steven Cheng
| > | | > | > Microsoft Online Support
| > | | > | >
| > | | > | > Get Secure! www.microsoft.com/security
| > | | > | > (This posting is provided "AS IS", with no warranties, and
| > confers
| > | no
| > | | > | > rights.)
| > | | > | >
| > | | > | >
| > | | > | > --------------------
| > | | > | > | Thread-Topic: Could not find a property named in ASP.NET 2.0
| > | | > | > | thread-index: AcX+eBleQO149wnMTKijUodQdPdPVw==
| > | | > | > | X-WBNR-Posting-Host: 84.195.200.73
| > | | > | > | From: "=?Utf-8?B?QmFydA==?=" <[email protected]>
| > | | > | > | References:
| > <[email protected]>
| > | | > | > <[email protected]>
| > | | > | > | Subject: RE: Could not find a property named in ASP.NET 2.0
| > | | > | > | Date: Sun, 11 Dec 2005 09:27:02 -0800
| > | | > | > | Lines: 25
| > | | > | > | Message-ID:
<[email protected]>
| > | | > | > | MIME-Version: 1.0
| > | | > | > | Content-Type: text/plain;
| > | | > | > | charset="Utf-8"
| > | | > | > | Content-Transfer-Encoding: 7bit
| > | | > | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | | > | > | Content-Class: urn:content-classes:message
| > | | > | > | Importance: normal
| > | | > | > | Priority: normal
| > | | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | | > | > | Newsgroups:
| > | microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | | > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | | > | > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | | > | > | Xref: TK2MSFTNGXA02.phx.gbl
| > | | > | > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14890
| > | | > | > | X-Tomcat-NG:
| > | microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | | > | > |
| > | | > | > | Hi Kevin,
| > | | > | > |
| > | | > | > | The objectdatasource is indeed updating the database.
| > | | > | > | There is a COM_NAME field(I have it also on other
| > | objectdatasource's)
| > | | > | > | The object datasource is calling a webservice proxy
generated
| > via
| > | WSE
| > | | > 3.0
|
 

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,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top