Platypus1
Nov 17th, 2000, 11:20 AM
I have a form that includes a datagrid to retrieve parts ordered by a customer.
This grid needs to be based on a query of a particular order and should be able to add new parts and update it's rows.
Here is the layout of the two tables I'm using:
Sales Parts - table name
columns
SalesPartID - primary key auto increment
SalesPartName - part number
SalesPartDescription - text part description
SalesUnitPrice
Workorder Parts - table name
columns
WorkorderID - foreign key form Workorder Table
SalesPartID - foreign key references above table
SalesUnitPrice - Unit price modified on form
Quantity
The grid should display columns like this
quantity
Part Name - should be a list drop down
Part Description - based on list box
Unit Price
Extended Price
Consider the Workorder Parts table as an order detail table and the Sales Parts table as a product table and a Workorder table as an Order table.
How do I use either a dataenvironment control to reflect the data allowing for new and updates or how do I use a ADO control.
On my new form I used a DBgrid in unbound mode with a list box to pick the part number. I used a stored procedure to save it.
My problem is being able to update and add new when the data is queried into a grid control.
Any help would be greatly appreciated.
Thanks in advance.
This grid needs to be based on a query of a particular order and should be able to add new parts and update it's rows.
Here is the layout of the two tables I'm using:
Sales Parts - table name
columns
SalesPartID - primary key auto increment
SalesPartName - part number
SalesPartDescription - text part description
SalesUnitPrice
Workorder Parts - table name
columns
WorkorderID - foreign key form Workorder Table
SalesPartID - foreign key references above table
SalesUnitPrice - Unit price modified on form
Quantity
The grid should display columns like this
quantity
Part Name - should be a list drop down
Part Description - based on list box
Unit Price
Extended Price
Consider the Workorder Parts table as an order detail table and the Sales Parts table as a product table and a Workorder table as an Order table.
How do I use either a dataenvironment control to reflect the data allowing for new and updates or how do I use a ADO control.
On my new form I used a DBgrid in unbound mode with a list box to pick the part number. I used a stored procedure to save it.
My problem is being able to update and add new when the data is queried into a grid control.
Any help would be greatly appreciated.
Thanks in advance.