dataAdapter and datagrid help

keko2004

Active member
Joined
Feb 13, 2006
Messages
39
Location
Middle Village, NY
Programming Experience
1-3
hey guys im having trouble understanding how to do something. i have a data grid and i need to display columns from 2 different tables in it. i know how to set it up so you can click the parent and then the childs will display. but i need all the columns to show on the grid at one time. i used a query builder and that made this select statement.

VB.NET:
SELECT
    Customers_CD.customer_id, 
    Customers_CD.phone_number, 
    Customers_CD.email_address, 
    Customers_CD.customer_first, 
    Customers_CD.customer_last, 
    Customer_Address_CD.customer_id AS Expr1, 
    Customer_Address_CD.address_id, 
    Customer_Address_CD.address_1, 
    Customer_Address_CD.address_2, 
    Customer_Address_CD.town_city, 
    Customer_Address_CD.state_county, 
    Customer_Address_CD.zip_postal_code
FROM
    Customers_CD INNER
JOIN
    Customer_Address_CD ON
        Customers_CD.customer_id = Customer_Address_CD.customer_id

this works fine pulls all the data from both tables fine. but how do i create an update/insert and delete sql statement so i can update through the data grid? anyone make any suggestions about how to update both tables when the user inputs data in the grid. or maybe another way of doing this .thanks
 
in my experience, there is no way to update both tables by using the commandbuilder.getInsertcommand or commandbuilder.getUpdatecommand because dataadapter is assigned to only 1 table so it can update, delete or insert only one table at one time, other than the selecting sancerio you mentioned, does anyone has any ideas?
 
Back
Top