VS2005 TableAdapter TableMappings

Visual Studio .Net

    Next

  • 1. Move web reference to different project
    Is it possible to copy a web-reference from one project to another project? The avtual web service the original project is not available in my current development environment so I can't simply add it to the project, I must copy it from an existing project where the web reference has been added succesfully by another team member.
  • 2. Visio
    I installed Visio 2003 on my pc which has vs2005 & vs2003 installed, I was able to place the visio tab in my menu tab in 2003 yet 2005 show nothing in regards to visio. Does this need a different setup ??
  • 3. VS2005, keyboard command 'View.Url' missing ?
    Hi, VS2003 has the keyboard command, View.Url which you could execute from the Command window.. CS2005 does not seem to have this command.. is there a replacement ? Cheers, Fred

VS2005 TableAdapter TableMappings

Postby U2ltb24gTGFtcGVu » Thu, 12 Jan 2006 12:53:03 GMT

Sorry I can't find a VS2005 group so here goes...

Is it possible to visually edit the TableMappings of the underlying 
DataAdapter of a TableAdapter??

This is possible to do for a simple DataAdapter using the properties window 
when exposed on the simple component designer. I can resort to the 
DataAdapter object but the ability to generate code for the FillBy and 
GetDataBy methods is attractive, however it would be nice to be able to 
easily abstract away ugly Database column names by use of the TableMapping 
object.

I have tried to expose the underlying DataAdapter of the TableAdapter by 
creating my own property with the Browsable codeattribute set but the DataSet 
Designer seems impervious to my efforts to get my custom property to show in 
the properties window.
This seems a step backward in configurability of a new fairly useful object.

Also is there an easier way to view/edit the xsd (ie xml source) of the 
dataset in any of the dataset designers. I can't find an obvious xml tab, 
only the view code, view designer options. 
The open with... option provides some relief, but what happened to 'context 
sensitive', an xsd is xml so why not have a 'view schema' or 'view xml' 
option.
Are the VS2005 team trying to take the accessibility of XML out of dotnet :0).

Any tips would be much appreciated.

RE: VS2005 TableAdapter TableMappings

Postby S2VuIENhcnRlcg » Tue, 17 Jan 2006 22:12:09 GMT

It would appear that MS really dropped the ball when it came to table 
management.  I think that is because they are{*filter*} there hat on fixed 
positioning feature. However, when you have a table the only thing you can 
tell of its content is the first level and even then you have no edit 
capability of that element under the visual interface unless you pull it out 
(via the code view) of the table into the open.

Despite being extremely impressed with the rest of VS2005 this oversight is 
either arrogance or stupidity at its best.





Similar Threads:

1.TableAdapter's TableMappings?

I like the new TableAdapter in .net 2005 but is there a designer-based 
mechanism that populates a DataSet's multiple DataTables from a stored 
procedure that returns multiple result sets. i.e. to configure the equivilant 
of a DataAdapter's TableMappings?

2.VS2005 - How to connect to a TableAdapter in the data layer

Here are pertinent parts of my solution structure
\\
Solution 'QMS_01
-QmsDataLayer
---My Project
---app.config
---DataSet1.xsd
-QmsUI
---My Project
------DataSources (folder)
---------QmsDataLayer.DataSet1+lkpDeviceTypeDataTable.datasource
---References
------QmsDataLayer
---Form1
//

In the DataSet of the QmsDataLayer is a DataTable (lkpDeviceType) that
has its "LkpDeviceTypeTableAdapter" configured for the stored
procedures in SQL Server 2000 for Fill and GetData.

On "Form1" in the user interface layer (QmsUI) is a DataGridView whose
source is "lkpDeviceTypeTableAdapterBindingSource"

In Form1 component tray I have
\\
lkpDeviceTypeTableAdapterBindingSource
DataSet11
LkpDeviceTypeTableAdapter1
//

This code is not accepted
\\
   LkpDeviceTypeTableAdapter.Fill
//

What am I missing?

dbuchanan

3.vs2005 - How to fill form using TableAdapter FillBy

Hello,

I have added a query to my TableAdapter that accepts a parameter (The
ID) to filter the data. It will return only one record. I tested it in
the designer and it returns one record as expected.

However I cannot get it to populate a form of databound controls. What
could I be doing wrong? The controls were dragged onto the form surface
which then made the dataset, tableAdapter and bindingSource in the
forms component tray.

Here is the code in the from_load event
\\
 Me.Table1TableAdapter1.FillBy(Me.DataSet11.table1, 2)
//


Here is the stored procedure
\\
CREATE PROCEDURE dbo.usp_Table1_GetById
(
	@pkId int
)
AS
	SET NOCOUNT ON;
SELECT     pkId, Name, Address
FROM         Table1
WHERE     (pkId = @pkId)
GO
//

(I *can* get a form with a datagridview to return the single record
with the code above)

What am I missing?

Thank you,
dbuchanan

4.VS2005 - Newbie - TableAdapter not configured, but it updates!!

Hello,

I have a data layer where I put a dataset to a SQL Server 2000
database. I referenced that dataset in the user interface layer. I
forgot to configure stored procedures, sql statements or anything for
Table2, yet it updates the SQL Server database! Is there some kind of
default update code that works without configuring??

Why does this work? How does this work??

Thank you,
dbuchanan

5.vs2005 - Parent-Child dataGridViews with tableAdapters

Hello,

How do I create a Parent-Child relationship between two DataGridView in
a form using TableAdapters. The two tables already have a relationship
defined in the dataset.

What event do I use to update the child dgv? The RowEnter event?

Thank you,
dbuchanan

6. VS2005: dataset wizard: tableadapter connectionmodifier to public

7. VS2005: TableAdapter - need to get the underlying DataAdapter

8. VS2005: TableAdapter - need to get the underlying DataAdapte



Return to Visual Studio .Net

 

Who is online

Users browsing this forum: No registered users and 90 guest