473,411 Members | 2,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Could not find a non-generic method - VB - ASP.NET

Hi Everybody I have the error (ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdatePre' that has parameters: Comp, Job_Number, Request_Date, Customer, Contact_Name, Tel, Email, Media, Job_Size, Colors, Number_of_Lots, Proof, Job_Detail, PrepressID) when I tried to update the values in my dataset. (before I had the problem to Insert and Delete and I changed OldValuesParameterFormatString="original_{0}" to OldValuesParameterFormatString="{0}" and it worked fine for Insert and Delete but I am still getting this error when I try to update values in my dataset with a Gridview).

I use a dataset (TableAdapter Prepress_Request_Form) connected to a MSDE Server and with a SQLOLEDB connection.



The PrimaryKey is PrepressID and my Methods of my dataset are the followings:



1)GetPre()

SELECT Prepress_Request_Form.*
FROM Prepress_Request_Form



2)DeletePre()

DELETE FROM [Prepress_Request_Form] WHERE (([PrepressID] = ?))



3) InsertPre()

INSERT INTO [Prepress_Request_Form] ([Comp], [Job_Number], [Request_Date], [Customer], [Contact_Name], [Tel], [email], [Media], [Job_Size], [Colors], [Number_of_Lots], [Proof], [Job_Detail]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)



4)UpdatePre()

UPDATE [Prepress_Request_Form] SET [Comp] = ?, [Job_Number] = ?, [Request_Date] = ?, [Customer] = ?, [Contact_Name] = ?, [Tel] = ?, [email] = ?, [Media] = ?, [Job_Size] = ?, [Colors] = ?, [Number_of_Lots] = ?, [Proof] = ?, [Job_Detail] = ? WHERE (([PrepressID] = ?))



Here is my code:
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Edit.aspx.vb" Inherits="Edit" %>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml" >
  6.  
  7. <head runat="server">
  8.  
  9. <title>Untitled Page</title>
  10.  
  11. </head>
  12.  
  13. <body>
  14.  
  15. <form id="form1" runat="server">
  16.  
  17. <div>
  18.  
  19. <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeletePre"
  20.  
  21. InsertMethod="InsertPre" OldValuesParameterFormatString="{0}" SelectMethod="GetPre"
  22.  
  23. TypeName="TestTableAdapters.Prepress_Request_FormTableAdapter" UpdateMethod="UpdatePre">
  24.  
  25. <DeleteParameters>
  26.  
  27. <asp:Parameter Name="PrepressID" Type="Int32" />
  28.  
  29. </DeleteParameters>
  30.  
  31. <UpdateParameters>
  32.  
  33. <asp:Parameter Name="Comp" Type="Int32" />
  34.  
  35. <asp:Parameter Name="Job_Number" Type="Int32" />
  36.  
  37. <asp:Parameter Name="Request_Date" Type="DateTime" />
  38.  
  39. <asp:Parameter Name="Customer" Type="String" />
  40.  
  41. <asp:Parameter Name="Contact_Name" Type="String" />
  42.  
  43. <asp:Parameter Name="Tel" Type="String" />
  44.  
  45. <asp:Parameter Name="Email" Type="String" />
  46.  
  47. <asp:Parameter Name="Media" Type="String" />
  48.  
  49. <asp:Parameter Name="Job_Size" Type="String" />
  50.  
  51. <asp:Parameter Name="Colors" Type="String" />
  52.  
  53. <asp:Parameter Name="Number_of_Lots" Type="String" />
  54.  
  55. <asp:Parameter Name="Proof" Type="String" />
  56.  
  57. <asp:Parameter Name="Job_Detail" Type="String" />
  58.  
  59. <asp:Parameter Name="PrepressID" Type="Int32" />
  60.  
  61. </UpdateParameters>
  62.  
  63. <InsertParameters>
  64.  
  65. <asp:Parameter Name="Comp" Type="Int32" />
  66.  
  67. <asp:Parameter Name="Job_Number" Type="Int32" />
  68.  
  69. <asp:Parameter Name="Request_Date" Type="DateTime" />
  70.  
  71. <asp:Parameter Name="Customer" Type="String" />
  72.  
  73. <asp:Parameter Name="Contact_Name" Type="String" />
  74.  
  75. <asp:Parameter Name="Tel" Type="String" />
  76.  
  77. <asp:Parameter Name="Email" Type="String" />
  78.  
  79. <asp:Parameter Name="Media" Type="String" />
  80.  
  81. <asp:Parameter Name="Job_Size" Type="String" />
  82.  
  83. <asp:Parameter Name="Colors" Type="String" />
  84.  
  85. <asp:Parameter Name="Number_of_Lots" Type="String" />
  86.  
  87. <asp:Parameter Name="Proof" Type="String" />
  88.  
  89. <asp:Parameter Name="Job_Detail" Type="String" />
  90.  
  91. </InsertParameters>
  92.  
  93. </asp:ObjectDataSource>
  94.  
  95.  
  96. </div>
  97.  
  98. <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="PrepressID"
  99.  
  100. DataSourceID="ObjectDataSource1" DefaultMode="Insert" Height="50px" Width="125px">
  101.  
  102. <Fields>
  103.  
  104. <asp:BoundField DataField="PrepressID" HeaderText="PrepressID" InsertVisible="False"
  105.  
  106. ReadOnly="True" SortExpression="PrepressID" />
  107.  
  108. <asp:BoundField DataField="Comp" HeaderText="Comp" SortExpression="Comp" />
  109.  
  110. <asp:BoundField DataField="Job_Number" HeaderText="Job_Number" SortExpression="Job_Number" />
  111.  
  112. <asp:BoundField DataField="Request_Date" HeaderText="Request_Date" SortExpression="Request_Date" />
  113.  
  114. <asp:BoundField DataField="Customer" HeaderText="Customer" SortExpression="Customer" />
  115.  
  116. <asp:BoundField DataField="Contact_Name" HeaderText="Contact_Name" SortExpression="Contact_Name" />
  117.  
  118. <asp:BoundField DataField="Tel" HeaderText="Tel" SortExpression="Tel" />
  119.  
  120. <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
  121.  
  122. <asp:BoundField DataField="Media" HeaderText="Media" SortExpression="Media" />
  123.  
  124. <asp:BoundField DataField="Job_Size" HeaderText="Job_Size" SortExpression="Job_Size" />
  125.  
  126. <asp:BoundField DataField="Colors" HeaderText="Colors" SortExpression="Colors" />
  127.  
  128. <asp:BoundField DataField="Number_of_Lots" HeaderText="Number_of_Lots" SortExpression="Number_of_Lots" />
  129.  
  130. <asp:BoundField DataField="Proof" HeaderText="Proof" SortExpression="Proof" />
  131.  
  132. <asp:BoundField DataField="Job_Detail" HeaderText="Job_Detail" SortExpression="Job_Detail" />
  133.  
  134. <asp:CommandField ShowInsertButton="True" />
  135.  
  136. </Fields>
  137.  
  138. </asp:DetailsView>
  139.  
  140. <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="PrepressID"
  141.  
  142. DataSourceID="ObjectDataSource1">
  143.  
  144. <Columns>
  145.  
  146. <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
  147.  
  148. <asp:BoundField DataField="PrepressID" HeaderText="PrepressID" InsertVisible="False"
  149.  
  150. ReadOnly="True" SortExpression="PrepressID" />
  151.  
  152. <asp:BoundField DataField="Comp" HeaderText="Comp" SortExpression="Comp" />
  153.  
  154. <asp:BoundField DataField="Job_Number" HeaderText="Job_Number" SortExpression="Job_Number" />
  155.  
  156. <asp:BoundField DataField="Request_Date" HeaderText="Request_Date" SortExpression="Request_Date" />
  157.  
  158. <asp:BoundField DataField="Customer" HeaderText="Customer" SortExpression="Customer" />
  159.  
  160. <asp:BoundField DataField="Contact_Name" HeaderText="Contact_Name" SortExpression="Contact_Name" />
  161.  
  162. <asp:BoundField DataField="Tel" HeaderText="Tel" SortExpression="Tel" />
  163.  
  164. <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
  165.  
  166. <asp:BoundField DataField="Media" HeaderText="Media" SortExpression="Media" />
  167.  
  168. <asp:BoundField DataField="Job_Size" HeaderText="Job_Size" SortExpression="Job_Size" />
  169.  
  170. <asp:BoundField DataField="Colors" HeaderText="Colors" SortExpression="Colors" />
  171.  
  172. <asp:BoundField DataField="Number_of_Lots" HeaderText="Number_of_Lots" SortExpression="Number_of_Lots" />
  173.  
  174. <asp:BoundField DataField="Proof" HeaderText="Proof" SortExpression="Proof" />
  175.  
  176. <asp:BoundField DataField="Job_Detail" HeaderText="Job_Detail" SortExpression="Job_Detail" />
  177.  
  178. </Columns>
  179.  
  180. </asp:GridView>
  181.  
  182. </form>
  183.  
  184. </body>
  185.  
  186. </html>


Any Idea please will be very appreciated.

Thank you very much!!
Jan 17 '08 #1
1 1758
stepterr
157 100+
This might help you a bit. Check out this site
Jan 18 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Ryan Paul | last post by:
I've spent a lot of time using python, and personally, I feel like it is vastly superior when compared to languages like java, and c++, but there are still a few things that detract from its...
10
by: Steven T. Hatton | last post by:
Stroustrup says this: http://www.research.att.com/~bs/bs_faq2.html#macro "So, what's wrong with using macros?" "And yes, I do know that there are things known as macros that doesn't...
4
by: simduss | last post by:
Hi, First of all, I'm a beginner with Unix. I have a "make" (Unix command) problem with a Pro*C sub-program since I installed Oracle8i (before I was at 7.3.4). I have a script builder that...
1
by: JP Lacasse | last post by:
I translate a web application from ASP to ASP.NET and I keep getting the following error: Could not find installable ISA I used the same ConnectString ("DBQ=" &...
2
by: semedao | last post by:
Hi All, I developed Outlook add-in with VS 2005 , everything work fine , until the machine reboot unnormally , when I opened the solution again many projects was not there ! (I have more then...
4
by: Rollasoc | last post by:
Hi, We have a range of four products that can talk to our software (Written in C# & managed C++) via ethernet. Using standard socket class. This has all been working fine for a long time now,...
3
by: Amritha.Datta | last post by:
Can anyone tell me why the below code returns error? Exception Details: System.IO.FileNotFoundException: Could not find file Dim strLFolder As String = "c:\Temp\F Files" Dim intClientID As...
18
by: Neehar | last post by:
Hello For one of the interviews I took recently, I was given an offline programming quiz. In 30 minutes I had to write code in C++ to counts the number of times each unique word appears in a...
3
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On...
12
by: webinfinite | last post by:
#define D(y...) (const int ) {y} My understand is that D is taking in a various length parameter y which is an array of const int. Am I right? Thanks.
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.