Adding Data in the Result Window Print this Topic Previous Page Up One Level Next page

Home >  Tutorials > "ZooDB" Database > Inserting Data into the Database >

Adding Data in the Result Window

A more convenient way to insert data into the database is to add data directly in the Result window.


Note that the Result window has to be enabled for data editing before you can add or delete rows or edit the data displayed in the result grid. For this purpose, the Edit Data command is available in the context menu that opens when you right-click a table or column in the Online Browser.



To add a new food supplier in the Result window:

1.In the Online Browser, right-click the tblFeedSuppliers table and select Edit Data from the context menu; alternatively, select the table and press Ctrl+Alt+E.


2.DatabaseSpy generates a SELECT statement in a new SQL Editor window, automatically executes it, and enables the Result window for editing. A popup appears, informing you that editing of data is limited for this table.


3.Click the Show Details button to learn which columns cannot be edited.


4.Optionally, if you want to suppress this popup in the future, click the Don't show this dialog again! check box.
5.Click OK to close the popup and display the data in the Result window.
6.In the Result window, click the Append a new row ic_add_line icon. Please note that the cursor automatically appears in the "SupplierName" column because the value for the "SupplierID" column will be generated automatically when the data is committed to the database.


7.Enter the following data into the newly created row:

Food4Animals | 67 Ella Drive | Boston | MA | (515)555-8647

8.Click the ic_commit button to save the changes to the database.
9.Optionally, click the "update" hyperlink next to tblFeedSuppliers in the Online Browser to update the row count of the table.


© 2019 Altova GmbH