![]() ' the method deleterows needs a sequence of bookmarksĭim a( oRowset. ' the number depends of several but do some times a test or look if all records are deleted. Here’s my code: Declare SQL varchar (8000) SET QUERY 'DELETE FROM London. OpenOffice Calc is an open source free software program with features. ' I think it is not good to use it for a lot of records. Delete all records from a table, using a simple batch process I’m trying to delete all records from a table, using a simple batch process. ORowset = ' I use the word Rowset but it points to a FormModel as in the formnavigator ' I think this can not be used with joined tables but I think that can also not done with the normal workingĭim oRowset ' I use the name Rowset there I hope, it can also used in grid for a datasource 'It is only test in a simple form with a simple gridcontrol in one table When you execute a SQL statement then OpenOffice does not know what happens with the database and the database must be reloadedĬode: Select all sub DeleteAllrecords(oEvent) When you work with the API then OpenOffice does know what happens with the database. Use the following INSERT command to insert data into the table one row at a time: INSERT INTO SALESMAN ( SNR, FIRSTNAME, LASTNAME, STREET, STATE, ZIP, BIRTHDATE ) VALUES ( 1, 'Joseph', 'Smith', 'Bond Street', 'CA', '95460', '' ) Note the single quotes around the values for the text fields. The sub is real basic and can be expand with some testing there my goal was finding how it works. The use of this sub is you filter your table and you want delete this records. I think when you want delete the complete table this sub is not what you must use. There a gridcontrol also is used as datasource in a database I think the sub can also be used in such a way but I have not test it. A gridcontrol connects to the same rowset as the form but from little tests it seems I can better use it in the form. Right-click on a row selector and choose 'Delete Rows'. Execute In the GUI with the table opened unfiltered: Click the grey box in the top-left corner between column headers and row selectors. I think it does not matter if there is a gridcontrol in that form. DELETE FROM 'table name in double quotes'. DELETE FROM tablename / DELETE FROM tablename WHERE 11 (is the same) Is a DML (Data Manipulation Language), you can delete all data. DDL statements example: CREATE, ALTER, DROP, TRUNCATE, etc. If you want to use this, you need DDL privileges in table. Be careful that the button is in the same form as from with you delete the data, check this in the form navigator. Is a DDL (Data Definition Language), you can delete all data and clean identity. Organizing questions is for the programmer. I think be carefull when you place a button in a form there it delete all records without questions. In that thread is explained with an example how to work with a selection in a gridcontrol. Macro to insert data into another table based on selection. I did search on this forum and found this We need the Status Bar and Column & Row Headers visible in the View-menu but you can remove Sidebar (Image 1). On the Dutch forum was a question about to delete all records in a table. Uncheck all the unnecessary tools (Image 1).
0 Comments
Leave a Reply. |