The schema returned by the new query differs from the base query (C#/SQL - VS 2012) -
The schema returned by the new query differs from the base query (C#/SQL - VS 2012) -
for homework task have develop c# application interface sql server database file (.mdf
), providing datagridview
browse contents, , several buttons execute queries.
i have been going well, found how add together queries table adapter, how phone call them etc.
now having problems making query returns maximum pay in hourlypayrate
.
i have database employee
contains next attributes: employeeid, name, position, hourlypayrate
.
my query
select max(hourlypayrate) employee
i right click employeetableadapter
, click "add query...", name max
, set in query. when click okay next error message:
the schema returned new query differs base of operations query.
the query executes correctly in query builder, when click "ok" save receive error.
looking around se there no definitive answers question.
thanks, michael.
the solution has been found, wondering.
the problem query returns table has different number of columns database.
usually in dbms's not issue, reason visual studio having none of that.
the solution query:
select employeeid, name, position, hourlypayrate employee (hourlypayrate = (select max(hourlypayrate) maxrate employee temptable))
and trimming unneeded result like. me simple having label derived it's info hourlypayrate attribute.
c# sql datagridview
Comments
Post a Comment