473,387 Members | 1,903 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How do you use an unbound DataAdapter?

Max
I've included the needed tables in the DataSource. Those tables that are
bound to controls I can workwith. But how do you get access to the
DataAdaptors that are not bound?

me.Dataset1.table is a table with no Insert or Update methods.
pll.DataSet1.table has the Row, ChangeEvent, and ChangeEventHandler.

It seems like it should be fairly straight forward to use the DataAdapter
without binding it to a control. How do you do this?

Thanks,
--max
Apr 3 '06 #1
7 1780
Max,

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

Cor
Apr 3 '06 #2
Max
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

Apr 3 '06 #3
How do you use them to do what?

"Max" <Ma*@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com...
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

Apr 3 '06 #4
Max
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" <Ma*@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com...
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


Apr 3 '06 #5
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" <Ma*@discussions.microsoft.com> schreef in bericht
news:42**********************************@microsof t.com...
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" <Ma*@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com...
> 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
>>
>>
>>


Apr 3 '06 #6
Max
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" <Ma*@discussions.microsoft.com> schreef in bericht
news:42**********************************@microsof t.com...
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" <Ma*@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com...
> 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
>>
>>
>>


Apr 3 '06 #7
Max,

Now at least I can understand what you tell. However I deny that you told
what you want, to get it better for the next time, I first show you were you
have confused us.

You told that you have used DataAdapter (in the way as you use it a kind of
base control for the tableadapter, where you have used the TableAdapter and
than we had better knowed what you did mean).
You have used the word GridView often (a webform control) where you where
talking about the DataGridView.

The most confusing was however that you were consequently speaking from an
unbound dataadapter even when I told that that is impossible to bind a
dataadapter. You were staying to tell about that not binding of the
dataadapter. This confuses and makes in my idea good answers almost
impossible.

However, there are thousand ways to go further from the point you are now.
Be aware that most active in these newsgroups do not use the Strongly Typed
Dataset. One of the problems with it is that you cannot give good samples.

I have made a new sample based on the Designer version 2005 Strongly Typed
Dataset.

I have used as underlayer the code that is created by the Designer if you
drag a Designer DataSource Table in to the form and create with that
automaticly a DataGridView and toolstrip etc.

The last I did not do. The code that is generated by dragging that table on
your form, can be seen by clicking in top of solution explorer "show all
files" and than in the form open the part form1.designer.vb.

Here is the sample.

http://www.vb-tips.com/default.aspx?...6-5b7490dcc574

I hope this helps,

Cor


"Max" <Ma*@discussions.microsoft.com> schreef in bericht
news:97**********************************@microsof t.com...
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" <Ma*@discussions.microsoft.com> schreef in bericht
news:42**********************************@microsof t.com...
> 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" <Ma*@discussions.microsoft.com> wrote in message
>> news:24**********************************@microsof t.com...
>> > 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
>> >>
>> >>
>> >>
>>
>>
>>


Apr 4 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
4
by: Maurice | last post by:
Hi I was wondering what most of the designers in .NET create: bound windows forms or unbound windows forms. The applications I've made in Access were all bound forms but what is the best choice in...
2
by: hch | last post by:
dataAdapter.Update(data, "TableName") won’t work! I was about to deploy my first website on the Internet only to discover that the dataAdapter.Update() throws the Server Error in the third...
6
by: Geoff Pennington | last post by:
I have a class method that returns a DataAdapter. I want to access the table(s) contained in the DataAdapter. Of course, accessing the DataSets would be good enough, because I could get the tables...
13
by: Doug Bell | last post by:
Hi, I thought I had this sorted this morning but it is still a problem. My application has a DataAccess Class. When it starts, it: Connects to a DB (OLE DB) If it connects it uses an...
8
by: Zorpiedoman | last post by:
I keep getting a concurrency exception the second time I make a change and attempt to update a dataadapter. It appears this is by design, so there must be something I can do to avoid it. ...
2
by: susan.f.barrett | last post by:
Hi, Despite me being able to type the following in to SQL Server and it updating 1 row: > updatestockcategory 1093, 839 In my code, it is not updating any rows. dataSet = new DataSet();
3
by: Rich | last post by:
What is the diffeence bewtween a dataAdapter.InsertCommand and dataAdapter.SelectCommand (and dataAdapter.UpdateCommand for that matter)? Dim da As SqlDataAdapter conn.Open da.SelectCommand =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.