Excellent, thank you Miha for the quick response - your help has been
greatly appreciated.
All that is left now is to write some code
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
Yes, you need to pull whatever data you need. So, if you are going to
do updates or deletes you would need a key for each table affected.
--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development
www.rthand.com
Blog:
http://cs.rthand.com/blogs/blog_with_righthand/
Thanks for your help
One final question - if writing my own update etc commands do I need
to pull the respective tables key values through in order to do this?
Thanks again.
Darren Sim
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
Even if the view was updateable I would recommend writing sql
statements
--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development
www.rthand.com
Blog:
http://cs.rthand.com/blogs/blog_with_righthand/
Probably, your view is not updatable.
So, you must write Update/Delete/Insert commands manually, as
mentioned Miha.
Garik
:
There is a view on the database created using the sql in the select
statement on the code snippet. I was having problems using the
table that
so I defined it in the select statement.
da.Update(review, "reviewquestions");
reviewquestions is the view on the database.
if I use the code
public void saveReview(ref DataSet review)
{
string select = "SELECT * from reviewquestions";
OleDbDataAdapter da = new OleDbDataAdapter(select,
conn.ConnectionString);
OleDbCommandBuilder cb = new OleDbCommandBuilder(da);
da.Update(review, "reviewquestions");
}
I get the following error.
"Dynamic SQL generation is not supported against a SelectCommand
that does
not return any base table information."
Or create a view in the database and use that created view as a
table.
--
Regards,
Garik Melkonyan
MCP, MCAD, MCSD .NET
:
Sorry, I suppose more detail would help.
The problem I am experiencing is that when I run the update
message I get
an
error stating that
"Dynamic SQL generation is not supported against multiple base
tables"
The code I am using for this is below, it works fine against a
table
taken
directly from the source database, but encounters the above
problem when
trying to update a view.
public void saveReview(ref DataSet review)
{
string select = "SELECT s.done_id, a.areaname,
a.area_id,cat.catname,cat.cat_id, q.question_id,q.quest,
q.need,s.score,s.evidence, d.catcutoff";
select = select + " FROM tblcategory AS cat, tblarea AS a,
tblquestion as
q,
tblsesscore as s, tbldonecut as d";
select = select+ " WHERE cat.area_id=a.area_id and q.cat_id =
cat.cat_id
and
s.question_id = q.question_id and d.done_id = s.done_id and
d.cat_id =
cat.cat_id";
OleDbDataAdapter da = new OleDbDataAdapter(select,
conn.ConnectionString);
OleDbCommandBuilder cb = new OleDbCommandBuilder(da);
da.Update(review, "reviewquestions");
}
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
What is the problem?