detailsview,

T

TdarTdar

Why would i get this error:
Could not find a property named 'DBMANTransNumber' on the type specified by
the DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1'.

Here what I am doing, I am using a dataset completly setup by the wizards
under the app_code directory, I do a simple "Select * from ordershiprecord
where ShipKey = @ShipKey" click next, leave fill a datatable, return a
datatable, create methods to send updates directly to the
database(generateDBDirectMethods) all checked, THen click next again, it says
it generated select, update, delete, table mappings, fil method, update
methods...

Then i go to a new web form and drag in a detailsview, choose new datasource,
object, select the "DJP_DataSet1TableAdpters.OrderShipRecordTableAdapter"
that is in the drop down. Click next, look around to see that the

select(GetData(Guid ShipKey), returns OrderShipRecordDataTable)

update(Update(String DBMANTransNumber, Guid UserId, String ShiptoCompany,
String ShiptoName, String ShipToAddress, String ShipToAddress2,
Nullable<Int32> ShipCity, Nullable<Int32> ShipCountry, Nullable<Int32>
ShipState, String ZipCode, Nullable<Boolean> SignatureReq, Guid ShipKey, Guid
Original_ShipKey), returns Int32)

delete(Delete(Guid Original_ShipKey), returns Int32) method is there

Click next
it asks to defind Parameters ... QueryString ... Querystringfield = ShipKey
Click Finish...

Page is created
Select enable editing and save the page

Run the calling page from visual studio...
type in shipkey and call the page
it shows me the records details just fine
so i click Edit to change a value
changed Signaturereq and selected Update.

I get:
---------------------------------------
Could not find a property named 'DBMANTransNumber' on the type specified by
the DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Could not find a
property named 'DBMANTransNumber' on the type specified by the
DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1'.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:


[InvalidOperationException: Could not find a property named
'DBMANTransNumber' on the type specified by the DataObjectTypeName property
in ObjectDataSource 'ObjectDataSource1'.]
System.Web.UI.WebControls.ObjectDataSourceView.BuildDataObject(Type
dataObjectType, IDictionary inputParameters) +380
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteUpdate(IDictionary
keys, IDictionary values, IDictionary oldValues) +1512
System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values,
IDictionary oldValues, DataSourceViewOperationCallback callback) +179
System.Web.UI.WebControls.DetailsView.HandleUpdate(String commandArg,
Boolean causesValidation) +1197
System.Web.UI.WebControls.DetailsView.HandleEvent(EventArgs e, Boolean
causesValidation, String validationGroup) +545
System.Web.UI.WebControls.DetailsView.OnBubbleEvent(Object source,
EventArgs e) +162
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
System.Web.UI.WebControls.DetailsViewRow.OnBubbleEvent(Object source,
EventArgs e) +117
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +106
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument) +175

System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +244
System.Web.UI.
-------------------------------------------


So why when using the wizards would this happen, how do i solve this and
move on....

Tdar
 
S

Steven Cheng[MSFT]

Hi Tdar,

Welcome to ASPNET newsgroup.
From your description, you're using a certain TypedDataset(TableAdapter?)
to return some Data records through datatable and some certain methods for
update and delete. And you configure the Data Access component through
ObjectDataSource , it can display data well, however, when try performing
update operation, there raise some exception indicate that the certain
class lack of certain properties... yes?

Based on my experience, this is likely caused by the the DataAccess
component class's Update method's parameters list dosn't match the
DataBound control's supplied parameters.... As the error message
indicated:
=====================
Could not find a property named 'DBMANTransNumber' on the type specified by
the DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1'.
=====================

So you can check the update parameters in the DataBound control (or you can
use the Updating event to printout all the supplief update parameters...).
Those parameters will be used by the ObjectDataSource control so as to mapp
them to each of the parameters in the Update method or properties of the
Data Object configured in ObjectDataSource (as parameter in the Update
method...)..

In addition, if convenient, would you post some further detailed code
snippet and aspx template on the ObjectDataSource, DataBound control and
the typed dataset so that we can have a look on them?

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: detailsview,
| thread-index: AcYYg8SbbQRjhNvTTkSewzRImpqrOA==
| X-WBNR-Posting-Host: 24.73.223.27
| From: "=?Utf-8?B?VGRhclRkYXI=?=" <[email protected]>
| Subject: detailsview,
| Date: Fri, 13 Jan 2006 12:56:04 -0800
| Lines: 98
| 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.webcontrols
| 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.webcontrols:32460
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
|
| Why would i get this error:
| Could not find a property named 'DBMANTransNumber' on the type specified
by
| the DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1'.
|
| Here what I am doing, I am using a dataset completly setup by the wizards
| under the app_code directory, I do a simple "Select * from
ordershiprecord
| where ShipKey = @ShipKey" click next, leave fill a datatable, return a
| datatable, create methods to send updates directly to the
| database(generateDBDirectMethods) all checked, THen click next again, it
says
| it generated select, update, delete, table mappings, fil method, update
| methods...
|
| Then i go to a new web form and drag in a detailsview, choose new
datasource,
| object, select the "DJP_DataSet1TableAdpters.OrderShipRecordTableAdapter"
| that is in the drop down. Click next, look around to see that the
|
| select(GetData(Guid ShipKey), returns OrderShipRecordDataTable)
|
| update(Update(String DBMANTransNumber, Guid UserId, String ShiptoCompany,
| String ShiptoName, String ShipToAddress, String ShipToAddress2,
| Nullable<Int32> ShipCity, Nullable<Int32> ShipCountry, Nullable<Int32>
| ShipState, String ZipCode, Nullable<Boolean> SignatureReq, Guid ShipKey,
Guid
| Original_ShipKey), returns Int32)
|
| delete(Delete(Guid Original_ShipKey), returns Int32) method is there
|
| Click next
| it asks to defind Parameters ... QueryString ... Querystringfield =
ShipKey
| Click Finish...
|
| Page is created
| Select enable editing and save the page
|
| Run the calling page from visual studio...
| type in shipkey and call the page
| it shows me the records details just fine
| so i click Edit to change a value
| changed Signaturereq and selected Update.
|
| I get:
| ---------------------------------------
| Could not find a property named 'DBMANTransNumber' on the type specified
by
| the DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1'.
| Description: An unhandled exception occurred during the execution of the
| current web request. Please review the stack trace for more information
about
| the error and where it originated in the code.
|
| Exception Details: System.InvalidOperationException: Could not find a
| property named 'DBMANTransNumber' on the type specified by the
| DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1'.
|
| Source Error:
|
| An unhandled exception was generated during the execution of the current
web
| request. Information regarding the origin and location of the exception
can
| be identified using the exception stack trace below.
|
| Stack Trace:
|
|
| [InvalidOperationException: Could not find a property named
| 'DBMANTransNumber' on the type specified by the DataObjectTypeName
property
| in ObjectDataSource 'ObjectDataSource1'.]
| System.Web.UI.WebControls.ObjectDataSourceView.BuildDataObject(Type
| dataObjectType, IDictionary inputParameters) +380
|
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteUpdate(IDictionary
| keys, IDictionary values, IDictionary oldValues) +1512
| System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary
values,
| IDictionary oldValues, DataSourceViewOperationCallback callback) +179
| System.Web.UI.WebControls.DetailsView.HandleUpdate(String commandArg,
| Boolean causesValidation) +1197
| System.Web.UI.WebControls.DetailsView.HandleEvent(EventArgs e, Boolean
| causesValidation, String validationGroup) +545
| System.Web.UI.WebControls.DetailsView.OnBubbleEvent(Object source,
| EventArgs e) +162
| System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
+56
| System.Web.UI.WebControls.DetailsViewRow.OnBubbleEvent(Object source,
| EventArgs e) +117
| System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
+56
| System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +106
| System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
| eventArgument) +175
|
|
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.Rai
sePostBackEvent(String eventArgument) +31
| System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
| sourceControl, String eventArgument) +32
| System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+244
| System.Web.UI.
| -------------------------------------------
|
|
| So why when using the wizards would this happen, how do i solve this and
| move on....
|
| Tdar
|
|
|
|
 
T

TdarTdar

Hi, as I said i used the wizards, and yes
when try performing
update operation, there raise some exception indicate that the certain
class lack of certain properties... yes?

DJP_Dataset1:
====================
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="DJP_DataSet1"
targetNamespace="http://tempuri.org/DJP_DataSet1.xsd"
xmlns:mstns="http://tempuri.org/DJP_DataSet1.xsd"
xmlns="http://tempuri.org/DJP_DataSet1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:msprop="urn:schemas-microsoft-com:xml-msprop"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:annotation>
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
<DataSource DefaultConnectionIndex="0"
FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass,
Class, Public" SchemaSerializationMode="IncludeSchema"
xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<Connections>
<Connection AppSettingsObjectName="Web.config"
AppSettingsPropertyName="SilverQueen_Main_SystemConnectionString1"
ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly"
Name="SilverQueen_Main_SystemConnectionString1 (Web.config)"
ParameterPrefix="@"
PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.SilverQueen_Main_SystemConnectionString1.ConnectionString"
Provider="System.Data.SqlClient">
</Connection>
</Connections>
<Tables>
<TableAdapter BaseClass="System.ComponentModel.Component"
DataAccessorModifier="AutoLayout, AnsiClass, Class, Public"
DataAccessorName="OrderShipRecordTableAdapter"
GeneratorDataComponentClassName="OrderShipRecordTableAdapter"
Name="OrderShipRecord" UserDataComponentName="OrderShipRecordTableAdapter">
<MainSource>
<DbSource
ConnectionRef="SilverQueen_Main_SystemConnectionString1 (Web.config)"
DbObjectName="SilverQueen_Main_System.dbo_OrderShipRecord"
DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill"
GenerateMethods="Both" GenerateShortCommands="True"
GeneratorGetMethodName="GetData" GeneratorSourceName="Fill"
GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset"
ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False"
UserGetMethodName="GetData" UserSourceName="Fill">
<DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="False">
<CommandText>DELETE FROM [OrderShipRecord] WHERE
(([ShipKey] = @Original_ShipKey))</CommandText>
<Parameters>
<Parameter AllowDbNull="False" AutogeneratedName=""
DataSourceName="" DbType="Guid" Direction="Input"
ParameterName="@Original_ShipKey" Precision="0"
ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="ShipKey"
SourceColumnNullMapping="False" SourceVersion="Original">
</Parameter>
</Parameters>
</DbCommand>
</DeleteCommand>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="True">
<CommandText>SELECT DBMANTransNumber, UserId,
ShiptoCompany, ShiptoName, ShipToAddress, ShipToAddress2, ShipCity,
ShipCountry, ShipState, ZipCode,
SignatureReq, ShipKey
FROM OrderShipRecord
WHERE (ShipKey = @ShipKey)</CommandText>
<Parameters>
<Parameter AllowDbNull="False"
AutogeneratedName="ShipKey" ColumnName="ShipKey"
DataSourceName="SilverQueen_Main_System.dbo_OrderShipRecord"
DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input"
ParameterName="@ShipKey" Precision="0" ProviderType="UniqueIdentifier"
Scale="0" Size="16" SourceColumn="ShipKey" SourceColumnNullMapping="False"
SourceVersion="Current">
</Parameter>
</Parameters>
</DbCommand>
</SelectCommand>
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="False">
<CommandText>UPDATE [OrderShipRecord] SET
[DBMANTransNumber] = @DBMANTransNumber, [UserId] = @UserId, [ShiptoCompany] =
@ShiptoCompany, [ShiptoName] = @ShiptoName, [ShipToAddress] = @ShipToAddress,
[ShipToAddress2] = @ShipToAddress2, [ShipCity] = @ShipCity, [ShipCountry] =
@ShipCountry, [ShipState] = @ShipState, [ZipCode] = @ZipCode, [SignatureReq]
= @SignatureReq, [ShipKey] = @ShipKey WHERE (([ShipKey] =
@Original_ShipKey))</CommandText>
<Parameters>
<Parameter AllowDbNull="False" AutogeneratedName=""
DataSourceName="" DbType="String" Direction="Input"
ParameterName="@DBMANTransNumber" Precision="0" ProviderType="NVarChar"
Scale="0" Size="0" SourceColumn="DBMANTransNumber"
SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="False" AutogeneratedName=""
DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@UserId"
Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0"
SourceColumn="UserId" SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName=""
DataSourceName="" DbType="String" Direction="Input"
ParameterName="@ShiptoCompany" Precision="0" ProviderType="NVarChar"
Scale="0" Size="0" SourceColumn="ShiptoCompany"
SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName=""
DataSourceName="" DbType="String" Direction="Input"
ParameterName="@ShiptoName" Precision="0" ProviderType="NVarChar" Scale="0"
Size="0" SourceColumn="ShiptoName" SourceColumnNullMapping="False"
SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName=""
DataSourceName="" DbType="String" Direction="Input"
ParameterName="@ShipToAddress" Precision="0" ProviderType="NVarChar"
Scale="0" Size="0" SourceColumn="ShipToAddress"
SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName=""
DataSourceName="" DbType="String" Direction="Input"
ParameterName="@ShipToAddress2" Precision="0" ProviderType="NVarChar"
Scale="0" Size="0" SourceColumn="ShipToAddress2"
SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName=""
DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ShipCity"
Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ShipCity"
SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName=""
DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@ShipCountry" Precision="0" ProviderType="Int" Scale="0"
Size="0" SourceColumn="ShipCountry" SourceColumnNullMapping="False"
SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName=""
DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ShipState"
Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ShipState"
SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName=""
DataSourceName="" DbType="String" Direction="Input" ParameterName="@ZipCode"
Precision="0" ProviderType="NVarChar" Scale="0" Size="0"
SourceColumn="ZipCode" SourceColumnNullMapping="False"
SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName=""
DataSourceName="" DbType="Boolean" Direction="Input"
ParameterName="@SignatureReq" Precision="0" ProviderType="Bit" Scale="0"
Size="0" SourceColumn="SignatureReq" SourceColumnNullMapping="False"
SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="False" AutogeneratedName=""
DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@ShipKey"
Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0"
SourceColumn="ShipKey" SourceColumnNullMapping="False"
SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="False" AutogeneratedName=""
DataSourceName="" DbType="Guid" Direction="Input"
ParameterName="@Original_ShipKey" Precision="0"
ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="ShipKey"
SourceColumnNullMapping="False" SourceVersion="Original">
</Parameter>
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="DBMANTransNumber"
DataSetColumn="DBMANTransNumber" />
<Mapping SourceColumn="UserId" DataSetColumn="UserId" />
<Mapping SourceColumn="ShiptoCompany"
DataSetColumn="ShiptoCompany" />
<Mapping SourceColumn="ShiptoName" DataSetColumn="ShiptoName" />
<Mapping SourceColumn="ShipToAddress"
DataSetColumn="ShipToAddress" />
<Mapping SourceColumn="ShipToAddress2"
DataSetColumn="ShipToAddress2" />
<Mapping SourceColumn="ShipCity" DataSetColumn="ShipCity" />
<Mapping SourceColumn="ShipCountry"
DataSetColumn="ShipCountry" />
<Mapping SourceColumn="ShipState" DataSetColumn="ShipState" />
<Mapping SourceColumn="ZipCode" DataSetColumn="ZipCode" />
<Mapping SourceColumn="SignatureReq"
DataSetColumn="SignatureReq" />
<Mapping SourceColumn="ShipKey" DataSetColumn="ShipKey" />
</Mappings>
<Sources>
</Sources>
</TableAdapter>
</Tables>
<Sources>
</Sources>
</DataSource>
</xs:appinfo>
</xs:annotation>
<xs:element name="DJP_DataSet1" msdata:IsDataSet="true"
msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="DJP_DataSet1"
msprop:Generator_DataSetName="DJP_DataSet1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="OrderShipRecord"
msprop:Generator_UserTableName="OrderShipRecord"
msprop:Generator_RowDeletedName="OrderShipRecordRowDeleted"
msprop:Generator_RowChangedName="OrderShipRecordRowChanged"
msprop:Generator_RowClassName="OrderShipRecordRow"
msprop:Generator_RowChangingName="OrderShipRecordRowChanging"
msprop:Generator_RowEvArgName="OrderShipRecordRowChangeEvent"
msprop:Generator_RowEvHandlerName="OrderShipRecordRowChangeEventHandler"
msprop:Generator_TableClassName="OrderShipRecordDataTable"
msprop:Generator_TableVarName="tableOrderShipRecord"
msprop:Generator_RowDeletingName="OrderShipRecordRowDeleting"
msprop:Generator_TablePropName="OrderShipRecord">
<xs:complexType>
<xs:sequence>
<xs:element name="DBMANTransNumber"
msprop:Generator_UserColumnName="DBMANTransNumber"
msprop:Generator_ColumnVarNameInTable="columnDBMANTransNumber"
msprop:Generator_ColumnPropNameInRow="DBMANTransNumber"
msprop:Generator_ColumnPropNameInTable="DBMANTransNumberColumn">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="UserId" msdata:DataType="System.Guid,
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
msprop:Generator_UserColumnName="UserId"
msprop:Generator_ColumnVarNameInTable="columnUserId"
msprop:Generator_ColumnPropNameInRow="UserId"
msprop:Generator_ColumnPropNameInTable="UserIdColumn" type="xs:string" />
<xs:element name="ShiptoCompany"
msprop:Generator_UserColumnName="ShiptoCompany"
msprop:Generator_ColumnVarNameInTable="columnShiptoCompany"
msprop:Generator_ColumnPropNameInRow="ShiptoCompany"
msprop:Generator_ColumnPropNameInTable="ShiptoCompanyColumn" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="80" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ShiptoName"
msprop:Generator_UserColumnName="ShiptoName"
msprop:Generator_ColumnVarNameInTable="columnShiptoName"
msprop:Generator_ColumnPropNameInRow="ShiptoName"
msprop:Generator_ColumnPropNameInTable="ShiptoNameColumn" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="80" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ShipToAddress"
msprop:Generator_UserColumnName="ShipToAddress"
msprop:Generator_ColumnVarNameInTable="columnShipToAddress"
msprop:Generator_ColumnPropNameInRow="ShipToAddress"
msprop:Generator_ColumnPropNameInTable="ShipToAddressColumn" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="80" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ShipToAddress2"
msprop:Generator_UserColumnName="ShipToAddress2"
msprop:Generator_ColumnVarNameInTable="columnShipToAddress2"
msprop:Generator_ColumnPropNameInRow="ShipToAddress2"
msprop:Generator_ColumnPropNameInTable="ShipToAddress2Column" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="80" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ShipCity"
msprop:Generator_UserColumnName="ShipCity"
msprop:Generator_ColumnVarNameInTable="columnShipCity"
msprop:Generator_ColumnPropNameInRow="ShipCity"
msprop:Generator_ColumnPropNameInTable="ShipCityColumn" type="xs:int"
minOccurs="0" />
<xs:element name="ShipCountry"
msprop:Generator_UserColumnName="ShipCountry"
msprop:Generator_ColumnVarNameInTable="columnShipCountry"
msprop:Generator_ColumnPropNameInRow="ShipCountry"
msprop:Generator_ColumnPropNameInTable="ShipCountryColumn" type="xs:int"
minOccurs="0" />
<xs:element name="ShipState"
msprop:Generator_UserColumnName="ShipState"
msprop:Generator_ColumnVarNameInTable="columnShipState"
msprop:Generator_ColumnPropNameInRow="ShipState"
msprop:Generator_ColumnPropNameInTable="ShipStateColumn" type="xs:int"
minOccurs="0" />
<xs:element name="ZipCode"
msprop:Generator_UserColumnName="ZipCode"
msprop:Generator_ColumnVarNameInTable="columnZipCode"
msprop:Generator_ColumnPropNameInRow="ZipCode"
msprop:Generator_ColumnPropNameInTable="ZipCodeColumn" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="SignatureReq"
msprop:Generator_UserColumnName="SignatureReq"
msprop:Generator_ColumnVarNameInTable="columnSignatureReq"
msprop:Generator_ColumnPropNameInRow="SignatureReq"
msprop:Generator_ColumnPropNameInTable="SignatureReqColumn" type="xs:boolean"
minOccurs="0" />
<xs:element name="ShipKey" msdata:DataType="System.Guid,
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
msprop:Generator_UserColumnName="ShipKey"
msprop:Generator_ColumnVarNameInTable="columnShipKey"
msprop:Generator_ColumnPropNameInRow="ShipKey"
msprop:Generator_ColumnPropNameInTable="ShipKeyColumn" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata:primaryKey="true">
<xs:selector xpath=".//mstns:OrderShipRecord" />
<xs:field xpath="mstns:ShipKey" />
</xs:unique>
</xs:element>
</xs:schema>
====================================
This previous dataset that was created by the wizards brings up 53 warnings
and 43 messages, but no errors, FYI..

Page code:

showshipdetails.aspx:
==================================

<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False"
DataKeyNames="ShipKey" DataSourceID="ObjectDataSource1"
Height="50px" Width="125px">
<Fields>
<asp:BoundField DataField="DBMANTransNumber"
HeaderText="DBMANTransNumber" SortExpression="DBMANTransNumber" />
<asp:BoundField DataField="UserId" HeaderText="UserId"
SortExpression="UserId" />
<asp:BoundField DataField="ShiptoCompany"
HeaderText="ShiptoCompany" SortExpression="ShiptoCompany" />
<asp:BoundField DataField="ShiptoName" HeaderText="ShiptoName"
SortExpression="ShiptoName" />
<asp:BoundField DataField="ShipToAddress"
HeaderText="ShipToAddress" SortExpression="ShipToAddress" />
<asp:BoundField DataField="ShipToAddress2"
HeaderText="ShipToAddress2" SortExpression="ShipToAddress2" />
<asp:BoundField DataField="ShipCity" HeaderText="ShipCity"
SortExpression="ShipCity" />
<asp:BoundField DataField="ShipCountry" HeaderText="ShipCountry"
SortExpression="ShipCountry" />
<asp:BoundField DataField="ShipState" HeaderText="ShipState"
SortExpression="ShipState" />
<asp:BoundField DataField="ZipCode" HeaderText="ZipCode"
SortExpression="ZipCode" />
<asp:CheckBoxField DataField="SignatureReq"
HeaderText="SignatureReq" SortExpression="SignatureReq" />
<asp:BoundField DataField="ShipKey" HeaderText="ShipKey"
ReadOnly="True" SortExpression="ShipKey" />
<asp:CommandField ShowEditButton="True" />
</Fields>
</asp:DetailsView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DataObjectTypeName="System.Guid"
DeleteMethod="Delete" OldValuesParameterFormatString="original_{0}"
SelectMethod="GetData"
TypeName="DJP_DataSet1TableAdapters.OrderShipRecordTableAdapter"
UpdateMethod="Update">
<UpdateParameters>
<asp:parameter Name="DBMANTransNumber" Type="String" />
<asp:parameter Name="UserId" Type="Object" />
<asp:parameter Name="ShiptoCompany" Type="String" />
<asp:parameter Name="ShiptoName" Type="String" />
<asp:parameter Name="ShipToAddress" Type="String" />
<asp:parameter Name="ShipToAddress2" Type="String" />
<asp:parameter Name="ShipCity" Type="Int32" />
<asp:parameter Name="ShipCountry" Type="Int32" />
<asp:parameter Name="ShipState" Type="Int32" />
<asp:parameter Name="ZipCode" Type="String" />
<asp:parameter Name="SignatureReq" Type="Boolean" />
<asp:parameter Name="ShipKey" Type="Object" />
<asp:parameter Name="Original_ShipKey" Type="Object" />
</UpdateParameters>
<SelectParameters>
<asp:QueryStringParameter Name="ShipKey"
QueryStringField="ShipKey" Type="Object" />
</SelectParameters>
</asp:ObjectDataSource>


==============================================







Steven Cheng said:
Hi Tdar,

Welcome to ASPNET newsgroup.
From your description, you're using a certain TypedDataset(TableAdapter?)
to return some Data records through datatable and some certain methods for
update and delete. And you configure the Data Access component through
ObjectDataSource , it can display data well, however, when try performing
update operation, there raise some exception indicate that the certain
class lack of certain properties... yes?

Based on my experience, this is likely caused by the the DataAccess
component class's Update method's parameters list dosn't match the
DataBound control's supplied parameters.... As the error message
indicated:
=====================
Could not find a property named 'DBMANTransNumber' on the type specified by
the DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1'.
=====================

So you can check the update parameters in the DataBound control (or you can
use the Updating event to printout all the supplief update parameters...).
Those parameters will be used by the ObjectDataSource control so as to mapp
them to each of the parameters in the Update method or properties of the
Data Object configured in ObjectDataSource (as parameter in the Update
method...)..

In addition, if convenient, would you post some further detailed code
snippet and aspx template on the ObjectDataSource, DataBound control and
the typed dataset so that we can have a look on them?

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: detailsview,
| thread-index: AcYYg8SbbQRjhNvTTkSewzRImpqrOA==
| X-WBNR-Posting-Host: 24.73.223.27
| From: "=?Utf-8?B?VGRhclRkYXI=?=" <[email protected]>
| Subject: detailsview,
| Date: Fri, 13 Jan 2006 12:56:04 -0800
| Lines: 98
| 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.webcontrols
| 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.webcontrols:32460
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
|
| Why would i get this error:
| Could not find a property named 'DBMANTransNumber' on the type specified
by
| the DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1'.
|
| Here what I am doing, I am using a dataset completly setup by the wizards
| under the app_code directory, I do a simple "Select * from
ordershiprecord
| where ShipKey = @ShipKey" click next, leave fill a datatable, return a
| datatable, create methods to send updates directly to the
| database(generateDBDirectMethods) all checked, THen click next again, it
says
| it generated select, update, delete, table mappings, fil method, update
| methods...
|
| Then i go to a new web form and drag in a detailsview, choose new
datasource,
| object, select the "DJP_DataSet1TableAdpters.OrderShipRecordTableAdapter"
| that is in the drop down. Click next, look around to see that the
|
| select(GetData(Guid ShipKey), returns OrderShipRecordDataTable)
|
| update(Update(String DBMANTransNumber, Guid UserId, String ShiptoCompany,
| String ShiptoName, String ShipToAddress, String ShipToAddress2,
| Nullable<Int32> ShipCity, Nullable<Int32> ShipCountry, Nullable<Int32>
| ShipState, String ZipCode, Nullable<Boolean> SignatureReq, Guid ShipKey,
Guid
| Original_ShipKey), returns Int32)
|
| delete(Delete(Guid Original_ShipKey), returns Int32) method is there
|
| Click next
| it asks to defind Parameters ... QueryString ... Querystringfield =
ShipKey
| Click Finish...
|
| Page is created
| Select enable editing and save the page
|
| Run the calling page from visual studio...
| type in shipkey and call the page
| it shows me the records details just fine
| so i click Edit to change a value
| changed Signaturereq and selected Update.
|
| I get:
| ---------------------------------------
| Could not find a property named 'DBMANTransNumber' on the type specified
by
| the DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1'.
| Description: An unhandled exception occurred during the execution of the
| current web request. Please review the stack trace for more information
about
| the error and where it originated in the code.
|
| Exception Details: System.InvalidOperationException: Could not find a
| property named 'DBMANTransNumber' on the type specified by the
| DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1'.
|
| Source Error:
|
| An unhandled exception was generated during the execution of the current
web
| request. Information regarding the origin and location of the exception
can
| be identified using the exception stack trace below.
|
| Stack Trace:
|
|
| [InvalidOperationException: Could not find a property named
| 'DBMANTransNumber' on the type specified by the DataObjectTypeName
property
| in ObjectDataSource 'ObjectDataSource1'.]
| System.Web.UI.WebControls.ObjectDataSourceView.BuildDataObject(Type
| dataObjectType, IDictionary inputParameters) +380
|
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteUpdate(IDictionary
| keys, IDictionary values, IDictionary oldValues) +1512
| System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary
values,
| IDictionary oldValues, DataSourceViewOperationCallback callback) +179
| System.Web.UI.WebControls.DetailsView.HandleUpdate(String commandArg,
| Boolean causesValidation) +1197
| System.Web.UI.WebControls.DetailsView.HandleEvent(EventArgs e, Boolean
| causesValidation, String validationGroup) +545
| System.Web.UI.WebControls.DetailsView.OnBubbleEvent(Object source,
| EventArgs e) +162
| System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
+56
| System.Web.UI.WebControls.DetailsViewRow.OnBubbleEvent(Object source,
| EventArgs e) +117
| System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
+56
| System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +106
| System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
| eventArgument) +175
|
|
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.Rai
sePostBackEvent(String eventArgument) +31
| System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
| sourceControl, String eventArgument) +32
| System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+244
| System.Web.UI.
| -------------------------------------------
|
|
| So why when using the wizards would this happen, how do i solve this and
| move on....
|
| Tdar
|
|
|
|
 
T

TdarTdar

and heres the table:
CREATE TABLE [dbo].[OrderShipRecord] (
[ShipKey] uniqueidentifier ROWGUIDCOL NOT NULL ,
[DBMANTransNumber] [nvarchar] (10) COLLATE Latin1_General_CI_AS NOT NULL ,
[CreatedDate] [datetime] NOT NULL ,
[PackagedDate] [datetime] NULL ,
[UserId] [uniqueidentifier] NOT NULL ,
[CarrierCode] [char] (1) COLLATE Latin1_General_CI_AS NULL ,
[LocationCode] [char] (1) COLLATE Latin1_General_CI_AS NULL ,
[ShippingServiceID] [char] (1) COLLATE Latin1_General_CI_AS NULL ,
[ShipInsuranceID] [char] (1) COLLATE Latin1_General_CI_AS NULL ,
[OrderTypeRWC] [char] (1) COLLATE Latin1_General_CI_AS NULL ,
[SignatureReq] [bit] NULL ,
[HighValueFlag] [bit] NULL ,
[ShipCost] [money] NULL ,
[OrderTotal] [money] NULL ,
[ChinaSurcharges] [money] NULL ,
[CrystalSurcharges] [money] NULL ,
[OtherSurcharges] [money] NULL ,
[Order_StaffKeyID] [char] (1) COLLATE Latin1_General_CI_AS NULL ,
[Paid] [bit] NULL ,
[ShiptoCompany] [nvarchar] (80) COLLATE Latin1_General_CI_AS NULL ,
[ShiptoName] [nvarchar] (80) COLLATE Latin1_General_CI_AS NULL ,
[ShipToAddress] [nvarchar] (80) COLLATE Latin1_General_CI_AS NULL ,
[ShipToAddress2] [nvarchar] (80) COLLATE Latin1_General_CI_AS NULL ,
[ShipCity] [int] NULL ,
[ShipCountry] [int] NULL ,
[ShipState] [int] NULL ,
[ZipCode] [nvarchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[SignRqByPassReport] [bit] NULL ,
[Final_CarrierCode] [char] (1) COLLATE Latin1_General_CI_AS NULL ,
[Final_ShippingServiceID] [char] (1) COLLATE Latin1_General_CI_AS NULL ,
[Final_NumPkgs] [smallint] NULL ,
[Final_ShipCost] [money] NULL ,
[Final_DeclaredValue] [money] NULL ,
[Final_CODAmount] [money] NULL ,
[Final_Zone] [char] (10) COLLATE Latin1_General_CI_AS NULL ,
[Final_FreightCharge] [money] NULL ,
[Final_Weight] [char] (10) COLLATE Latin1_General_CI_AS NULL ,
[Final_ShipDate] [datetime] NULL ,
[UPS_ShipCost] [money] NULL ,
[UPS_Signature] [nvarchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[UPS_Delivered] [bit] NULL ,
[UPS_DeliveredDate] [datetime] NULL ,
[Org_Company] [nvarchar] (80) COLLATE Latin1_General_CI_AS NULL ,
[Org_Name] [nvarchar] (80) COLLATE Latin1_General_CI_AS NULL ,
[Org_Address] [nvarchar] (80) COLLATE Latin1_General_CI_AS NULL ,
[Org_City] [nvarchar] (80) COLLATE Latin1_General_CI_AS NULL ,
[Org_State] [nvarchar] (2) COLLATE Latin1_General_CI_AS NULL ,
[Org_Zip] [nvarchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[ORG_DbmanShipmtd] [char] (1) COLLATE Latin1_General_CI_AS NULL ,
[ORG_dbmanShipMNW] [char] (1) COLLATE Latin1_General_CI_AS NULL ,
[ORG_DBMANsalesCode] [char] (10) COLLATE Latin1_General_CI_AS NULL ,
[ORG_2ndODRTot] [nvarchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[org_shiptran1] [nvarchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[org_airbill1] [nvarchar] (28) COLLATE Latin1_General_CI_AS NULL ,
[Org_Airbill2] [nvarchar] (28) COLLATE Latin1_General_CI_AS NULL ,
[Org_SplitODRStus] [char] (10) COLLATE Latin1_General_CI_AS NULL ,
[ORG_PakDate] [nvarchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[ORG_PakDate2] [nvarchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[DBMAN_STATUS] [nvarchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[DBMANSURCHARGES] [nvarchar] (50) COLLATE Latin1_General_CI_AS NULL ,
(e-mail address removed)
 
S

Steven Cheng[MSFT]

Hi Tdar,

I've just tried the dataset xml and db script you provided, seems the table
structure is very large which contains lots of columns, I can't quite get
how to fill some test data. If convenient would you also attache some test
data to me?

Also ,based on the ASP.NET page's aspx template you provided, I found that
you set the ObjectDataSource's DataObjectTypeName to "System.Guid", this
is incorrect since ObjectDataSource.DataObjectTypeName should be configured
to a type which contains the Properties that can mapped to all the
parameters in your update, insert methods....
You can view the description in the MSDN document:

#ObjectDataSource.DataObjectTypeName Property
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdat
asource.dataobjecttypename.aspx

So for your scenario I think the DataObjectTypeName should be configured to
"DJP_DataSet1.OrderShipRecordRow" ...

You can have a look , if 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.)




--------------------
| Thread-Topic: detailsview,
| thread-index: AcYatwcMewVhKBVrRJq376XEWAmeyA==
| X-WBNR-Posting-Host: 24.73.223.27
| From: "=?Utf-8?B?VGRhclRkYXI=?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: detailsview,
| Date: Mon, 16 Jan 2006 08:08:02 -0800
| Lines: 598
| 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.webcontrols
| 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.webcontrols:32507
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
|
| Hi, as I said i used the wizards, and yes
| > when try performing
| > update operation, there raise some exception indicate that the certain
| > class lack of certain properties... yes?
|
| DJP_Dataset1:
| ====================
| <?xml version="1.0" encoding="utf-8"?>
| <xs:schema id="DJP_DataSet1"
| targetNamespace="http://tempuri.org/DJP_DataSet1.xsd"
| xmlns:mstns="http://tempuri.org/DJP_DataSet1.xsd"
| xmlns="http://tempuri.org/DJP_DataSet1.xsd"
| xmlns:xs="http://www.w3.org/2001/XMLSchema"
| xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
| xmlns:msprop="urn:schemas-microsoft-com:xml-msprop"
| attributeFormDefault="qualified" elementFormDefault="qualified">
| <xs:annotation>
| <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
| <DataSource DefaultConnectionIndex="0"
| FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout,
AnsiClass,
| Class, Public" SchemaSerializationMode="IncludeSchema"
| xmlns="urn:schemas-microsoft-com:xml-msdatasource">
| <Connections>
| <Connection AppSettingsObjectName="Web.config"
| AppSettingsPropertyName="SilverQueen_Main_SystemConnectionString1"
| ConnectionStringObject="" IsAppSettingsProperty="True"
Modifier="Assembly"
| Name="SilverQueen_Main_SystemConnectionString1 (Web.config)"
| ParameterPrefix="@"
|
PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.Con
nectionStrings.SilverQueen_Main_SystemConnectionString1.ConnectionString"
| Provider="System.Data.SqlClient">
| </Connection>
| </Connections>
| <Tables>
| <TableAdapter BaseClass="System.ComponentModel.Component"
| DataAccessorModifier="AutoLayout, AnsiClass, Class, Public"
| DataAccessorName="OrderShipRecordTableAdapter"
| GeneratorDataComponentClassName="OrderShipRecordTableAdapter"
| Name="OrderShipRecord"
UserDataComponentName="OrderShipRecordTableAdapter">
| <MainSource>
| <DbSource
| ConnectionRef="SilverQueen_Main_SystemConnectionString1 (Web.config)"
| DbObjectName="SilverQueen_Main_System.dbo_OrderShipRecord"
| DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill"
| GenerateMethods="Both" GenerateShortCommands="True"
| GeneratorGetMethodName="GetData" GeneratorSourceName="Fill"
| GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset"
| ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0,
Culture=neutral,
| PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False"
| UserGetMethodName="GetData" UserSourceName="Fill">
| <DeleteCommand>
| <DbCommand CommandType="Text" ModifiedByUser="False">
| <CommandText>DELETE FROM [OrderShipRecord] WHERE
| (([ShipKey] = @Original_ShipKey))</CommandText>
| <Parameters>
| <Parameter AllowDbNull="False" AutogeneratedName=""
| DataSourceName="" DbType="Guid" Direction="Input"
| ParameterName="@Original_ShipKey" Precision="0"
| ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="ShipKey"
| SourceColumnNullMapping="False" SourceVersion="Original">
| </Parameter>
| </Parameters>
| </DbCommand>
| </DeleteCommand>
| <SelectCommand>
| <DbCommand CommandType="Text" ModifiedByUser="True">
| <CommandText>SELECT DBMANTransNumber, UserId,
| ShiptoCompany, ShiptoName, ShipToAddress, ShipToAddress2, ShipCity,
| ShipCountry, ShipState, ZipCode,
| SignatureReq, ShipKey
| FROM OrderShipRecord
| WHERE (ShipKey = @ShipKey)</CommandText>
| <Parameters>
| <Parameter AllowDbNull="False"
| AutogeneratedName="ShipKey" ColumnName="ShipKey"
| DataSourceName="SilverQueen_Main_System.dbo_OrderShipRecord"
| DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input"
| ParameterName="@ShipKey" Precision="0" ProviderType="UniqueIdentifier"
| Scale="0" Size="16" SourceColumn="ShipKey"
SourceColumnNullMapping="False"
| SourceVersion="Current">
| </Parameter>
| </Parameters>
| </DbCommand>
| </SelectCommand>
| <UpdateCommand>
| <DbCommand CommandType="Text" ModifiedByUser="False">
| <CommandText>UPDATE [OrderShipRecord] SET
| [DBMANTransNumber] = @DBMANTransNumber, [UserId] = @UserId,
[ShiptoCompany] =
| @ShiptoCompany, [ShiptoName] = @ShiptoName, [ShipToAddress] =
@ShipToAddress,
| [ShipToAddress2] = @ShipToAddress2, [ShipCity] = @ShipCity, [ShipCountry]
=
| @ShipCountry, [ShipState] = @ShipState, [ZipCode] = @ZipCode,
[SignatureReq]
| = @SignatureReq, [ShipKey] = @ShipKey WHERE (([ShipKey] =
| @Original_ShipKey))</CommandText>
| <Parameters>
| <Parameter AllowDbNull="False" AutogeneratedName=""
| DataSourceName="" DbType="String" Direction="Input"
| ParameterName="@DBMANTransNumber" Precision="0" ProviderType="NVarChar"
| Scale="0" Size="0" SourceColumn="DBMANTransNumber"
| SourceColumnNullMapping="False" SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="False" AutogeneratedName=""
| DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@UserId"
| Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0"
| SourceColumn="UserId" SourceColumnNullMapping="False"
SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="String" Direction="Input"
| ParameterName="@ShiptoCompany" Precision="0" ProviderType="NVarChar"
| Scale="0" Size="0" SourceColumn="ShiptoCompany"
| SourceColumnNullMapping="False" SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="String" Direction="Input"
| ParameterName="@ShiptoName" Precision="0" ProviderType="NVarChar"
Scale="0"
| Size="0" SourceColumn="ShiptoName" SourceColumnNullMapping="False"
| SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="String" Direction="Input"
| ParameterName="@ShipToAddress" Precision="0" ProviderType="NVarChar"
| Scale="0" Size="0" SourceColumn="ShipToAddress"
| SourceColumnNullMapping="False" SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="String" Direction="Input"
| ParameterName="@ShipToAddress2" Precision="0" ProviderType="NVarChar"
| Scale="0" Size="0" SourceColumn="ShipToAddress2"
| SourceColumnNullMapping="False" SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@ShipCity"
| Precision="0" ProviderType="Int" Scale="0" Size="0"
SourceColumn="ShipCity"
| SourceColumnNullMapping="False" SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="Int32" Direction="Input"
| ParameterName="@ShipCountry" Precision="0" ProviderType="Int" Scale="0"
| Size="0" SourceColumn="ShipCountry" SourceColumnNullMapping="False"
| SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@ShipState"
| Precision="0" ProviderType="Int" Scale="0" Size="0"
SourceColumn="ShipState"
| SourceColumnNullMapping="False" SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="String" Direction="Input"
ParameterName="@ZipCode"
| Precision="0" ProviderType="NVarChar" Scale="0" Size="0"
| SourceColumn="ZipCode" SourceColumnNullMapping="False"
| SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="Boolean" Direction="Input"
| ParameterName="@SignatureReq" Precision="0" ProviderType="Bit" Scale="0"
| Size="0" SourceColumn="SignatureReq" SourceColumnNullMapping="False"
| SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="False" AutogeneratedName=""
| DataSourceName="" DbType="Guid" Direction="Input"
ParameterName="@ShipKey"
| Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0"
| SourceColumn="ShipKey" SourceColumnNullMapping="False"
| SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="False" AutogeneratedName=""
| DataSourceName="" DbType="Guid" Direction="Input"
| ParameterName="@Original_ShipKey" Precision="0"
| ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="ShipKey"
| SourceColumnNullMapping="False" SourceVersion="Original">
| </Parameter>
| </Parameters>
| </DbCommand>
| </UpdateCommand>
| </DbSource>
| </MainSource>
| <Mappings>
| <Mapping SourceColumn="DBMANTransNumber"
| DataSetColumn="DBMANTransNumber" />
| <Mapping SourceColumn="UserId" DataSetColumn="UserId" />
| <Mapping SourceColumn="ShiptoCompany"
| DataSetColumn="ShiptoCompany" />
| <Mapping SourceColumn="ShiptoName"
DataSetColumn="ShiptoName" />
| <Mapping SourceColumn="ShipToAddress"
| DataSetColumn="ShipToAddress" />
| <Mapping SourceColumn="ShipToAddress2"
| DataSetColumn="ShipToAddress2" />
| <Mapping SourceColumn="ShipCity" DataSetColumn="ShipCity" />
| <Mapping SourceColumn="ShipCountry"
| DataSetColumn="ShipCountry" />
| <Mapping SourceColumn="ShipState" DataSetColumn="ShipState"
/>
| <Mapping SourceColumn="ZipCode" DataSetColumn="ZipCode" />
| <Mapping SourceColumn="SignatureReq"
| DataSetColumn="SignatureReq" />
| <Mapping SourceColumn="ShipKey" DataSetColumn="ShipKey" />
| </Mappings>
| <Sources>
| </Sources>
| </TableAdapter>
| </Tables>
| <Sources>
| </Sources>
| </DataSource>
| </xs:appinfo>
| </xs:annotation>
| <xs:element name="DJP_DataSet1" msdata:IsDataSet="true"
| msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="DJP_DataSet1"
| msprop:Generator_DataSetName="DJP_DataSet1">
| <xs:complexType>
| <xs:choice minOccurs="0" maxOccurs="unbounded">
| <xs:element name="OrderShipRecord"
| msprop:Generator_UserTableName="OrderShipRecord"
| msprop:Generator_RowDeletedName="OrderShipRecordRowDeleted"
| msprop:Generator_RowChangedName="OrderShipRecordRowChanged"
| msprop:Generator_RowClassName="OrderShipRecordRow"
| msprop:Generator_RowChangingName="OrderShipRecordRowChanging"
| msprop:Generator_RowEvArgName="OrderShipRecordRowChangeEvent"
| msprop:Generator_RowEvHandlerName="OrderShipRecordRowChangeEventHandler"
| msprop:Generator_TableClassName="OrderShipRecordDataTable"
| msprop:Generator_TableVarName="tableOrderShipRecord"
| msprop:Generator_RowDeletingName="OrderShipRecordRowDeleting"
| msprop:Generator_TablePropName="OrderShipRecord">
| <xs:complexType>
| <xs:sequence>
| <xs:element name="DBMANTransNumber"
| msprop:Generator_UserColumnName="DBMANTransNumber"
| msprop:Generator_ColumnVarNameInTable="columnDBMANTransNumber"
| msprop:Generator_ColumnPropNameInRow="DBMANTransNumber"
| msprop:Generator_ColumnPropNameInTable="DBMANTransNumberColumn">
| <xs:simpleType>
| <xs:restriction base="xs:string">
| <xs:maxLength value="10" />
| </xs:restriction>
| </xs:simpleType>
| </xs:element>
| <xs:element name="UserId" msdata:DataType="System.Guid,
| mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
| msprop:Generator_UserColumnName="UserId"
| msprop:Generator_ColumnVarNameInTable="columnUserId"
| msprop:Generator_ColumnPropNameInRow="UserId"
| msprop:Generator_ColumnPropNameInTable="UserIdColumn" type="xs:string" />
| <xs:element name="ShiptoCompany"
| msprop:Generator_UserColumnName="ShiptoCompany"
| msprop:Generator_ColumnVarNameInTable="columnShiptoCompany"
| msprop:Generator_ColumnPropNameInRow="ShiptoCompany"
| msprop:Generator_ColumnPropNameInTable="ShiptoCompanyColumn"
minOccurs="0">
| <xs:simpleType>
| <xs:restriction base="xs:string">
| <xs:maxLength value="80" />
| </xs:restriction>
| </xs:simpleType>
| </xs:element>
| <xs:element name="ShiptoName"
| msprop:Generator_UserColumnName="ShiptoName"
| msprop:Generator_ColumnVarNameInTable="columnShiptoName"
| msprop:Generator_ColumnPropNameInRow="ShiptoName"
| msprop:Generator_ColumnPropNameInTable="ShiptoNameColumn" minOccurs="0">
| <xs:simpleType>
| <xs:restriction base="xs:string">
| <xs:maxLength value="80" />
| </xs:restriction>
| </xs:simpleType>
| </xs:element>
| <xs:element name="ShipToAddress"
| msprop:Generator_UserColumnName="ShipToAddress"
| msprop:Generator_ColumnVarNameInTable="columnShipToAddress"
| msprop:Generator_ColumnPropNameInRow="ShipToAddress"
| msprop:Generator_ColumnPropNameInTable="ShipToAddressColumn"
minOccurs="0">
| <xs:simpleType>
| <xs:restriction base="xs:string">
| <xs:maxLength value="80" />
| </xs:restriction>
| </xs:simpleType>
| </xs:element>
| <xs:element name="ShipToAddress2"
| msprop:Generator_UserColumnName="ShipToAddress2"
| msprop:Generator_ColumnVarNameInTable="columnShipToAddress2"
| msprop:Generator_ColumnPropNameInRow="ShipToAddress2"
| msprop:Generator_ColumnPropNameInTable="ShipToAddress2Column"
minOccurs="0">
| <xs:simpleType>
| <xs:restriction base="xs:string">
| <xs:maxLength value="80" />
| </xs:restriction>
| </xs:simpleType>
| </xs:element>
| <xs:element name="ShipCity"
| msprop:Generator_UserColumnName="ShipCity"
| msprop:Generator_ColumnVarNameInTable="columnShipCity"
| msprop:Generator_ColumnPropNameInRow="ShipCity"
| msprop:Generator_ColumnPropNameInTable="ShipCityColumn" type="xs:int"
| minOccurs="0" />
| <xs:element name="ShipCountry"
| msprop:Generator_UserColumnName="ShipCountry"
| msprop:Generator_ColumnVarNameInTable="columnShipCountry"
| msprop:Generator_ColumnPropNameInRow="ShipCountry"
| msprop:Generator_ColumnPropNameInTable="ShipCountryColumn" type="xs:int"
| minOccurs="0" />
| <xs:element name="ShipState"
| msprop:Generator_UserColumnName="ShipState"
| msprop:Generator_ColumnVarNameInTable="columnShipState"
| msprop:Generator_ColumnPropNameInRow="ShipState"
| msprop:Generator_ColumnPropNameInTable="ShipStateColumn" type="xs:int"
| minOccurs="0" />
| <xs:element name="ZipCode"
| msprop:Generator_UserColumnName="ZipCode"
| msprop:Generator_ColumnVarNameInTable="columnZipCode"
| msprop:Generator_ColumnPropNameInRow="ZipCode"
| msprop:Generator_ColumnPropNameInTable="ZipCodeColumn" minOccurs="0">
| <xs:simpleType>
| <xs:restriction base="xs:string">
| <xs:maxLength value="10" />
| </xs:restriction>
| </xs:simpleType>
| </xs:element>
| <xs:element name="SignatureReq"
| msprop:Generator_UserColumnName="SignatureReq"
| msprop:Generator_ColumnVarNameInTable="columnSignatureReq"
| msprop:Generator_ColumnPropNameInRow="SignatureReq"
| msprop:Generator_ColumnPropNameInTable="SignatureReqColumn"
type="xs:boolean"
| minOccurs="0" />
| <xs:element name="ShipKey" msdata:DataType="System.Guid,
| mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
| msprop:Generator_UserColumnName="ShipKey"
| msprop:Generator_ColumnVarNameInTable="columnShipKey"
| msprop:Generator_ColumnPropNameInRow="ShipKey"
| msprop:Generator_ColumnPropNameInTable="ShipKeyColumn" type="xs:string" />
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| </xs:choice>
| </xs:complexType>
| <xs:unique name="Constraint1" msdata:primaryKey="true">
| <xs:selector xpath=".//mstns:OrderShipRecord" />
| <xs:field xpath="mstns:ShipKey" />
| </xs:unique>
| </xs:element>
| </xs:schema>
| ====================================
| This previous dataset that was created by the wizards brings up 53
warnings
| and 43 messages, but no errors, FYI..
|
| Page code:
|
| showshipdetails.aspx:
| ==================================
|
| <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False"
| DataKeyNames="ShipKey" DataSourceID="ObjectDataSource1"
| Height="50px" Width="125px">
| <Fields>
| <asp:BoundField DataField="DBMANTransNumber"
| HeaderText="DBMANTransNumber" SortExpression="DBMANTransNumber" />
| <asp:BoundField DataField="UserId" HeaderText="UserId"
| SortExpression="UserId" />
| <asp:BoundField DataField="ShiptoCompany"
| HeaderText="ShiptoCompany" SortExpression="ShiptoCompany" />
| <asp:BoundField DataField="ShiptoName"
HeaderText="ShiptoName"
| SortExpression="ShiptoName" />
| <asp:BoundField DataField="ShipToAddress"
| HeaderText="ShipToAddress" SortExpression="ShipToAddress" />
| <asp:BoundField DataField="ShipToAddress2"
| HeaderText="ShipToAddress2" SortExpression="ShipToAddress2" />
| <asp:BoundField DataField="ShipCity" HeaderText="ShipCity"
| SortExpression="ShipCity" />
| <asp:BoundField DataField="ShipCountry"
HeaderText="ShipCountry"
| SortExpression="ShipCountry" />
| <asp:BoundField DataField="ShipState" HeaderText="ShipState"
| SortExpression="ShipState" />
| <asp:BoundField DataField="ZipCode" HeaderText="ZipCode"
| SortExpression="ZipCode" />
| <asp:CheckBoxField DataField="SignatureReq"
| HeaderText="SignatureReq" SortExpression="SignatureReq" />
| <asp:BoundField DataField="ShipKey" HeaderText="ShipKey"
| ReadOnly="True" SortExpression="ShipKey" />
| <asp:CommandField ShowEditButton="True" />
| </Fields>
| </asp:DetailsView>
| <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| DataObjectTypeName="System.Guid"
| DeleteMethod="Delete"
OldValuesParameterFormatString="original_{0}"
| SelectMethod="GetData"
| TypeName="DJP_DataSet1TableAdapters.OrderShipRecordTableAdapter"
| UpdateMethod="Update">
| <UpdateParameters>
| <asp:parameter Name="DBMANTransNumber" Type="String" />
| <asp:parameter Name="UserId" Type="Object" />
| <asp:parameter Name="ShiptoCompany" Type="String" />
| <asp:parameter Name="ShiptoName" Type="String" />
| <asp:parameter Name="ShipToAddress" Type="String" />
| <asp:parameter Name="ShipToAddress2" Type="String" />
| <asp:parameter Name="ShipCity" Type="Int32" />
| <asp:parameter Name="ShipCountry" Type="Int32" />
| <asp:parameter Name="ShipState" Type="Int32" />
| <asp:parameter Name="ZipCode" Type="String" />
| <asp:parameter Name="SignatureReq" Type="Boolean" />
| <asp:parameter Name="ShipKey" Type="Object" />
| <asp:parameter Name="Original_ShipKey" Type="Object" />
| </UpdateParameters>
| <SelectParameters>
| <asp:QueryStringParameter Name="ShipKey"
| QueryStringField="ShipKey" Type="Object" />
| </SelectParameters>
| </asp:ObjectDataSource>
|
|
| ==============================================
|
|
|
|
|
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Tdar,
| >
| > Welcome to ASPNET newsgroup.
| > From your description, you're using a certain
TypedDataset(TableAdapter?)
| > to return some Data records through datatable and some certain methods
for
| > update and delete. And you configure the Data Access component through
| > ObjectDataSource , it can display data well, however, when try
performing
| > update operation, there raise some exception indicate that the certain
| > class lack of certain properties... yes?
| >
| > Based on my experience, this is likely caused by the the DataAccess
| > component class's Update method's parameters list dosn't match the
| > DataBound control's supplied parameters.... As the error message
| > indicated:
| > =====================
| > Could not find a property named 'DBMANTransNumber' on the type
specified by
| > the DataObjectTypeName property in ObjectDataSource
'ObjectDataSource1'.
| > =====================
| >
| > So you can check the update parameters in the DataBound control (or you
can
| > use the Updating event to printout all the supplief update
parameters...).
| > Those parameters will be used by the ObjectDataSource control so as to
mapp
| > them to each of the parameters in the Update method or properties of
the
| > Data Object configured in ObjectDataSource (as parameter in the Update
| > method...)..
| >
| > In addition, if convenient, would you post some further detailed code
| > snippet and aspx template on the ObjectDataSource, DataBound control
and
| > the typed dataset so that we can have a look on them?
| >
| > 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: detailsview,
| > | thread-index: AcYYg8SbbQRjhNvTTkSewzRImpqrOA==
| > | X-WBNR-Posting-Host: 24.73.223.27
| > | From: "=?Utf-8?B?VGRhclRkYXI=?=" <[email protected]>
| > | Subject: detailsview,
| > | Date: Fri, 13 Jan 2006 12:56:04 -0800
| > | Lines: 98
| > | 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.webcontrols
| > | 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.webcontrols:32460
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
| > |
| > | Why would i get this error:
| > | Could not find a property named 'DBMANTransNumber' on the type
specified
| > by
| > | the DataObjectTypeName property in ObjectDataSource
'ObjectDataSource1'.
| > |
| > | Here what I am doing, I am using a dataset completly setup by the
wizards
| > | under the app_code directory, I do a simple "Select * from
| > ordershiprecord
| > | where ShipKey = @ShipKey" click next, leave fill a datatable, return
a
| > | datatable, create methods to send updates directly to the
| > | database(generateDBDirectMethods) all checked, THen click next again,
it
| > says
| > | it generated select, update, delete, table mappings, fil method,
update
| > | methods...
| > |
| > | Then i go to a new web form and drag in a detailsview, choose new
| > datasource,
| > | object, select the
"DJP_DataSet1TableAdpters.OrderShipRecordTableAdapter"
| > | that is in the drop down. Click next, look around to see that the
| > |
| > | select(GetData(Guid ShipKey), returns OrderShipRecordDataTable)
| > |
| > | update(Update(String DBMANTransNumber, Guid UserId, String
ShiptoCompany,
| > | String ShiptoName, String ShipToAddress, String ShipToAddress2,
| > | Nullable<Int32> ShipCity, Nullable<Int32> ShipCountry,
Nullable<Int32>
| > | ShipState, String ZipCode, Nullable<Boolean> SignatureReq, Guid
ShipKey,
| > Guid
| > | Original_ShipKey), returns Int32)
| > |
| > | delete(Delete(Guid Original_ShipKey), returns Int32) method is there
| > |
| > | Click next
| > | it asks to defind Parameters ... QueryString ... Querystringfield =
| > ShipKey
| > | Click Finish...
| > |
| > | Page is created
| > | Select enable editing and save the page
| > |
| > | Run the calling page from visual studio...
| > | type in shipkey and call the page
| > | it shows me the records details just fine
| > | so i click Edit to change a value
| > | changed Signaturereq and selected Update.
| > |
| > | I get:
| > | ---------------------------------------
| > | Could not find a property named 'DBMANTransNumber' on the type
specified
| > by
| > | the DataObjectTypeName property in ObjectDataSource
'ObjectDataSource1'.
| > | Description: An unhandled exception occurred during the execution of
the
| > | current web request. Please review the stack trace for more
information
| > about
| > | the error and where it originated in the code.
| > |
| > | Exception Details: System.InvalidOperationException: Could not find a
| > | property named 'DBMANTransNumber' on the type specified by the
| > | DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1'.
| > |
| > | Source Error:
| > |
| > | An unhandled exception was generated during the execution of the
current
| > web
| > | request. Information regarding the origin and location of the
exception
| > can
| > | be identified using the exception stack trace below.
| > |
| > | Stack Trace:
| > |
| > |
| > | [InvalidOperationException: Could not find a property named
| > | 'DBMANTransNumber' on the type specified by the DataObjectTypeName
| > property
| > | in ObjectDataSource 'ObjectDataSource1'.]
| > |
System.Web.UI.WebControls.ObjectDataSourceView.BuildDataObject(Type
| > | dataObjectType, IDictionary inputParameters) +380
| > |
| >
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteUpdate(IDictionary
| > | keys, IDictionary values, IDictionary oldValues) +1512
| > | System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary
| > values,
| > | IDictionary oldValues, DataSourceViewOperationCallback callback) +179
| > | System.Web.UI.WebControls.DetailsView.HandleUpdate(String
commandArg,
| > | Boolean causesValidation) +1197
| > | System.Web.UI.WebControls.DetailsView.HandleEvent(EventArgs e,
Boolean
| > | causesValidation, String validationGroup) +545
| > | System.Web.UI.WebControls.DetailsView.OnBubbleEvent(Object source,
| > | EventArgs e) +162
| > | System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs
args)
| > +56
| > | System.Web.UI.WebControls.DetailsViewRow.OnBubbleEvent(Object
source,
| > | EventArgs e) +117
| > | System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs
args)
| > +56
| > | System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
+106
| > | System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
| > | eventArgument) +175
| > |
| > |
| >
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.Rai
| > sePostBackEvent(String eventArgument) +31
| > | System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
| > | sourceControl, String eventArgument) +32
| > | System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
postData)
| > +244
| > | System.Web.UI.
| > | -------------------------------------------
| > |
| > |
| > | So why when using the wizards would this happen, how do i solve this
and
| > | move on....
| > |
| > | Tdar
| > |
| > |
| > |
| > |
| >
| >
|
 
T

TdarTdar

Here is some test data,
==========================
"ShipKey","DBMANTransNumber","CreatedDate","PackagedDate","UserId","CarrierCode","LocationCode","ShippingServiceID","ShipInsuranceID","OrderTypeRWC","SignatureReq","HighValueFlag","ShipCost","OrderTotal","ChinaSurcharges","CrystalSurcharges","OtherSurcharges","Order_StaffKeyID","Paid","ShiptoCompany","ShiptoName","ShipToAddress","ShipToAddress2","ShipCity","ShipCountry","ShipState","ZipCode","SignRqByPassReport","Final_CarrierCode","Final_ShippingServiceID","Final_NumPkgs","Final_ShipCost","Final_DeclaredValue","Final_CODAmount","Final_Zone","Final_FreightCharge","Final_Weight","Final_ShipDate","UPS_ShipCost","UPS_Signature","UPS_Delivered","UPS_DeliveredDate","Org_Company","Org_Name","Org_Address","Org_City","Org_State","Org_Zip","ORG_DbmanShipmtd","ORG_dbmanShipMNW","ORG_DBMANsalesCode","ORG_2ndODRTot","org_shiptran1","org_airbill1","Org_Airbill2","Org_SplitODRStus","ORG_PakDate","ORG_PakDate2","DBMAN_STATUS","DBMANSURCHARGES","EMAIL","Breakable","DBMAN_OrderTotal","ORG_DEPARTMENT","ORG_PREMIUMBR","CODE","APPRSCDE"
{69674EDE-17EE-4A95-9132-566E8A82D20D},"941823",2006-01-13
15:32:46.953000000,,{2F59D715-99DE-430B-BAAC-FE9752C1A3C7},"C","S","2","","R",,,,,,,,"",,"JOAN","ttt","2
test ln","",224,1,21,"21208",,"","",,,,,"",,"",,,"",,,"JOAN","ttt","2 test
ln","BALTIMORE","MD","21208","2","2","i
","0.00","941823-1","1ZEtest2","","Y ","10/14/05"," / /
","PAID","0.00","(e-mail address removed)",,"177.25","S","0.00",False,""
{642C1827-B3E9-4C76-8679-5DAB622661C2},"509391",2006-01-18
10:41:04.543000000,,{2F59D715-99DE-430B-BAAC-FE9752C1A3C7},"C","S","5","","C",,,,,,,,"",,"BETH","ewr","3
test ln","",54,1,10,"33709",,"","",,,,,"",,"",,,"",,,"BETH","ewr","3 test
ln","SAINT PETERSBURG","FL","33709","U","5","S
","93.00","509391","",""," "," / / "," / /
","MEMO","0.00","",,"93.00","S","0.00",False,""
{E750B1A5-362B-4434-A0FC-CBE29EDFDF28},"499179",2006-01-18
10:41:12.793000000,,{2F59D715-99DE-430B-BAAC-FE9752C1A3C7},"C","S","5","","R",,,,,,,,"",,"DAVID","wew","10
10 TEST LN","",14,1,10,"33770",,"","",,,,,"",,"",,,"",,,"DAVID","wew","10 10
TEST LN","LARGO","FL","33770","X","5","S ","53.29","499179","","","
"," / / "," / / ","CHECK
COMING","0.00","(e-mail address removed)",,"53.29","S","0.00",True,""
{58EEE24C-402C-4C44-B2E1-D055CB10A221},"509401",2006-01-13
12:52:53.173000000,,{2F59D715-99DE-430B-BAAC-FE9752C1A3C7},"C","S","C","","C",,,,,,,,"",,"BETH","wer","11
test ln","",54,1,10,"33709",,"","",,,,,"",,"",,,"",,,"BETH","wer","11 test
ln","SAINT PETERSBURG","FL","33709","C","C","S
","199.00","509401","",""," "," / / "," / / ","C.O.D.
CHECK","0.00","",,"199.00","S","0.00",False,""
=======================

Yes it is large, but that is a temporary thing untill
we totally move into .net 2 techenology from some old dos based system.
I do see ObjectDataSource's DataObjectTypeName to "System.Guid that however
I did not do that the .net 2 wizard did as i said below I am just using the
wizards
to make this happen and it should just work, but does not. I am using
windows sql 2k
if that makes any differance.



Steven Cheng said:
Hi Tdar,

I've just tried the dataset xml and db script you provided, seems the table
structure is very large which contains lots of columns, I can't quite get
how to fill some test data. If convenient would you also attache some test
data to me?

Also ,based on the ASP.NET page's aspx template you provided, I found that
you set the ObjectDataSource's DataObjectTypeName to "System.Guid", this
is incorrect since ObjectDataSource.DataObjectTypeName should be configured
to a type which contains the Properties that can mapped to all the
parameters in your update, insert methods....
You can view the description in the MSDN document:

#ObjectDataSource.DataObjectTypeName Property
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdat
asource.dataobjecttypename.aspx

So for your scenario I think the DataObjectTypeName should be configured to
"DJP_DataSet1.OrderShipRecordRow" ...

You can have a look , if 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.)




--------------------
| Thread-Topic: detailsview,
| thread-index: AcYatwcMewVhKBVrRJq376XEWAmeyA==
| X-WBNR-Posting-Host: 24.73.223.27
| From: "=?Utf-8?B?VGRhclRkYXI=?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: detailsview,
| Date: Mon, 16 Jan 2006 08:08:02 -0800
| Lines: 598
| 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.webcontrols
| 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.webcontrols:32507
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
|
| Hi, as I said i used the wizards, and yes
| > when try performing
| > update operation, there raise some exception indicate that the certain
| > class lack of certain properties... yes?
|
| DJP_Dataset1:
| ====================
| <?xml version="1.0" encoding="utf-8"?>
| <xs:schema id="DJP_DataSet1"
| targetNamespace="http://tempuri.org/DJP_DataSet1.xsd"
| xmlns:mstns="http://tempuri.org/DJP_DataSet1.xsd"
| xmlns="http://tempuri.org/DJP_DataSet1.xsd"
| xmlns:xs="http://www.w3.org/2001/XMLSchema"
| xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
| xmlns:msprop="urn:schemas-microsoft-com:xml-msprop"
| attributeFormDefault="qualified" elementFormDefault="qualified">
| <xs:annotation>
| <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
| <DataSource DefaultConnectionIndex="0"
| FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout,
AnsiClass,
| Class, Public" SchemaSerializationMode="IncludeSchema"
| xmlns="urn:schemas-microsoft-com:xml-msdatasource">
| <Connections>
| <Connection AppSettingsObjectName="Web.config"
| AppSettingsPropertyName="SilverQueen_Main_SystemConnectionString1"
| ConnectionStringObject="" IsAppSettingsProperty="True"
Modifier="Assembly"
| Name="SilverQueen_Main_SystemConnectionString1 (Web.config)"
| ParameterPrefix="@"
|
PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.Con
nectionStrings.SilverQueen_Main_SystemConnectionString1.ConnectionString"
| Provider="System.Data.SqlClient">
| </Connection>
| </Connections>
| <Tables>
| <TableAdapter BaseClass="System.ComponentModel.Component"
| DataAccessorModifier="AutoLayout, AnsiClass, Class, Public"
| DataAccessorName="OrderShipRecordTableAdapter"
| GeneratorDataComponentClassName="OrderShipRecordTableAdapter"
| Name="OrderShipRecord"
UserDataComponentName="OrderShipRecordTableAdapter">
| <MainSource>
| <DbSource
| ConnectionRef="SilverQueen_Main_SystemConnectionString1 (Web.config)"
| DbObjectName="SilverQueen_Main_System.dbo_OrderShipRecord"
| DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill"
| GenerateMethods="Both" GenerateShortCommands="True"
| GeneratorGetMethodName="GetData" GeneratorSourceName="Fill"
| GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset"
| ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0,
Culture=neutral,
| PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False"
| UserGetMethodName="GetData" UserSourceName="Fill">
| <DeleteCommand>
| <DbCommand CommandType="Text" ModifiedByUser="False">
| <CommandText>DELETE FROM [OrderShipRecord] WHERE
| (([ShipKey] = @Original_ShipKey))</CommandText>
| <Parameters>
| <Parameter AllowDbNull="False" AutogeneratedName=""
| DataSourceName="" DbType="Guid" Direction="Input"
| ParameterName="@Original_ShipKey" Precision="0"
| ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="ShipKey"
| SourceColumnNullMapping="False" SourceVersion="Original">
| </Parameter>
| </Parameters>
| </DbCommand>
| </DeleteCommand>
| <SelectCommand>
| <DbCommand CommandType="Text" ModifiedByUser="True">
| <CommandText>SELECT DBMANTransNumber, UserId,
| ShiptoCompany, ShiptoName, ShipToAddress, ShipToAddress2, ShipCity,
| ShipCountry, ShipState, ZipCode,
| SignatureReq, ShipKey
| FROM OrderShipRecord
| WHERE (ShipKey = @ShipKey)</CommandText>
| <Parameters>
| <Parameter AllowDbNull="False"
| AutogeneratedName="ShipKey" ColumnName="ShipKey"
| DataSourceName="SilverQueen_Main_System.dbo_OrderShipRecord"
| DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input"
| ParameterName="@ShipKey" Precision="0" ProviderType="UniqueIdentifier"
| Scale="0" Size="16" SourceColumn="ShipKey"
SourceColumnNullMapping="False"
| SourceVersion="Current">
| </Parameter>
| </Parameters>
| </DbCommand>
| </SelectCommand>
| <UpdateCommand>
| <DbCommand CommandType="Text" ModifiedByUser="False">
| <CommandText>UPDATE [OrderShipRecord] SET
| [DBMANTransNumber] = @DBMANTransNumber, [UserId] = @UserId,
[ShiptoCompany] =
| @ShiptoCompany, [ShiptoName] = @ShiptoName, [ShipToAddress] =
@ShipToAddress,
| [ShipToAddress2] = @ShipToAddress2, [ShipCity] = @ShipCity, [ShipCountry]
=
| @ShipCountry, [ShipState] = @ShipState, [ZipCode] = @ZipCode,
[SignatureReq]
| = @SignatureReq, [ShipKey] = @ShipKey WHERE (([ShipKey] =
| @Original_ShipKey))</CommandText>
| <Parameters>
| <Parameter AllowDbNull="False" AutogeneratedName=""
| DataSourceName="" DbType="String" Direction="Input"
| ParameterName="@DBMANTransNumber" Precision="0" ProviderType="NVarChar"
| Scale="0" Size="0" SourceColumn="DBMANTransNumber"
| SourceColumnNullMapping="False" SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="False" AutogeneratedName=""
| DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@UserId"
| Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0"
| SourceColumn="UserId" SourceColumnNullMapping="False"
SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="String" Direction="Input"
| ParameterName="@ShiptoCompany" Precision="0" ProviderType="NVarChar"
| Scale="0" Size="0" SourceColumn="ShiptoCompany"
| SourceColumnNullMapping="False" SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="String" Direction="Input"
| ParameterName="@ShiptoName" Precision="0" ProviderType="NVarChar"
Scale="0"
| Size="0" SourceColumn="ShiptoName" SourceColumnNullMapping="False"
| SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="String" Direction="Input"
| ParameterName="@ShipToAddress" Precision="0" ProviderType="NVarChar"
| Scale="0" Size="0" SourceColumn="ShipToAddress"
| SourceColumnNullMapping="False" SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="String" Direction="Input"
| ParameterName="@ShipToAddress2" Precision="0" ProviderType="NVarChar"
| Scale="0" Size="0" SourceColumn="ShipToAddress2"
| SourceColumnNullMapping="False" SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@ShipCity"
| Precision="0" ProviderType="Int" Scale="0" Size="0"
SourceColumn="ShipCity"
| SourceColumnNullMapping="False" SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="Int32" Direction="Input"
| ParameterName="@ShipCountry" Precision="0" ProviderType="Int" Scale="0"
| Size="0" SourceColumn="ShipCountry" SourceColumnNullMapping="False"
| SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@ShipState"
| Precision="0" ProviderType="Int" Scale="0" Size="0"
SourceColumn="ShipState"
| SourceColumnNullMapping="False" SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="String" Direction="Input"
ParameterName="@ZipCode"
| Precision="0" ProviderType="NVarChar" Scale="0" Size="0"
| SourceColumn="ZipCode" SourceColumnNullMapping="False"
| SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="True" AutogeneratedName=""
| DataSourceName="" DbType="Boolean" Direction="Input"
| ParameterName="@SignatureReq" Precision="0" ProviderType="Bit" Scale="0"
| Size="0" SourceColumn="SignatureReq" SourceColumnNullMapping="False"
| SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="False" AutogeneratedName=""
| DataSourceName="" DbType="Guid" Direction="Input"
ParameterName="@ShipKey"
| Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0"
| SourceColumn="ShipKey" SourceColumnNullMapping="False"
| SourceVersion="Current">
| </Parameter>
| <Parameter AllowDbNull="False" AutogeneratedName=""
| DataSourceName="" DbType="Guid" Direction="Input"
| ParameterName="@Original_ShipKey" Precision="0"
| ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="ShipKey"
| SourceColumnNullMapping="False" SourceVersion="Original">
| </Parameter>
| </Parameters>
| </DbCommand>
| </UpdateCommand>
| </DbSource>
| </MainSource>
| <Mappings>
| <Mapping SourceColumn="DBMANTransNumber"
| DataSetColumn="DBMANTransNumber" />
| <Mapping SourceColumn="UserId" DataSetColumn="UserId" />
| <Mapping SourceColumn="ShiptoCompany"
| DataSetColumn="ShiptoCompany" />
| <Mapping SourceColumn="ShiptoName"
DataSetColumn="ShiptoName" />
| <Mapping SourceColumn="ShipToAddress"
| DataSetColumn="ShipToAddress" />
| <Mapping SourceColumn="ShipToAddress2"
| DataSetColumn="ShipToAddress2" />
| <Mapping SourceColumn="ShipCity" DataSetColumn="ShipCity" />
| <Mapping SourceColumn="ShipCountry"
| DataSetColumn="ShipCountry" />
| <Mapping SourceColumn="ShipState" DataSetColumn="ShipState"
/>
| <Mapping SourceColumn="ZipCode" DataSetColumn="ZipCode" />
| <Mapping SourceColumn="SignatureReq"
| DataSetColumn="SignatureReq" />
| <Mapping SourceColumn="ShipKey" DataSetColumn="ShipKey" />
| </Mappings>
| <Sources>
| </Sources>
| </TableAdapter>
| </Tables>
| <Sources>
| </Sources>
| </DataSource>
| </xs:appinfo>
| </xs:annotation>
| <xs:element name="DJP_DataSet1" msdata:IsDataSet="true"
| msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="DJP_DataSet1"
| msprop:Generator_DataSetName="DJP_DataSet1">
| <xs:complexType>
| <xs:choice minOccurs="0" maxOccurs="unbounded">
| <xs:element name="OrderShipRecord"
| msprop:Generator_UserTableName="OrderShipRecord"
| msprop:Generator_RowDeletedName="OrderShipRecordRowDeleted"
| msprop:Generator_RowChangedName="OrderShipRecordRowChanged"
| msprop:Generator_RowClassName="OrderShipRecordRow"
| msprop:Generator_RowChangingName="OrderShipRecordRowChanging"
| msprop:Generator_RowEvArgName="OrderShipRecordRowChangeEvent"
| msprop:Generator_RowEvHandlerName="OrderShipRecordRowChangeEventHandler"
| msprop:Generator_TableClassName="OrderShipRecordDataTable"
| msprop:Generator_TableVarName="tableOrderShipRecord"
 

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

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,744
Latest member
CortneyMcK

Latest Threads

Top