Re: How do you use an unbound DataAdapter?



Hi Cor,

Not to argumentative, but I think I am using the correct words, as I am
looking both at this the reply and the IDE at the same time.

I am trying to develope a Window Form Application. I guess I should have
put that in the first message. Sorry.

On the left side of the IDE is a Window, with Data Sources (a treeview).
This window has three tabs at the bottom labeled "Data Sources", "Server
Explorer", and "Toolbox". The first entry in "Data Sources" is "DataSet1",
under that are the tables that were included in the "Configure DataSet with
Wizard ...", some are just tables, and others are tables based on views or
queries. Clicking on the plus next to each table reveals the available
fields.

Now if you drag a table to the Windows Form you get a DataGridView control
bound to table. In the are below the form, I forget what you call that area,
but above the window that have the "Output" information, where the MenuStrip
ends up, are more control intro information where you can now see "DataSet1",
"TablenameBindingSource", and "TablenameTableAdapter". These items are put
there by the IDE when you drag the table to the form. Now you can use the
"TablenameTableAdapter" in you code to Update the table, Insert new rows, etc.

Now there are other tables in the "Data Sources" on the left that haven't
been used or bound to a control on the Windows Form. My question is how do
you get access to the tables that are in the list without binding the table
to a control? Is that possible? If I take the table I want to update and
drag it to the form to get a DataGridView and then make that DataGridView
invisible I can update and insert rows in the table. How would you get
access to the table without adding the table to the form and making it
invisible?

I am sorry if you cannot understand my question. The question seems pretty
obivious to me.

Thanks,
--max

"Cor Ligthert [MVP]" wrote:

Max,

Are you using a DataGridView on a WindowForms control or a GridView from a
webform. Now it is almost tt impossible to read your message because that
you seems to use your own given words, however those words have a real
meaning too?.

Another sample in that you use the word datasource. A datasource is never
connected to a dataAdapter. Or you should mean a DataAdapter that is used to
get a resultset from a data source, where the last is than the DataBase
Table or are joined tables from that .

Can you use the right names than it will probably be a lot easier to
understand.

Cor



"Max" <Max@xxxxxxxxxxxxxxxxxxxxxxxxx> schreef in bericht
news:4284DAAB-F73A-4747-87FB-C85FADB9E94E@xxxxxxxxxxxxxxxx
Hi Marina,

This may not be the correct way, the best way, or even a good way to do
this.

I have a DataGridView that is bound to a query that is the subset of
fields
from a join of two tables. New rows are added to this table based on a
selection from a combo box and then I add a row to one of the two tables
in
the join and let the DataAdaptor that is bound to the DataGridView refill
the
table.

Now if I take the table in question and drag it onto the form with another
gridview and then make the grid view not visible, I can Insert and Update
the
table. But that seems weird. Can't I just use the dataadaptors that are
included in the datasource to read, insert, and update the table? Or do I
have to bind them to a control? It would seem that it's probably pretty
straight forward to use the data adaptors without a control, but I haven't
been able to find the documentation yet.

Any ideas??

Thanks,
--max

"Marina Levit [MVP]" wrote:

How do you use them to do what?

"Max" <Max@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:24979E61-041D-4BAC-8877-AEE916A04BDC@xxxxxxxxxxxxxxxx
Hi Cor,

My is how do you use the DataAdaptors from the Data Source if you don't
bind
them to a gridview?

"Cor Ligthert [MVP]" wrote:

Max,

AFAIK is a DataAdapter never bound to controls, can you rephrase your
question.

Cor









.



Relevant Pages

  • Re: How do you use an unbound DataAdapter?
    ... You told that you have used DataAdapter (in the way as you use it a kind of ... You have used the word GridView often (a webform control) where you where ... automaticly a DataGridView and toolstrip etc. ... On the left side of the IDE is a Window, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Solution to Form initial display issue
    ... Rod wrote: ... Specify the WindowState property on the child form to be ... Anchoring is more about fixing the distance a control is from the ... These child forms generally contain a DataGridView control with the ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: DataGridView: last column can be made smaller but not bigger
    ... column width change cursor. ... I have a DataGridView control where the user can resize the columns. ... edge of the window. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: How do you use an unbound DataAdapter?
    ... Are you using a DataGridView on a WindowForms control or a GridView from a ... Or you should mean a DataAdapter that is used to ... gridview and then make the grid view not visible, ... have to bind them to a control? ...
    (microsoft.public.dotnet.languages.vb)
  • Solution to Form initial display issue
    ... Specify the WindowState property on the child form to be ... Anchoring is more about fixing the distance a control is from the ... These child forms generally contain a DataGridView control with the ...
    (microsoft.public.dotnet.framework.windowsforms)