Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Why DataSet Property Is Null When Running Program?
Sat, Apr 7 2018 7:53 PMPermanent Link

Frederick Chin

I have a form and a database defined in a project. The database has a single dataset that points to a DBISAM table (bid) with a single field (email). The formh as a single EditBox with the DataSet property set to the table and the DataColumn set to the field.

When running the program, the DataSet goes missing.

Why does this happen?

I have attached the project.

--
Frederick

--
Frederick



Attachments: testnods.zip
Sun, Apr 8 2018 5:01 AMPermanent Link

Uli Becker

Frederick,

I don't understand what you are doing in the OnShow event of your main
form (and why), but it would be a good idea to (auto)create "datamodu"
*before* your main form.

Ui
Sun, Apr 8 2018 11:02 AMPermanent Link

Frederick Chin

Uli,

/*
I don't understand what you are doing in the OnShow event of your main
form (and why), but it would be a good idea to (auto)create "datamodu"
*before* your main form.
*/

Thanks. The auto creation of the database before the main form solved the problem. I think it could be a timing issue because this is the first time I had editable controls in the main form.

In my previous projects where the database was created after the main form, there were no issues with the missing dataset in secondary forms.

I hadn't thought of auto creating .the database before the main form because in Delphi, this would cause issues.

--
Frederick
Mon, Apr 9 2018 6:18 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Frederick,

<< I hadn't thought of auto creating .the database before the main form because in Delphi, this would cause issues. >>

Yes, EWB specifically allows you to auto-create forms/databases *before* the main form, and that resolves this issue.

Tim Young
Elevate Software
www.elevatesoft.com
Image