Single-tier IntraWeb and RemObjects DataAbstract server PDF Print E-mail
Written by Bernhard Fischer   
Tuesday, 20 February 2007
Article Index
Single-tier IntraWeb and RemObjects DataAbstract server
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
Page 8


This article was first published in 2006

This is a simple example how to create a basic IntraWeb (IW) standalone server utilizing RemObjects DataAbstract (DA) in a single-tier application. It will show a login page in your web browser. After you could be authenticated, your username and login time is shown on a new page. Additionally you can view the table of users from the database.


We will use Delphi 7, IntraWeb 5.0, a Firebird 1.5 database and Remobjects DataAbstract 4. Newer versions should also work, of course. There is a download link at the end of this article where you can find the complete source code and a SQL file to reconstruct this example. Basic knowledge of all used technologies is required and assumed. So if you never created an IntraWeb or DataAbstract application before, this is what you perhaps should do first in separated scenarios. Some very basic steps in this article (defining DA connections etc.) are not described in detail.

The screenshots in this article may not be the most brilliant ones - I tried to keep them small to minimize the download time for this page.

First of all, the Firebird database IWRODA, containing a single table USERS should be prepared with the sql script (to keep it simple, I put the database and the code project in a folder C:\temp\IW-RODA. Database user is SYSDBA, password is masterkey. If you want to use a different setup, please adjust the parameters in the SQL script and in the schemas' connection string).

The IW server in the sample zip file is set up to work only on interface 127.0.0.1 and port 8099.

[click to collapse source code]

 
SET SQL DIALECT 3;
SET NAMES NONE;
CREATE DATABASE 'C:\temp\IW_RODA\IWRODA.fdb'
USER 'SYSDBA' PASSWORD 'mastereky' PAGE_SIZE 16384 DEFAULT CHARACTER SET NONE;
******************************************************************************/
/***                                 Tables                                 ***/
/******************************************************************************/
CREATE TABLE USERS (
    USERNAME  VARCHAR(16) NOT NULL,
    USERPASS  VARCHAR(16) NOT NULL,
    FORENAME  VARCHAR(16),
    LASTNAME  VARCHAR(16)
);
 
INSERT INTO USERS (USERNAME, USERPASS, FORENAME, LASTNAME) VALUES ('user', 'pass', 'John', 'Doe');
INSERT INTO USERS (USERNAME, USERPASS, FORENAME, LASTNAME) VALUES ('user2', 'pass2', 'George', 'Bush');
INSERT INTO USERS (USERNAME, USERPASS, FORENAME, LASTNAME) VALUES ('user3', 'pass3', 'Who', 'Cares');
 
COMMIT WORK;
 
/******************************************************************************/
/***                              Primary Keys ***/
/******************************************************************************/
 
ALTER TABLE USERS ADD CONSTRAINT PK_USERS PRIMARY KEY (USERNAME);
 
 
 

Then we will run the Delphi project wizard to create a IntraWeb standalone application with datamodule.

click to enlarge


Last Updated ( Friday, 18 January 2008 )
 
Next >