Hello,
I have a dataadapter that joins two tables with and inner join. I'm trying to use CommandBuilder to create SQL commands. I know it's impossible to do it directly, but I found two suggestions:
1.
"You can only update 1 of the tables in the join. So pick one, change the SQL
query for the adapter to be a SELECT just from that table of the appropriate
columns, and then create the command builder. That way the command builder
will ignore any other columns, and the update will be able to update that
one table."
2.
"I had a similar problem, which I solved by using 2 dataadapters: one
which SELECTs without a JOIN and is used for UPDATEing, and another with
the JOIN. They both work with the same dataset - one reads, the other writes"
I was trying to use this solutions, but I'm unable to write a correct vb.net code. Does anybody used one of this solution and can paste some code here?
Thank you in advance!
I have a dataadapter that joins two tables with and inner join. I'm trying to use CommandBuilder to create SQL commands. I know it's impossible to do it directly, but I found two suggestions:
1.
"You can only update 1 of the tables in the join. So pick one, change the SQL
query for the adapter to be a SELECT just from that table of the appropriate
columns, and then create the command builder. That way the command builder
will ignore any other columns, and the update will be able to update that
one table."
2.
"I had a similar problem, which I solved by using 2 dataadapters: one
which SELECTs without a JOIN and is used for UPDATEing, and another with
the JOIN. They both work with the same dataset - one reads, the other writes"
I was trying to use this solutions, but I'm unable to write a correct vb.net code. Does anybody used one of this solution and can paste some code here?
Thank you in advance!