Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Converting EWB2 datasets to EWB3
Sun, May 3 2020 4:36 PMPermanent Link

Richard Harding

Wise Nutrition Coaching

I am converting my EWB2 datasets to EWB3 and I am having trouble with one of them. I cannot load StockCosts rows into an empty StockCosts table. If StockCosts rows are present I cannot delete, insert or edit.

The table Stock has a Master-Detail relationship with StockCosts (Stock =>> StockCosts).

The Stock edit form allows the user to edit a Stock item and edit, add, delete many StockCosts items. The user clicks OK and edits are committed.

With EWB3, I receive an error "Invalid Date 3/5/2020". I am using the DateEditComboBox to enter the date. The default date is the Current Date.

With EWB2, the Supplier Name is obtained from the Supplier table and is displayed in a grid. How is this managed in EWB3?


CREATE TABLE "StockCosts"
(
"ID" INTEGER GENERATED ALWAYS AS IDENTITY (START WITH 0, INCREMENT BY 1) NOT NULL,
"StockCategory" VARCHAR(3) COLLATE "ANSI_CI" NOT NULL,
"StockNumber" INTEGER NOT NULL,
"SupplierID" INTEGER DEFAULT 0 NOT NULL,
"Date" TIMESTAMP DEFAULT CURRENT_DATE NOT NULL,
"Qty" DECIMAL DEFAULT 0 NOT NULL,
"Cost" DECIMAL(19,2) DEFAULT 0 NOT NULL,
"Comment" VARCHAR(40) COLLATE "ANSI_CI",
CONSTRAINT "scPrimaryIND" PRIMARY KEY ("ID"),
)


EWB2 esStockCosts dataset definition
------------------------------------
SELECT
  StockCosts.ID, StockCategory, StockNumber,
  SupplierID,
  (SELECT Supplier FROM Supplier WHERE StockCosts.SupplierID = Supplier.ID) AS Supplier,
  StockCosts.Date, StockCosts.Qty, StockCosts.Cost,
  StockCosts.Comment
FROM
  StockCosts
WHERE
  StockCategory={StockCategory='BHS'} AND StockNumber={StockNumber=1}
ORDER BY StockCategory, StockNumber, "Date" DESC


Richard
Tue, May 5 2020 1:40 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Richard,

<< With EWB3, I receive an error "Invalid Date 3/5/2020". I am using the DateEditComboBox to enter the date. The default date is the Current Date. >>

Are you seeing this error during the transaction commit ?

Tim Young
Elevate Software
www.elevatesoft.com
Tue, May 5 2020 7:15 PMPermanent Link

Richard Harding

Wise Nutrition Coaching


<< With EWB3, I receive an error "Invalid Date 3/5/2020". I am using the DateEditComboBox to enter the date. The default date is the Current Date. >>

<<Are you seeing this error during the transaction commit ?>>

The error first appears when the Insert button is clicked on the navigator toolbar. The only code in the nvStockCostsButtonClick event for the Insert button is to set the Result to true.

The message is also displayed when the DataSet.Save method is executed. The row is Committed.

Richard
Wed, May 6 2020 10:20 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Richard,

<< The error first appears when the Insert button is clicked on the navigator toolbar. The only code in the nvStockCostsButtonClick event for the Insert button is to set the Result to true.

The message is also displayed when the DataSet.Save method is executed. The row is Committed. >>

Can you send me a project that I can run here and test ?  It sounds like the error is coming from somewhere in your code, but I can't tell you where without running it here.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, May 7 2020 5:54 PMPermanent Link

Richard Harding

Wise Nutrition Coaching

Tim

<<Can you send me a project that I can run here and test ?  It sounds like the error is coming from somewhere in your code, but I can't tell you where without running it here.>>

Will do. How do I send you the dataset definitions?

Thank you.
Richard
Fri, May 8 2020 1:24 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Richard,

<< Will do. How do I send you the dataset definitions? >>

I'll need you to cut down the example to one dataset, and then I'll just need the SELECT statement for the dataset and its name.

Tim Young
Elevate Software
www.elevatesoft.com
Image