Can't View Form in Designer Visual Basic .NET 2005 Express

C

Crazy Cat

Hi,

I'm developing an application that is basically a VB.NET front end to a
SQL Server Express 2005 database -- right now I'm using VB.NET 2005
Express until my MSDN subscription gets delivered later this week.
Here's the problem I'm experiencing -- I created several databound
controls on a form and when I attempt to debug the application I get 6
errors, 16 warnings --

Warning 1 The variable 'JeopardyDataSet' is either undeclared or was
never assigned. C:\Documents and Settings\db9622\My Documents\Visual
Studio
2005\Projects\JeopardyConfig\JeopardyConfig\JeopardyConfig.Designer.vb 57 0
Warning 2 The variable 'JeopardyDataSet' is either undeclared or was
never assigned. C:\Documents and Settings\db9622\My Documents\Visual
Studio
2005\Projects\JeopardyConfig\JeopardyConfig\JeopardyConfig.Designer.vb 90 0
I've only shown the first two, because basically the errors and
warnings are similar -- something is undeclared or not assigned. The
big problem is that I can't view the form in the designer because when
I attempt to I get the following message

One or more errors encountered while loading the designer. The errors
are listed below. Some errors can be fixed by rebuilding your project,
while others may require code changes.

and then it lists the several errors of a similar type. I noticed some
of my errors will disappear if I prepend the parts of the code where
the functions are called with Global. Why doesn't VB automatically
append this, since it automatically generated the code?

So now I'm pretty much stuck, I can't open the form in the designer and
I can't figure out why all these classes appear to not be declared.

Please help

Thanks,

Crazy
 
P

pvdg42

Crazy Cat said:
Hi,

I'm developing an application that is basically a VB.NET front end to a
SQL Server Express 2005 database -- right now I'm using VB.NET 2005
Express until my MSDN subscription gets delivered later this week.
Here's the problem I'm experiencing -- I created several databound
controls on a form and when I attempt to debug the application I get 6
errors, 16 warnings --

Warning 1 The variable 'JeopardyDataSet' is either undeclared or was
never assigned. C:\Documents and Settings\db9622\My Documents\Visual
Studio
2005\Projects\JeopardyConfig\JeopardyConfig\JeopardyConfig.Designer.vb 57
0
Warning 2 The variable 'JeopardyDataSet' is either undeclared or was
never assigned. C:\Documents and Settings\db9622\My Documents\Visual
Studio
2005\Projects\JeopardyConfig\JeopardyConfig\JeopardyConfig.Designer.vb 90
0
I've only shown the first two, because basically the errors and
warnings are similar -- something is undeclared or not assigned. The
big problem is that I can't view the form in the designer because when
I attempt to I get the following message

One or more errors encountered while loading the designer. The errors
are listed below. Some errors can be fixed by rebuilding your project,
while others may require code changes.

and then it lists the several errors of a similar type. I noticed some
of my errors will disappear if I prepend the parts of the code where
the functions are called with Global. Why doesn't VB automatically
append this, since it automatically generated the code?

So now I'm pretty much stuck, I can't open the form in the designer and
I can't figure out why all these classes appear to not be declared.

Please help

Thanks,

Crazy
The warnings you quoted appear to reference a DataSet object variable,
"JeopardyDataSet'.
Can you post the code that creates this instance of DataSet? It sounds as if
the object variable in question is an empty reference, but seeing the code
would help.
 
C

Chris

Crazy said:
Hi,

I'm developing an application that is basically a VB.NET front end to a
SQL Server Express 2005 database -- right now I'm using VB.NET 2005
Express until my MSDN subscription gets delivered later this week.
Here's the problem I'm experiencing -- I created several databound
controls on a form and when I attempt to debug the application I get 6
errors, 16 warnings --

Warning 1 The variable 'JeopardyDataSet' is either undeclared or was
never assigned. C:\Documents and Settings\db9622\My Documents\Visual
Studio
2005\Projects\JeopardyConfig\JeopardyConfig\JeopardyConfig.Designer.vb 57 0
Warning 2 The variable 'JeopardyDataSet' is either undeclared or was
never assigned. C:\Documents and Settings\db9622\My Documents\Visual
Studio
2005\Projects\JeopardyConfig\JeopardyConfig\JeopardyConfig.Designer.vb 90 0
I've only shown the first two, because basically the errors and
warnings are similar -- something is undeclared or not assigned. The
big problem is that I can't view the form in the designer because when
I attempt to I get the following message

One or more errors encountered while loading the designer. The errors
are listed below. Some errors can be fixed by rebuilding your project,
while others may require code changes.

and then it lists the several errors of a similar type. I noticed some
of my errors will disappear if I prepend the parts of the code where
the functions are called with Global. Why doesn't VB automatically
append this, since it automatically generated the code?

So now I'm pretty much stuck, I can't open the form in the designer and
I can't figure out why all these classes appear to not be declared.

Please help

Thanks,

Crazy

Are you doing anything with Paint events? The only time I ever got the
designer to fail was when I coded in the paint events or I made a change
to the auto-generated code.

Also, do you have option strict turned on?

The warnings you gave will not stop a compile, just letting you know
that either you didn't declare a variable or it doesn't think you ever
set it to a value. Can't help much with those without seeing some code.

Chris
 
M

Martin

Is the form based on an inherited class?
Code in class definitions gets executed in the designer, unless you
specifically prohibit this by enclosing it in:

' Following code should NOT be executed in design mode
If Not Me.DesignMode Then
....
....
End If

Another thing is... I don't think you can do database programming in the
Express edition.

Hth,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top