Hi Gary,
ASP.NET 2.0 web app in vs 2005 put source code file, and xsd files into
App_Code folder so as to make them dynamic compiled. So you will not find
the .designer.cs(vb) file. The class is purely generated and compiled at
runtime. And for the DataSet's TableAdapters they're also dynamically
compiled and genrated (when we hit "save" or "save all", the dynamic
compilation take place...). And to get the TableAdapter classes' namespace
name and class name, just use objectDataSource's configuration wizard
(through smartTag), and it'll help list all the current avaiable(compiled)
components which include the TableAdapters, we don't need to guess the
name...
Also, if you want develop your DataSet/TableAdatper using the style like in
winform application, you can consider create a class library project and
create the DataSet/TAbleAdapter there...
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "GaryDean" <Ga******@newsgroups.nospam>
| References: <O$**************@TK2MSFTNGP10.phx.gbl>
<gt********************************@4ax.com>
| Subject: Re: 2.0 dataset issues - again
| Date: Fri, 6 Jan 2006 17:27:08 -0800
| Lines: 77
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <uQ*************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 216.244.8.41
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:369160
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| All I have after creating the tableadapter:dataset is a .xsd file and a
..xss
| file. I know that in Forms apps I could double-click the file node of
the
| .xsd and a mydatasetDesigner.vb file would be generated but this does not
| work in asp apps.
|
| So, I have no designer .vb file (.cs in your case)
|
|
| Regards,
| Gary Blakely
| "Otis Mukinfus" <ph***@emailaddress.com> wrote in message
| news:gt********************************@4ax.com...
| > On Tue, 3 Jan 2006 17:48:54 -0800, "GaryDean"
| > <Ga******@newsgroups.nospam> wrote:
| >
| >>In an 2.0 asp app I used vs.net 2005 to create a TableAdapter:Dataset
in
| >>my
| >>App_code directory. I also created a new vb class in that same
directory.
| >>I have two issues:
| >>
| >>1.
| >>I notice that there are errors in the xml code for the dataset...
| >><TableAdapter BaseClass="system.ComponentModel.Component"
| >>DataAccessorModifier...
| >>the DataAccessorModifier is underlined as an error - if I hover over
it,
| >>it
| >>says that attribute is not declared. GenerateShortcommands,
| >>ParameterPrefix - same thing - attirubte not declared.
| >>
| >>Also parameter AllowDBNull is underlined - also saying that the
attribute
| >>is
| >>not declared.
| >>Why do these errors exist?
| >>
| >>2.
| >>Assuming I can get this .xsd generated correctly, how can I get
reference
| >>to
| >>the tableAdapter and it's fill method in my class so I can use it. I
have
| >>tried everything I can think of to reference it but nothing seems to
work.
| >>Unlike a 2003 dataset it doesn't seem to be in a namespace so I can't
say
| >>myTA = new myproject.tableadapter.
| >
| > When you get the TableAdapter.DataSet generated look in the dataset
| > code (YourDataSet.Designer.cs). You will find a namespace in there
| > named YourDataSetTableAdapters. a using statement to your code
| > referring to that namespace. Here is an example:
| >
| > using System;
| > using System.Collections.Generic;
| > using System.Text;
| > using System.Data;
| > using TestConsole.N5GEDataSetTableAdapters;
| >
| > namespace TestConsole
| > {
| > class Program
| > {
| > static void Main(string[] args)
| > {
| > USCitiesTableAdapter ta = new USCitiesTableAdapter();
| > N5GEDataSet ds = new N5GEDataSet();
| >
| > ta.Fill(ds.USCities);
| >
| > DataRow [] cities =
| > ds.USCities.select("Distinct city = 'arlington'", "City, state
| > ASC");
| > }
| > }
| > }
| >
| >
| > Otis Mukinfus
| >
http://www.otismukinfus.com
| >
http://www.tomchilders.com
|
|
|