Re: Instantiating a form's dataset

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 10/12/04


Date: Tue, 12 Oct 2004 10:33:10 -0400

Esteban404,

    Is ds1 a DataSet? If so, you have to pass the table in the data set to
the data view. You can't just cast a data set (or data table for that
matter) to a DataView. The view encapsulates the DataTable, not extends it.

    Hope this helps.

-- 
               - Nicholas Paldino [.NET/C# MVP]
               - mvp@spam.guard.caspershouse.com
"Esteban404" <Esteban404@discussions.microsoft.com> wrote in message 
news:6D5E4653-DB7A-4CE2-A239-81292563D42C@microsoft.com...
> The DataView was not being handled at all in the class, it just passed
> through the try block as though it had an error and never processed (no 
> error
> message, just no results). Looking closer, the try block and class
> constructor don't have a method to process it. Thanks for the reply,
> Mohamoss, I should have seen it sooner.
>
> E.
>
> "Mohamoss" wrote:
>
>> Hi
>>  why did it fail , what is the error message ?
>>  did you create  a construcor on your  rmPreview class that take dataview
>> object as an input paramter, also you need to save that input param that
>> you get from the constructor in private dataview inside that class . if 
>> you
>> already have that please explain more what is the error that you get
>> Mohamed Mahfouz
>> MEA Developer Support Center
>> ITworx on behalf of Microsoft EMEA GTSC
>>
>> 


Relevant Pages

  • RE: Instantiating a forms dataset
    ... The DataView was not being handled at all in the class, ... Mohamoss, I should have seen it sooner. ... > object as an input paramter, also you need to save that input param that ... > you get from the constructor in private dataview inside that class. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Can I use "Session" inside a user control ?
    ... Perhaps you're doing this too early in the control's lifetime, like in the constructor? ... public void whatever ... DataView dw; if { ...
    (microsoft.public.dotnet.framework.aspnet)