Visual Studio Typed Table Adapter

G

Guest

Hi,

Enviornment : Visual Studio .NET 2005 and SQL Server /Access

I've spent 2 days searching for an answer to this problem which I am
convinced is simple - if you know how.

I can't get VS to create the TableAdapter classes for me to use in my .NET
application. I run the TableAdapter Configuration Wizard and it creates a
nice looking Adapter but doesn't create strongly types class definition.

Is there a setting or what?

Help would be appreciated...

Neil
 
M

Miha Markic

Open Server Explorer windows, find table and drop in on the dataset designer
surface.
 
G

Guest

OK, I've dropped it onto the designer surface and its created a visual
representation of the table adapter but it hasn't created the strongly typed
class module.

This means when I write the code 'dim x as logtableadapter' in the
default.aspx.vb file it gives an error saying 'Type 'logtableadapter' is not
defined'.

This is the problem...

Miha Markic said:
Open Server Explorer windows, find table and drop in on the dataset designer
surface.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Neil said:
Hi,

Enviornment : Visual Studio .NET 2005 and SQL Server /Access

I've spent 2 days searching for an answer to this problem which I am
convinced is simple - if you know how.

I can't get VS to create the TableAdapter classes for me to use in my .NET
application. I run the TableAdapter Configuration Wizard and it creates a
nice looking Adapter but doesn't create strongly types class definition.

Is there a setting or what?

Help would be appreciated...

Neil
 
M

Miha Markic

Check out the code behind the designer...You'll see that there is a strong
typed dataset and table adapter.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Neil said:
OK, I've dropped it onto the designer surface and its created a visual
representation of the table adapter but it hasn't created the strongly
typed
class module.

This means when I write the code 'dim x as logtableadapter' in the
default.aspx.vb file it gives an error saying 'Type 'logtableadapter' is
not
defined'.

This is the problem...

Miha Markic said:
Open Server Explorer windows, find table and drop in on the dataset
designer
surface.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Neil said:
Hi,

Enviornment : Visual Studio .NET 2005 and SQL Server /Access

I've spent 2 days searching for an answer to this problem which I am
convinced is simple - if you know how.

I can't get VS to create the TableAdapter classes for me to use in my
.NET
application. I run the TableAdapter Configuration Wizard and it creates
a
nice looking Adapter but doesn't create strongly types class
definition.

Is there a setting or what?

Help would be appreciated...

Neil
 
C

Cor Ligthert [MVP]

Miha,

AFAIK not in ASPX 2005 in the way we are used to it in Windows form and ASPX
2003.

ASPNET 2005 is not as 2003 it has again more from ASP in my idea.

Cor

Miha Markic said:
Check out the code behind the designer...You'll see that there is a strong
typed dataset and table adapter.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Neil said:
OK, I've dropped it onto the designer surface and its created a visual
representation of the table adapter but it hasn't created the strongly
typed
class module.

This means when I write the code 'dim x as logtableadapter' in the
default.aspx.vb file it gives an error saying 'Type 'logtableadapter' is
not
defined'.

This is the problem...

Miha Markic said:
Open Server Explorer windows, find table and drop in on the dataset
designer
surface.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Hi,

Enviornment : Visual Studio .NET 2005 and SQL Server /Access

I've spent 2 days searching for an answer to this problem which I am
convinced is simple - if you know how.

I can't get VS to create the TableAdapter classes for me to use in my
.NET
application. I run the TableAdapter Configuration Wizard and it
creates a
nice looking Adapter but doesn't create strongly types class
definition.

Is there a setting or what?

Help would be appreciated...

Neil
 
G

Guest

OK. There is no code behind the designer!

I have stated that I can't reference the tableadapter class because it is
not being created. Is there a setting in Visual Studio that switches the
creation of the strongly typed class on/off? Is my VS not installed properly?
Is .NET 2 not installed properly.

The strongly typed class just isn't there..!

Neil

Miha Markic said:
Check out the code behind the designer...You'll see that there is a strong
typed dataset and table adapter.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Neil said:
OK, I've dropped it onto the designer surface and its created a visual
representation of the table adapter but it hasn't created the strongly
typed
class module.

This means when I write the code 'dim x as logtableadapter' in the
default.aspx.vb file it gives an error saying 'Type 'logtableadapter' is
not
defined'.

This is the problem...

Miha Markic said:
Open Server Explorer windows, find table and drop in on the dataset
designer
surface.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Hi,

Enviornment : Visual Studio .NET 2005 and SQL Server /Access

I've spent 2 days searching for an answer to this problem which I am
convinced is simple - if you know how.

I can't get VS to create the TableAdapter classes for me to use in my
.NET
application. I run the TableAdapter Configuration Wizard and it creates
a
nice looking Adapter but doesn't create strongly types class
definition.

Is there a setting or what?

Help would be appreciated...

Neil
 
M

Miha Markic

You should have a YourName.xsd file and beneath that file
YourName.Designer.cs file if you added a Dataset item to the project.
Do you have them? Did you check YourName.Designer.cs file?
 
G

Guest

This is the problem - I'm getting the .xsd file but there is no file under
that - I would expect .Designer.vb (or .cs if I selected to use C) but it
just isn't there...

I want to know whether this is for any good reason or if the implementation
is flawed.

Miha Markic said:
You should have a YourName.xsd file and beneath that file
YourName.Designer.cs file if you added a Dataset item to the project.
Do you have them? Did you check YourName.Designer.cs file?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/


Neil said:
OK. There is no code behind the designer!

I have stated that I can't reference the tableadapter class because it is
not being created. Is there a setting in Visual Studio that switches the
creation of the strongly typed class on/off? Is my VS not installed
properly?
Is .NET 2 not installed properly.

The strongly typed class just isn't there..!
 
G

Guest

More info:

I've tried the same on another PC with VS 2005 installed and I get the same
results - no .Designer.vb or .cs file. THis leads me to benlieve I haven't
installed something or I'm on the wrong version or there is a switch that is
not set specifying strong data typing.

Thanks for help so far...

Miha Markic said:
You should have a YourName.xsd file and beneath that file
YourName.Designer.cs file if you added a Dataset item to the project.
Do you have them? Did you check YourName.Designer.cs file?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/


Neil said:
OK. There is no code behind the designer!

I have stated that I can't reference the tableadapter class because it is
not being created. Is there a setting in Visual Studio that switches the
creation of the strongly typed class on/off? Is my VS not installed
properly?
Is .NET 2 not installed properly.

The strongly typed class just isn't there..!
 
M

Miha Markic

Ok, next step. Click on Dataset.xsd file in solution explorer and look at
its properties: Custom Tool should be set to MSDataSetGenerator.
 
G

Guest

If I click on Dataset1.xsd in Solutions Explorer, in the Properties window
there is only File Name and Full Path (greyed). There is no Custom Tool
option. Also, hanging under Dataset.xsd is Dataset1.xss. There is no
Properties option if I right-click Dataset1.xsd.

Miha Markic said:
Ok, next step. Click on Dataset.xsd file in solution explorer and look at
its properties: Custom Tool should be set to MSDataSetGenerator.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/


Neurosoft Neil said:
More info:

I've tried the same on another PC with VS 2005 installed and I get the
same
results - no .Designer.vb or .cs file. THis leads me to benlieve I haven't
installed something or I'm on the wrong version or there is a switch that
is
not set specifying strong data typing.

Thanks for help so far...
 
M

Miha Markic

There should be two groups in Properties: Advanced and Misc (the one you are
seeing).
Which VS version do you have?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Neurosoft Neil said:
If I click on Dataset1.xsd in Solutions Explorer, in the Properties window
there is only File Name and Full Path (greyed). There is no Custom Tool
option. Also, hanging under Dataset.xsd is Dataset1.xss. There is no
Properties option if I right-click Dataset1.xsd.

Miha Markic said:
Ok, next step. Click on Dataset.xsd file in solution explorer and look at
its properties: Custom Tool should be set to MSDataSetGenerator.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/


message
More info:

I've tried the same on another PC with VS 2005 installed and I get the
same
results - no .Designer.vb or .cs file. THis leads me to benlieve I
haven't
installed something or I'm on the wrong version or there is a switch
that
is
not set specifying strong data typing.

Thanks for help so far...
 
G

Guest

I am using Visual Studio 2005 Professional version 8.50727.762 & .NET
2.0.50727. I can't see an Advanced option in the properties window for the
Dataset.

If I look in the Object Browser for the ASPWeb project there is a reference
to App_Code.dg_znuhp that is located in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\aspwebs\ce2b56cd\_shadow\c883dc62\3094099198\29865762\App_Code.dg_znuhp.dll.

This appears to contain compiled strongly typed apapter classes. If I add
'Imports DataSet1TableAdapters' to the top of my 'Default.aspx.vb' module
then I can reference the table adapters - for example 'Dim x As
AgentTableAdapter'.

Is this how it works in VS 2005? Is there no Dataset.vb module created? Why
can't I see advanced options?

Once again, thanks for help...

Miha Markic said:
There should be two groups in Properties: Advanced and Misc (the one you are
seeing).
Which VS version do you have?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Neurosoft Neil said:
If I click on Dataset1.xsd in Solutions Explorer, in the Properties window
there is only File Name and Full Path (greyed). There is no Custom Tool
option. Also, hanging under Dataset.xsd is Dataset1.xss. There is no
Properties option if I right-click Dataset1.xsd.

Miha Markic said:
Ok, next step. Click on Dataset.xsd file in solution explorer and look at
its properties: Custom Tool should be set to MSDataSetGenerator.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/


message
More info:

I've tried the same on another PC with VS 2005 installed and I get the
same
results - no .Designer.vb or .cs file. THis leads me to benlieve I
haven't
installed something or I'm on the wrong version or there is a switch
that
is
not set specifying strong data typing.

Thanks for help so far...
 
M

Miha Markic

Can you expand nodes in both solution explorer and Propeties window, capture
the screen picture and show it?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Neurosoft Neil said:
I am using Visual Studio 2005 Professional version 8.50727.762 & .NET
2.0.50727. I can't see an Advanced option in the properties window for the
Dataset.

If I look in the Object Browser for the ASPWeb project there is a
reference
to App_Code.dg_znuhp that is located in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\aspwebs\ce2b56cd\_shadow\c883dc62\3094099198\29865762\App_Code.dg_znuhp.dll.

This appears to contain compiled strongly typed apapter classes. If I add
'Imports DataSet1TableAdapters' to the top of my 'Default.aspx.vb' module
then I can reference the table adapters - for example 'Dim x As
AgentTableAdapter'.

Is this how it works in VS 2005? Is there no Dataset.vb module created?
Why
can't I see advanced options?

Once again, thanks for help...

Miha Markic said:
There should be two groups in Properties: Advanced and Misc (the one you
are
seeing).
Which VS version do you have?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

message
If I click on Dataset1.xsd in Solutions Explorer, in the Properties
window
there is only File Name and Full Path (greyed). There is no Custom Tool
option. Also, hanging under Dataset.xsd is Dataset1.xss. There is no
Properties option if I right-click Dataset1.xsd.

:

Ok, next step. Click on Dataset.xsd file in solution explorer and look
at
its properties: Custom Tool should be set to MSDataSetGenerator.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/


message
More info:

I've tried the same on another PC with VS 2005 installed and I get
the
same
results - no .Designer.vb or .cs file. THis leads me to benlieve I
haven't
installed something or I'm on the wrong version or there is a switch
that
is
not set specifying strong data typing.

Thanks for help so far...
 
G

Guest

I've captured the images - how do I show them to you?

Miha Markic said:
Can you expand nodes in both solution explorer and Propeties window, capture
the screen picture and show it?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Neurosoft Neil said:
I am using Visual Studio 2005 Professional version 8.50727.762 & .NET
2.0.50727. I can't see an Advanced option in the properties window for the
Dataset.

If I look in the Object Browser for the ASPWeb project there is a
reference
to App_Code.dg_znuhp that is located in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\aspwebs\ce2b56cd\_shadow\c883dc62\3094099198\29865762\App_Code.dg_znuhp.dll.

This appears to contain compiled strongly typed apapter classes. If I add
'Imports DataSet1TableAdapters' to the top of my 'Default.aspx.vb' module
then I can reference the table adapters - for example 'Dim x As
AgentTableAdapter'.

Is this how it works in VS 2005? Is there no Dataset.vb module created?
Why
can't I see advanced options?

Once again, thanks for help...

Miha Markic said:
There should be two groups in Properties: Advanced and Misc (the one you
are
seeing).
Which VS version do you have?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

message
If I click on Dataset1.xsd in Solutions Explorer, in the Properties
window
there is only File Name and Full Path (greyed). There is no Custom Tool
option. Also, hanging under Dataset.xsd is Dataset1.xss. There is no
Properties option if I right-click Dataset1.xsd.

:

Ok, next step. Click on Dataset.xsd file in solution explorer and look
at
its properties: Custom Tool should be set to MSDataSetGenerator.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/


message
More info:

I've tried the same on another PC with VS 2005 installed and I get
the
same
results - no .Designer.vb or .cs file. THis leads me to benlieve I
haven't
installed something or I'm on the wrong version or there is a switch
that
is
not set specifying strong data typing.

Thanks for help so far...
 
G

Guest

I've now found the .CS code in the object explorer under Browse: My Solution
but this code is held in the temporary directory specified below, along with
the temporary dll...

I have tested this code and I am able to use the adapters that I have found.
This is fine because I will not need to change the adatper code and so I
don't really need to have access to the .cs file. So, after all of this I am
up and running (well, not quite running yet).

Many thanks for your help...

Miha Markic said:
Can you expand nodes in both solution explorer and Propeties window, capture
the screen picture and show it?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Neurosoft Neil said:
I am using Visual Studio 2005 Professional version 8.50727.762 & .NET
2.0.50727. I can't see an Advanced option in the properties window for the
Dataset.

If I look in the Object Browser for the ASPWeb project there is a
reference
to App_Code.dg_znuhp that is located in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\aspwebs\ce2b56cd\_shadow\c883dc62\3094099198\29865762\App_Code.dg_znuhp.dll.

This appears to contain compiled strongly typed apapter classes. If I add
'Imports DataSet1TableAdapters' to the top of my 'Default.aspx.vb' module
then I can reference the table adapters - for example 'Dim x As
AgentTableAdapter'.

Is this how it works in VS 2005? Is there no Dataset.vb module created?
Why
can't I see advanced options?

Once again, thanks for help...

Miha Markic said:
There should be two groups in Properties: Advanced and Misc (the one you
are
seeing).
Which VS version do you have?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

message
If I click on Dataset1.xsd in Solutions Explorer, in the Properties
window
there is only File Name and Full Path (greyed). There is no Custom Tool
option. Also, hanging under Dataset.xsd is Dataset1.xss. There is no
Properties option if I right-click Dataset1.xsd.

:

Ok, next step. Click on Dataset.xsd file in solution explorer and look
at
its properties: Custom Tool should be set to MSDataSetGenerator.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/


message
More info:

I've tried the same on another PC with VS 2005 installed and I get
the
same
results - no .Designer.vb or .cs file. THis leads me to benlieve I
haven't
installed something or I'm on the wrong version or there is a switch
that
is
not set specifying strong data typing.

Thanks for help so far...
 
C

Cor Ligthert [MVP]

Miha,

I am curious how you do that while making an ASPNET project..

Cor

Miha Markic said:
Can you expand nodes in both solution explorer and Propeties window,
capture the screen picture and show it?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Neurosoft Neil said:
I am using Visual Studio 2005 Professional version 8.50727.762 & .NET
2.0.50727. I can't see an Advanced option in the properties window for
the
Dataset.

If I look in the Object Browser for the ASPWeb project there is a
reference
to App_Code.dg_znuhp that is located in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\aspwebs\ce2b56cd\_shadow\c883dc62\3094099198\29865762\App_Code.dg_znuhp.dll.

This appears to contain compiled strongly typed apapter classes. If I add
'Imports DataSet1TableAdapters' to the top of my 'Default.aspx.vb' module
then I can reference the table adapters - for example 'Dim x As
AgentTableAdapter'.

Is this how it works in VS 2005? Is there no Dataset.vb module created?
Why
can't I see advanced options?

Once again, thanks for help...

Miha Markic said:
There should be two groups in Properties: Advanced and Misc (the one you
are
seeing).
Which VS version do you have?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

message
If I click on Dataset1.xsd in Solutions Explorer, in the Properties
window
there is only File Name and Full Path (greyed). There is no Custom
Tool
option. Also, hanging under Dataset.xsd is Dataset1.xss. There is no
Properties option if I right-click Dataset1.xsd.

:

Ok, next step. Click on Dataset.xsd file in solution explorer and
look at
its properties: Custom Tool should be set to MSDataSetGenerator.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/


message
More info:

I've tried the same on another PC with VS 2005 installed and I get
the
same
results - no .Designer.vb or .cs file. THis leads me to benlieve I
haven't
installed something or I'm on the wrong version or there is a
switch
that
is
not set specifying strong data typing.

Thanks for help so far...
 
C

Cor Ligthert [MVP]

Miha,

Did you try it what you told? What you told was in no way the question as
Neil told already, he sees it in temps.

As I wrote is the STD in my idea not implemented in ASPNET 2005 as in 2003
and in windows forms 2005 as class but only as XSD..

Therefore Neil does not see his STD class, but you tells that you see the
class, so I am curious how you do that.

Cor

Miha Markic said:
Strong typed datasets don't depend on the type of the project.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Cor Ligthert said:
Miha,

I am curious how you do that while making an ASPNET project..
 

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