Components of Px Framework:
Data loading from the Oracle, MSSQL, MySQL, FireBird, Interbase database by means of the PxWebQuery components
The PxWebQuery component enables easy data loading from the database and
facilitates working with thus loaded data.
In our example, the ConnectionString is linked to the ConnectString, and
the SQL command relating to the data you want to load is linked to
the SQLSelect property.
Data loading is then executed by means of the "Open" command.
protected void Page_Load(object sender, EventArgs e)
wquAdresar.ConnectString = "User Id=adr;Password=aa;Data Source=xe;";
wquAdresar.SQLSelect = "select idadresar , name, address, create_date from Adresar";
Program inserting of a new row into the database by means of the PxWebQuery component
To insert new rows with the help of the PxWebQuery component you need to create
a sequence, from which the PxWebQuery component shall load a unique ID for
its primary key. The name of the sequence shall be created in the following way.
SEQ_"name of primary key column name"
Therefore, when you create new tables, do not name the primary key column as 'ID' only, but as ID + "table name".
In our example, for the data inserting into the database to work as well, create the sequence by the SQL command:
CREATE SEQUENCE SEQ_IDADRESAR
START WITH 1
INCREMENT BY 1
Attention !!! Of course on other database platforms the sequence is created
in a different way, for more details please refer to the Part Four of
"Specification of using the Px Framework on different database platforms
(Oracle, MS SQL, MySQL, Firebird, InterBase).
Therefore, when you enter the "wquAdresar.Insert ()" command, the PxWebQuery component
automatically calls the sequence, which generates a new ID for the primary key .
You do not have to worry about generation and assigning of a unique key to
the field where the primary key ID is entered.
For more information, please refer to the example below:
wquAdresar.Fields["name"] = "Grof Monte Christo";
wquAdresar.Fields["idpravnaforma"] = " Physical Person";
wquAdresar.Fields["address"] = "Karlovarska 2";
wquAdresar.Fields["create_date"] = "04.07.2010";
wquAdresar.Fields["invalid_adress"] = "N";
Here is a functional example of the PxWebQuery component, even with source code.
This functional example on this site runs on MySQL 5.0 database.
Others articles of Px Framework:
- PxWebQuery - component for working with databases
- PxSuperGrid - component for the direct display of data in the table
- PxEdit - component for data editing, similar to the TextBox component
- PxComboBox - component for selecting data from a list, similar to the DropDownList component
- PxCheckBox - component for checking the value (Check / UnCheck value)
- PxFlyComboBox - set of the consecutively linked comboboxes, suitable for the work with structured data (for example: selection of category and subcategory)
- PxGreatRepeater - component for entering data with repeating structure, maximum number of values is limited
- PxDbNavigator - the component for the work with the PxWebQuery components, row cursor movement, etc.
- PxLabel - component for data display
- PxCheckBoxList - component to view and select values from the list
- PxRadioButtonList - component for view and selection of a value from the list
- PxChart - the component for displaying and working with charts
- PxFilterView - visual component for filtering the table data contents in the PxWebQuery component
- PxUploader - component for uploading binary and text files to the server
- PxLogin - component for authorization and logging into the application
- Data loading from the Oracle, MSSQL, MySQL, FireBird, Interbase database by means of the PxWebQuery components
- Program inserting, editing or deleting of row into the database by means of the PxWebQuery component
- Loading values from the PxWebQuery component via the while cycle
- Row search in the PxWebQuery component according to the value entered and the name of the column where the search shall be carried out
- The "ReOpen" procedure of the PxWebQuery component and data re-load into the PxWebQuery component
- Validation, checking of the entered values by means of the PxWebQuery component and other visual components (PxEdit, PxComboBox, etc.)
- Events of the PxWebQuery component
- A special function GetValueFromStructKey of the PxWebQuery component
- Setting the language mutation of the Px Framework
- Finding the current version of the Px Framework
It doesn't the intention of this part website, describe in detail the work with PxFramework components, a detailed description of the component
available in manual, which can be downloaded here: Download manual of Px Framework