Dataset Disappeares! 
Author Message
 Dataset Disappeares!

I have a normal WinForm with a number of buttons, text boxes, and a grid.
The form is named "pos_screen". I also have a dataset named "t_line.xsd"

When I add a dataset to the form, and select t_line.xsd, everything seems to
work fine.
But when I go to compile it, I get an error "Type 'pos_screen.t_line' is not
defined".

If  I change the line from "Me.T_line1 = New pos_screen.t_line()" to
"Me.T_line1 = New t_line()" everything will compile. It wont stay that way
for long however, and inevitably I need to re-edit the code again.

Any ideas? I've checked Google but haven't found an answer.

Thanks in advance,
Marc

P.S. There is a strong chance that before I read any reply on this I'll have
jumped out a window. This is driving me nuts today. :)



Tue, 08 Feb 2005 04:30:27 GMT  
 Dataset Disappeares!
A DataSet is an object. Why would you put a period in the variable name for
it? This is probably what is confusing the compiler.

--
Kevin Spencer
Microsoft FrontPage MVP
Internet Programmer
For ASP Tutorials and Information -
http://www.takempis.com



Quote:
> I have a normal WinForm with a number of buttons, text boxes, and a grid.
> The form is named "pos_screen". I also have a dataset named "t_line.xsd"

> When I add a dataset to the form, and select t_line.xsd, everything seems
to
> work fine.
> But when I go to compile it, I get an error "Type 'pos_screen.t_line' is
not
> defined".

> If  I change the line from "Me.T_line1 = New pos_screen.t_line()" to
> "Me.T_line1 = New t_line()" everything will compile. It wont stay that way
> for long however, and inevitably I need to re-edit the code again.

> Any ideas? I've checked Google but haven't found an answer.

> Thanks in advance,
> Marc

> P.S. There is a strong chance that before I read any reply on this I'll
have
> jumped out a window. This is driving me nuts today. :)



Tue, 08 Feb 2005 20:17:25 GMT  
 Dataset Disappeares!
I'm not putting a perion in the variable name.

The file name is "t_line.xsd", the variable name is "t_line"

.xsd is the file extention given to dataset files.


Quote:
> A DataSet is an object. Why would you put a period in the variable name
for
> it? This is probably what is confusing the compiler.

> --
> Kevin Spencer
> Microsoft FrontPage MVP
> Internet Programmer
> For ASP Tutorials and Information -
> http://www.takempis.com



> > I have a normal WinForm with a number of buttons, text boxes, and a
grid.
> > The form is named "pos_screen". I also have a dataset named "t_line.xsd"

> > When I add a dataset to the form, and select t_line.xsd, everything
seems
> to
> > work fine.
> > But when I go to compile it, I get an error "Type 'pos_screen.t_line' is
> not
> > defined".

> > If  I change the line from "Me.T_line1 = New pos_screen.t_line()" to
> > "Me.T_line1 = New t_line()" everything will compile. It wont stay that
way
> > for long however, and inevitably I need to re-edit the code again.

> > Any ideas? I've checked Google but haven't found an answer.

> > Thanks in advance,
> > Marc

> > P.S. There is a strong chance that before I read any reply on this I'll
> have
> > jumped out a window. This is driving me nuts today. :)



Tue, 08 Feb 2005 20:26:59 GMT  
 Dataset Disappeares!
An XSD file is not a DataSet. It's a Schema.

--
Kevin Spencer
Microsoft FrontPage MVP
Internet Programmer
For ASP Tutorials and Information -
http://www.takempis.com



Quote:
> I'm not putting a perion in the variable name.

> The file name is "t_line.xsd", the variable name is "t_line"

> .xsd is the file extention given to dataset files.



> > A DataSet is an object. Why would you put a period in the variable name
> for
> > it? This is probably what is confusing the compiler.

> > --
> > Kevin Spencer
> > Microsoft FrontPage MVP
> > Internet Programmer
> > For ASP Tutorials and Information -
> > http://www.takempis.com



> > > I have a normal WinForm with a number of buttons, text boxes, and a
> grid.
> > > The form is named "pos_screen". I also have a dataset named
"t_line.xsd"

> > > When I add a dataset to the form, and select t_line.xsd, everything
> seems
> > to
> > > work fine.
> > > But when I go to compile it, I get an error "Type 'pos_screen.t_line'
is
> > not
> > > defined".

> > > If  I change the line from "Me.T_line1 = New pos_screen.t_line()" to
> > > "Me.T_line1 = New t_line()" everything will compile. It wont stay that
> way
> > > for long however, and inevitably I need to re-edit the code again.

> > > Any ideas? I've checked Google but haven't found an answer.

> > > Thanks in advance,
> > > Marc

> > > P.S. There is a strong chance that before I read any reply on this
I'll
> > have
> > > jumped out a window. This is driving me nuts today. :)



Tue, 08 Feb 2005 22:58:31 GMT  
 Dataset Disappeares!
Well, yes. And no.

And XSD file is a Dataset or a Schema. Go to "Add New Item", and select
"Dataset". You'll see the name pre-populated with "Dataset1.xsd".

And I don't see how this could be the problem. The problem isn't my dataset
. I can bind to it, I can manually make the change to the code and it will
compile and run. My problem is with the generated code from VB.NET

Marc


Quote:
> An XSD file is not a DataSet. It's a Schema.

> --
> Kevin Spencer
> Microsoft FrontPage MVP
> Internet Programmer
> For ASP Tutorials and Information -
> http://www.takempis.com



> > I'm not putting a perion in the variable name.

> > The file name is "t_line.xsd", the variable name is "t_line"

> > .xsd is the file extention given to dataset files.



> > > A DataSet is an object. Why would you put a period in the variable
name
> > for
> > > it? This is probably what is confusing the compiler.

> > > --
> > > Kevin Spencer
> > > Microsoft FrontPage MVP
> > > Internet Programmer
> > > For ASP Tutorials and Information -
> > > http://www.takempis.com



> > > > I have a normal WinForm with a number of buttons, text boxes, and a
> > grid.
> > > > The form is named "pos_screen". I also have a dataset named
> "t_line.xsd"

> > > > When I add a dataset to the form, and select t_line.xsd, everything
> > seems
> > > to
> > > > work fine.
> > > > But when I go to compile it, I get an error "Type
'pos_screen.t_line'
> is
> > > not
> > > > defined".

> > > > If  I change the line from "Me.T_line1 = New pos_screen.t_line()" to
> > > > "Me.T_line1 = New t_line()" everything will compile. It wont stay
that
> > way
> > > > for long however, and inevitably I need to re-edit the code again.

> > > > Any ideas? I've checked Google but haven't found an answer.

> > > > Thanks in advance,
> > > > Marc

> > > > P.S. There is a strong chance that before I read any reply on this
> I'll
> > > have
> > > > jumped out a window. This is driving me nuts today. :)



Wed, 09 Feb 2005 01:51:58 GMT  
 Dataset Disappeares!
Marc,

The code that we generated for you in the form should be
    Me.T_line1 = New WindowsApplication5.t_line()
not
    Me.T_line1 = New Form.t_line()

As you indicated that pos_screen is your form name, it shouldn't be
Me.T_line1= New pos_screen.t_line()

If you can tell us exactly how you created your dataset file and how you
added this dataset onto the form, we might be able to take a look why the
faulty code is generated.

To clarify the confusing of xsd and dataset: XSD file is a schema file and
we generate the code for dataset (t_line.vb) during save based on this
schema file. This t_line.vb file is compiled on save of this schema file
under the cover as well.

Yu-Fang
VB.Net Development team

--
This posting is provided "AS IS" with no warranties, and confers no rights.



Quote:
> Well, yes. And no.

> And XSD file is a Dataset or a Schema. Go to "Add New Item", and select
> "Dataset". You'll see the name pre-populated with "Dataset1.xsd".

> And I don't see how this could be the problem. The problem isn't my
dataset
> . I can bind to it, I can manually make the change to the code and it will
> compile and run. My problem is with the generated code from VB.NET

> Marc



> > An XSD file is not a DataSet. It's a Schema.

> > --
> > Kevin Spencer
> > Microsoft FrontPage MVP
> > Internet Programmer
> > For ASP Tutorials and Information -
> > http://www.takempis.com



> > > I'm not putting a perion in the variable name.

> > > The file name is "t_line.xsd", the variable name is "t_line"

> > > .xsd is the file extention given to dataset files.



> > > > A DataSet is an object. Why would you put a period in the variable
> name
> > > for
> > > > it? This is probably what is confusing the compiler.

> > > > --
> > > > Kevin Spencer
> > > > Microsoft FrontPage MVP
> > > > Internet Programmer
> > > > For ASP Tutorials and Information -
> > > > http://www.takempis.com



> > > > > I have a normal WinForm with a number of buttons, text boxes, and
a
> > > grid.
> > > > > The form is named "pos_screen". I also have a dataset named
> > "t_line.xsd"

> > > > > When I add a dataset to the form, and select t_line.xsd,
everything
> > > seems
> > > > to
> > > > > work fine.
> > > > > But when I go to compile it, I get an error "Type
> 'pos_screen.t_line'
> > is
> > > > not
> > > > > defined".

> > > > > If  I change the line from "Me.T_line1 = New pos_screen.t_line()"
to
> > > > > "Me.T_line1 = New t_line()" everything will compile. It wont stay
> that
> > > way
> > > > > for long however, and inevitably I need to re-edit the code again.

> > > > > Any ideas? I've checked Google but haven't found an answer.

> > > > > Thanks in advance,
> > > > > Marc

> > > > > P.S. There is a strong chance that before I read any reply on this
> > I'll
> > > > have
> > > > > jumped out a window. This is driving me nuts today. :)



Wed, 09 Feb 2005 04:08:45 GMT  
 Dataset Disappeares!
First, it doesn't seem to matter how I create it (by hand, by dragging the
table to the form and generating it, etc). It happens the same way each
time.

I did however find the problem. It was that name problem again. I had a
class lib named pos_screen and the form name was pos_screen.

I'm now going to jump on the "please make it warn about naming conflicts"
bandwagon.



Quote:
> Marc,

> The code that we generated for you in the form should be
>     Me.T_line1 = New WindowsApplication5.t_line()
> not
>     Me.T_line1 = New Form.t_line()

> As you indicated that pos_screen is your form name, it shouldn't be
> Me.T_line1= New pos_screen.t_line()

> If you can tell us exactly how you created your dataset file and how you
> added this dataset onto the form, we might be able to take a look why the
> faulty code is generated.

> To clarify the confusing of xsd and dataset: XSD file is a schema file and
> we generate the code for dataset (t_line.vb) during save based on this
> schema file. This t_line.vb file is compiled on save of this schema file
> under the cover as well.

> Yu-Fang
> VB.Net Development team

> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.



> > Well, yes. And no.

> > And XSD file is a Dataset or a Schema. Go to "Add New Item", and select
> > "Dataset". You'll see the name pre-populated with "Dataset1.xsd".

> > And I don't see how this could be the problem. The problem isn't my
> dataset
> > . I can bind to it, I can manually make the change to the code and it
will
> > compile and run. My problem is with the generated code from VB.NET

> > Marc



> > > An XSD file is not a DataSet. It's a Schema.

> > > --
> > > Kevin Spencer
> > > Microsoft FrontPage MVP
> > > Internet Programmer
> > > For ASP Tutorials and Information -
> > > http://www.takempis.com



> > > > I'm not putting a perion in the variable name.

> > > > The file name is "t_line.xsd", the variable name is "t_line"

> > > > .xsd is the file extention given to dataset files.



> > > > > A DataSet is an object. Why would you put a period in the variable
> > name
> > > > for
> > > > > it? This is probably what is confusing the compiler.

> > > > > --
> > > > > Kevin Spencer
> > > > > Microsoft FrontPage MVP
> > > > > Internet Programmer
> > > > > For ASP Tutorials and Information -
> > > > > http://www.takempis.com



> > > > > > I have a normal WinForm with a number of buttons, text boxes,
and
> a
> > > > grid.
> > > > > > The form is named "pos_screen". I also have a dataset named
> > > "t_line.xsd"

> > > > > > When I add a dataset to the form, and select t_line.xsd,
> everything
> > > > seems
> > > > > to
> > > > > > work fine.
> > > > > > But when I go to compile it, I get an error "Type
> > 'pos_screen.t_line'
> > > is
> > > > > not
> > > > > > defined".

> > > > > > If  I change the line from "Me.T_line1 = New

pos_screen.t_line()"

- Show quoted text -

Quote:
> to
> > > > > > "Me.T_line1 = New t_line()" everything will compile. It wont
stay
> > that
> > > > way
> > > > > > for long however, and inevitably I need to re-edit the code
again.

> > > > > > Any ideas? I've checked Google but haven't found an answer.

> > > > > > Thanks in advance,
> > > > > > Marc

> > > > > > P.S. There is a strong chance that before I read any reply on
this
> > > I'll
> > > > > have
> > > > > > jumped out a window. This is driving me nuts today. :)



Wed, 09 Feb 2005 04:39:02 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Cannot DataSet.ReadXml a file written with DataSet.WriteXml

2. How to generate dataset class from dataset xsd file

3. To DataSet or Not to DataSet

4. dataset : cannot fil the dataset because the field is empty

5. dataset problems - cant update sql after editing dataset

6. Insert dataset into dataset

7. Finding a value in Dataset does not move the dataset ?

8. dataset vs stored procedure

9. How know if query returns empty dataset

10. Deleted records appear in dataset

11. A97: Different Picture for each dataset in listview of a form

12. Recordset as dataset for continuous form

 

 
Powered by phpBB® Forum Software