Home All Groups Group Topic Archive Search About

Data Grid and table binding

Author
21 Nov 2005 3:56 PM
Andreas Schubert
Hello newsgroup,

i am not sure if i am asking at the right place. If not, please forgive me.
I want to bind a table to a datagrid and make it editable.
I know how to data bind and so, but I got trouble with the dataadapter.
at runtime, the user selects a table from a list. with "Select * FROM table"
I can show the content
of the table in the grid. but how do I make it updatable? I would have to
define a update command from the table. is there a way to generate such a
command or is there an alternative?

thanks for the help!

Andy

Author
21 Nov 2005 3:56 PM
Joe
Hi Andy,

You can use SqlCommandBuilder to generate the Update command for the
dataadapter.

-Joe

Show quote
"Andreas Schubert" <anwendungsprogrammierer.RemoveSpam@web.de> wrote in
message news:OvKSyMr7FHA.3048@TK2MSFTNGP10.phx.gbl...
> Hello newsgroup,
>
> i am not sure if i am asking at the right place. If not, please forgive
> me.
> I want to bind a table to a datagrid and make it editable.
> I know how to data bind and so, but I got trouble with the dataadapter.
> at runtime, the user selects a table from a list. with "Select * FROM
> table" I can show the content
> of the table in the grid. but how do I make it updatable? I would have to
> define a update command from the table. is there a way to generate such a
> command or is there an alternative?
>
> thanks for the help!
>
> Andy
>
Author
22 Nov 2005 5:24 AM
luxspes
Joe wrote:
> Hi Andy,
>
> You can use SqlCommandBuilder to generate the Update command for the
> dataadapter.
Maybe you should read:
http://msdn.microsoft.com/vbasic/default.aspx?pull=/library/en-us/dnvs05/html/newdtastvs05.asp
Or you can forget about datasets and use http://www.nhibernate.org ;)

Show quote
>
> -Joe
>
> "Andreas Schubert" <anwendungsprogrammierer.RemoveSpam@web.de> wrote in
> message news:OvKSyMr7FHA.3048@TK2MSFTNGP10.phx.gbl...
>
>>Hello newsgroup,
>>
>>i am not sure if i am asking at the right place. If not, please forgive
>>me.
>>I want to bind a table to a datagrid and make it editable.
>>I know how to data bind and so, but I got trouble with the dataadapter.
>>at runtime, the user selects a table from a list. with "Select * FROM
>>table" I can show the content
>>of the table in the grid. but how do I make it updatable? I would have to
>>define a update command from the table. is there a way to generate such a
>>command or is there an alternative?
>>
>>thanks for the help!
>>
>>Andy
>>
>
>
>
Author
22 Nov 2005 9:34 AM
Andreas Schubert
thank you for the quick answer Joe,

works like a charm.
But one question is popping up after trying out SQLCommandbuilder:
Documentation states that this is working for simple tables. Is there a way
to make it work with
joined tables?

thanks

Andy

Show quote
"Joe" <jbassking@noemail.noemail> schrieb im Newsbeitrag
news:OV0KrQr7FHA.1416@TK2MSFTNGP09.phx.gbl...
> Hi Andy,
>
> You can use SqlCommandBuilder to generate the Update command for the
> dataadapter.
>
> -Joe
>
> "Andreas Schubert" <anwendungsprogrammierer.RemoveSpam@web.de> wrote in
> message news:OvKSyMr7FHA.3048@TK2MSFTNGP10.phx.gbl...
>> Hello newsgroup,
>>
>> i am not sure if i am asking at the right place. If not, please forgive
>> me.
>> I want to bind a table to a datagrid and make it editable.
>> I know how to data bind and so, but I got trouble with the dataadapter.
>> at runtime, the user selects a table from a list. with "Select * FROM
>> table" I can show the content
>> of the table in the grid. but how do I make it updatable? I would have to
>> define a update command from the table. is there a way to generate such a
>> command or is there an alternative?
>>
>> thanks for the help!
>>
>> Andy
>>
>
>

AddThis Social Bookmark Button