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 objectDataSourc e's configuration wizard
(through smartTag), and it'll help list all the current avaiable(compil ed)
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******@newsg roups.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.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: 216.244.8.41
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP10.phx. gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3691 60
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| All I have after creating the tableadapter:da taset 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 mydatasetDesign er.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***@emailadd ress.com> wrote in message
| news:gt******** *************** *********@4ax.c om...
| > On Tue, 3 Jan 2006 17:48:54 -0800, "GaryDean"
| > <Ga******@newsg roups.nospam> wrote:
| >
| >>In an 2.0 asp app I used vs.net 2005 to create a TableAdapter:Da taset
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...
| >><TableAdapt er BaseClass="syst em.ComponentMod el.Component"
| >>DataAccessorM odifier...
| >>the DataAccessorMod ifier is underlined as an error - if I hover over
it,
| >>it
| >>says that attribute is not declared. GenerateShortco mmands,
| >>ParameterPref ix - 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.table adapter.
| >
| > When you get the TableAdapter.Da taSet generated look in the dataset
| > code (YourDataSet.De signer.cs). You will find a namespace in there
| > named YourDataSetTabl eAdapters. a using statement to your code
| > referring to that namespace. Here is an example:
| >
| > using System;
| > using System.Collecti ons.Generic;
| > using System.Text;
| > using System.Data;
| > using TestConsole.N5G EDataSetTableAd apters;
| >
| > namespace TestConsole
| > {
| > class Program
| > {
| > static void Main(string[] args)
| > {
| > USCitiesTableAd apter ta = new USCitiesTableAd apter();
| > N5GEDataSet ds = new N5GEDataSet();
| >
| > ta.Fill(ds.USCi ties);
| >
| > DataRow [] cities =
| > ds.USCities.sel ect("Distinct city = 'arlington'", "City, state
| > ASC");
| > }
| > }
| > }
| >
| >
| > Otis Mukinfus
| >
http://www.otismukinfus.com
| >
http://www.tomchilders.com
|
|
|