Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Default Database. Where to change?
Wed, Jul 15 2020 10:56 PMPermanent Link

Polywick Studio

Please see attached.

Where do I change the name from "Database Default" to something else?



Attachments: where.png
Thu, Jul 16 2020 6:09 AMPermanent Link

R&D team @ Environment Canada

From the screenshot, I am guessing that you are trying to open a dataset without having it configured.

By working with the Master-Detail example, you will get a better idea of how that works.

There is a bit of a learning curve, but once you get it.. you will probably find it works quite well.

The EWB chapter on 'Using Databases' has quite a bit of good background information.

//.. Bruno


Polywick Studio wrote:

Please see attached.

Where do I change the name from "Database Default" to something else?
Thu, Jul 16 2020 12:51 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< Where do I change the name from "Database Default" to something else? >>

If you are using the default database, then you need to change the database name in code in the OnCreate event handler for the main form:

procedure TForm1.Form1Create(Sender: TObject);
begin
  Database.DatabaseName:='TestDB';
  Database.LoadRows(Customers);
end;

If you plan on having a lot of datasets, then it might be better for you to create a separate TDatabase instance and use that instead.  You can define the database/datasets in the Database Manager and then drag/drop the database from the Database Manager into the Project Manager (Units section).

This is covered in the manual:

https://www.elevatesoft.com/manual?action=viewtopic&id=ewb2&topic=Database_Manager

Tim Young
Elevate Software
www.elevatesoft.com
Image