How do I bind a multi-table query to a grid or repeater and make it updatable/editable

  • Thread starter Thread starter rob merritt
  • Start date Start date
R

rob merritt

here is the sort of query I want to use to bind data to some control:

SELECT employee.lastName, employee.firstName,
account_supervisor_int.acctCode_ID_FK,
account_supervisor_int.employee_ID_FK, employee.employeeID,
account.acctCode, account.acctnum
FROM employee, account, account_supervisor_int
WHERE (((account_supervisor_int.acctCode_ID_FK)=account_supervisor_int.acctCode)
AND ((account_supervisor_int.employee_ID_FK)=[employeeid]));


then whi I would like to do is be able to update/edit
account_supervisor_int.acctCode


any hints or examples appreciated
 
Uzytkownik "rob merritt said:
here is the sort of query I want to use to bind data to some control:

SELECT employee.lastName, employee.firstName,
account_supervisor_int.acctCode_ID_FK,
account_supervisor_int.employee_ID_FK, employee.employeeID,
account.acctCode, account.acctnum
FROM employee, account, account_supervisor_int
WHERE
(((account_supervisor_int.acctCode_ID_FK)=account_supervisor_int.acctCode)
AND ((account_supervisor_int.employee_ID_FK)=[employeeid]));


then whi I would like to do is be able to update/edit
account_supervisor_int.acctCode

Some attentions:
1. I suppose that your query is incorrect - for examle connection:
account_supervisor_int.acctCode_ID_FK = account_supervisor_int.acctCode
and lack of connection account table with others,

2. instead of collect data to your datagrid from one query, take data from 3
tables in your database (accoutns, employee, account_supervisor_int) and
insert them to 3 datatables in your dataset. Of course, corresponding data.

3. alternatively, if you like to update only data from employee table, set
other columns to read only mode (in datagrid or in datatable) and manually
make suitable command in your dataadapter for update, insert and delete.

Regards,
Grzegorz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top