Adding a dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a project with the namespace "Rota" and added an XML file with the
second line( after the version and encoding) <Rota xmlns"Http\\....etc"/>. I
then created a schema and dragged a DataSet onto the main form of the
project. The pop up window offered me the name Rota.Rota, so accepted it.
It created a dataset object called rota1 in the component tray, but my
program doesn't recognise the name "Rota". I get the message "The name Rota
is not recognised in the namespace Rota.Rota. Are you missing a ref....etc."

What have I done wrong?

As you can probably imagine, I am VERY new to programming, so any help would
be much appreciated.
 
Hi
Try to witch to code file and see the initialization of the dataset. give
it the full path . ie the namespace then the name of the class created for
your typed dataset.( under your xsd file you will find a CS file that
include the implementioan for your dataset ' I will dump an example at the
end of the post ) get the name of the class ( for that is the name that you
use for your instance )
So you call it private namespace_name. the_set_class_name myset ;
For example if you have a class named trail in namespace all then you will
have to define the dataset as
Private all.trial mydastset ;
Here you are what the class should look like
public class trial : DataSet { \\ it inhiret from dataset (and this is //
the name you need to use

private rowDataTable tablerow;

public xml() {
// it should be a reasnabaly long class…..
….
….
hope this was clear
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 
Back
Top