Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

tatement cannot be generated

I created an new dataset by right click on my project and selected Add -
Add New Item. From the wizard, I chose a Dataset object and gave the
new data object a name OrdersDO. The wizard created
the XSD and the code behind for the typed dataset
and I brung up a design surface to work with. I then draged tables from
the Server Explorer to add to the schema of the dataset visually.
I excluded some of the fields that I did not need from the table.
From the XML Schema section of the toolbox,I selected a data relation and
drag and drop it on the Customers object object.
I have 4 tables that i have added to the schema:

FREPORT TABLE
FRID (PK)
FRFrequency
FRComments
FROrderDate
FRRequired
FRCompletedDate

EMPLOYEE TABLE
EmpID (PK)
LastName
FirstName
EmpNumber
Branch
Title

CUSTOMER TABLE
CIF (PK)
LastName
FirstName
EmpID (FK)
LoanNumberID (FK)
FRID (FK)

LoanTable
LoanNumberID (PK)
LoanNumber

In the Relationship wizard, I selected Customers as parent
TABLE, and the other 3 as the child tables

I added the Data Access Layer to allow interaction of the
data objects with the data store and provide the methods
necessary to fill and update the dataset from the database.
To build this layer, I added a new item to my project and
selected the "Component Class" object from the list and
named it FRDA.
This gave me a design surface where I could visually add
more objects.

From the data section of the toolbox, I dragged a Data Adapter
object to the surface (use SqlDataAdapter)

I built my query using the query tool.

SELECT
Customer.LastName,
Employee.LastName AS Expr1,
FieldReports.*,
LoanInfo.LoanNumber
FROM
Customer INNER
JOIN
Employee ON
Customer.EMPID = Employee.EMPID INNER JOIN
FieldReports ON Customer.FRID = FieldReports.FRID INNER
JOIN LoanInfo ON Customer.LoanNumberID =
LoanInfo.LoanNumberID

The Data Adaptoer Configuration Wizard "View Wizard Results"
gives me the following:

Generate Update,Insert,Delete

The original query has a select list that has columns from
multiple tables. The statement cannot be generated
automatically for this type of query.

Does the above statement mean I have done something wrong?
Or does it mean I have to Update,Insert,Delete some other way?
[2590 byte] By [kenn_rosie] at [2007-11-11 7:36:45]