ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateSearch' that has parameters: DepositoryId, TimeStamp, TransferDate, AccountName, Quantity, DepositoryTransactionId.
My Update Querry:
UPDATE DepositoryTransactions
SET DepositoryId = @DepositoryId, TimeStamp = @TimeStamp, TransferDate = @TransferDate
WHERE (DepositoryTransactionId = @DepositoryTransactionId)
I dont understand why it requires extra column name AccountName, Quantity which is neither in my querry nor in my Update parameter in objectdatasource.
please help
If(This is what u looking for)
Mark Answer Help Others;
else
I am sorry I didn't understand your problem;
ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateSearch' that has parameters: DepositoryId, TimeStamp, TransferDate, AccountName, Quantity, DepositoryTransactionId.
Hi,
This error means that your defination of the bound function has these functions' paramters. But your UpdateParameters lack of these parameters. So:
1) Either remove the "duplicated" parameters defined in the update function.
2) Either add these parameters in the UpdateParameters.
alam.net
Member
140 Points
47 Posts
ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateSearch' that has ...
Jan 25, 2013 12:03 PM|LINK
ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateSearch' that has parameters: DepositoryId, TimeStamp, TransferDate, AccountName, Quantity, DepositoryTransactionId.
My Update Querry:
UPDATE DepositoryTransactions
SET DepositoryId = @DepositoryId, TimeStamp = @TimeStamp, TransferDate = @TransferDate
WHERE (DepositoryTransactionId = @DepositoryTransactionId)
My ObjectDataSource:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DeleteMethod="Delete"
onselecting="ObjectDataSource1_Selecting" SelectMethod="GetSearchData"
TypeName="ShareTransactionsTableAdapters.DepositoryTransactionsTableAdapter"
UpdateMethod="UpdateSearch" >
<UpdateParameters>
<asp:Parameter DbType="Guid" Name="DepositoryId" />
<asp:Parameter Name="TimeStamp" Type="DateTime" />
<asp:Parameter Name="TransferDate" Type="DateTime" />
<asp:Parameter DbType="Guid" Name="DepositoryTransactionId" />
</UpdateParameters>
<SelectParameters>
<asp:Parameter Name="Condition" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
I dont understand why it requires extra column name AccountName, Quantity which is neither in my querry nor in my Update parameter in objectdatasource.
please help
Mark Answer Help Others;
else
I am sorry I didn't understand your problem;
goel.ankit
Contributor
2531 Points
513 Posts
Re: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateSearch' that ...
Jan 25, 2013 12:11 PM|LINK
key must lie in UpdateSearch method, Can you please share you method signature.
Ankit
(Please select 'Mark as Answer' if my response has helped you.)
alam.net
Member
140 Points
47 Posts
Re: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateSearch' that ...
Jan 25, 2013 12:17 PM|LINK
Hi Ankit
I am using data set and UpdateSearch is a Querry, how could I get method signature...?
Mark Answer Help Others;
else
I am sorry I didn't understand your problem;
sukanta
Member
459 Points
130 Posts
Re: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateSearch' that ...
Jan 25, 2013 12:32 PM|LINK
post ur UpdateSearch( ) method defination?
oned_gk
All-Star
31655 Points
6470 Posts
Re: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateSearch' that ...
Jan 25, 2013 12:34 PM|LINK
alam.net
Member
140 Points
47 Posts
Re: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateSearch' that ...
Jan 25, 2013 01:31 PM|LINK
<DbSource ConnectionRef="NewTransConnectionString (Web.config)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="UpdateSearch" Modifier="Public" Name="UpdateSearch" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy2" UserSourceName="UpdateSearch">
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>UPDATE DepositoryTransactions
SET DepositoryId = @DepositoryId, TimeStamp = @TimeStamp, TransferDate = @TransferDate
WHERE (DepositoryTransactionId = @DepositoryTransactionId)</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="DepositoryId" ColumnName="DepositoryId" DataSourceName="Sharetrans.dbo.DepositoryTransactions" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@DepositoryId" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="DepositoryId" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="TimeStamp" ColumnName="TimeStamp" DataSourceName="Sharetrans.dbo.DepositoryTransactions" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@TimeStamp" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="TimeStamp" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="TransferDate" ColumnName="TransferDate" DataSourceName="Sharetrans.dbo.DepositoryTransactions" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@TransferDate" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="TransferDate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="DepositoryTransactionId" ColumnName="DepositoryTransactionId" DataSourceName="Sharetrans.dbo.DepositoryTransactions" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@DepositoryTransactionId" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="DepositoryTransactionId" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
Mark Answer Help Others;
else
I am sorry I didn't understand your problem;
alam.net
Member
140 Points
47 Posts
Re: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateSearch' that ...
Jan 25, 2013 01:44 PM|LINK
Hi oned_gk yes I am binding column but want to update selected column...
Mark Answer Help Others;
else
I am sorry I didn't understand your problem;
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateSearch' that ...
Jan 27, 2013 12:46 AM|LINK
Hi,
This error means that your defination of the bound function has these functions' paramters. But your UpdateParameters lack of these parameters. So:
1) Either remove the "duplicated" parameters defined in the update function.
2) Either add these parameters in the UpdateParameters.
alam.net
Member
140 Points
47 Posts
Re: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateSearch' that ...
Jan 28, 2013 04:52 AM|LINK
Hey thanks oned_gk.. I got it I just removed bound field and used eval that solved my problem (Y)
thanks a lot
Mark Answer Help Others;
else
I am sorry I didn't understand your problem;