PC Review


Reply
Thread Tools Rate Thread

Delete Error in (almost) standard GridView command field

 
 
B. Chernick
Guest
Posts: n/a
 
      17th Jan 2008
I have a rather unusual project. I'm supposed to create a VB/Dot Net 2.0 web
app that uses FoxPro 6 tables.

I'm using an XSD and Object Data Sources. I've gotten it to the point where
I can reasonably say I know how to do updates and inserts. Now I have a main
page with a Gridview bound to an ODS. I want to add the standard Delete
command field. Everything is set up correctly so far as I can tell. (The
Delete statement is in the XSD table adapter. The ODS on the page recognizes
the Delete call. The parameter is declared, in the xsd and in the ODS. The
key field used as a parameter is not only visible in the grid row, it's
extracted and used as a query string parameter in a hyperlink in the same
row, so the data is most definitely available.)

But when I click the Delete, I get the error:

Value cannot be null.
Parameter name: oid
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.ArgumentNullException: Value cannot be null.
Parameter name: oid

Source Error:


Line 11918: Public Overloads Overridable Function Delete(ByVal oid As
String) As Integer
Line 11919: If (oid Is Nothing) Then
Line 11920: Throw New
Global.System.ArgumentNullException("oid")
Line 11921: Else
Line 11922: Me.Adapter.DeleteCommand.Parameters(0).Value =
CType(oid,String)

Source File: C:\Data\Visual Studio
2005\Projects\FoxProOrderEntrySystem3\FoxProOrderEntrySystem3\FoxPro1.Designer.vb Line: 11920

----------------------

What else could I be forgetting? What could be keeping the value from the
function call?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Button To Delete Text In Single Field In Record dan.cawthorne@gmail.com Microsoft Access Form Coding 2 3rd Aug 2007 06:46 PM
Creating a Child Process with access to Standard Out, Standard In, and Standard Error patrick.ohara@cognex.com Microsoft Dot NET Compact Framework 3 15th Jun 2007 09:34 PM
SelectText property of command field in GridView control BillE Microsoft ASP .NET 1 11th Sep 2006 06:57 PM
Confirmation for delete command on gridview Steve Microsoft ASP .NET 1 2nd Dec 2005 02:56 PM
Gridview with combobox whose data is dependent on field in gridview wallermj@hotmail.com Microsoft ASP .NET 3 21st Nov 2005 05:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:30 PM.