Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 20 total
Thread Test Web Server
Mon, Jan 30 2012 4:48 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

I've attached a test web server (with source code) that will serve up DBISAM
4.x tables as JSON to any EWB application.  The source code requires DBISAM
(for the tables) and EDB (for the web server core), so you'll need both if
you want to recompile it.  Also, you'll need to make sure to turn off the
internal web server in EWB, or else you'll get an IP address bind conflict.

The root document directory should be set to the output path for the EWB
project that you want to run, and the DBISAM database directory should be
set to the location of the DBISAM tables that you want to use.

The structure of the URLs used when accessing this server in order to load
tables and their structures via JSON should be:

http://localhost/<TableName>?method=<Method>

where <TableName> is the name of the DBISAM table to load (must reside in
the database directory specified on the main form), and <Method> is either
"columns" or "rows".

For example, to load the structure for a DBISAM table called vendors from
within the IDE for a TDataSet component, you would use this URL:

http://localhost/vendors?method=columns

and the columns will be automatically loaded for the TDataSet.  The steps to
do this are:

1) Edit the Columns property for the desired TDataSet by clicking on the ...
button in the Object Inspector.
2) Once the Columns editor is open underneath the Object Inspector, click on
the far-right toolbar button above the columns list.  This is the "Get Data
Columns" option, and will prompt you for a URL to use for retrieving the
dataset structure as JSON.  Provided that you used the correct URL, you will
see a list of columns appear after you click on Ok.

Finally, this dataset loading functionality will be present in the EWB IDE
shortly, so this is just a temporary thing.

If you have any questions, please let me know.

--
Tim Young
Elevate Software
www.elevatesoft.com



Attachments: testserver.zip
Fri, Feb 17 2012 7:34 AMPermanent Link

Fernández Sotelo


could you give an example of json file, I get the following error when loading columns. Thanks

my json

{"columns": [{"name":"john","type":"string"}, {"name":"peter","type":"string"}]}






"Tim Young [Elevate Software]" wrote:

I've attached a test web server (with source code) that will serve up DBISAM
4.x tables as JSON to any EWB application.  The source code requires DBISAM
(for the tables) and EDB (for the web server core), so you'll need both if
you want to recompile it.  Also, you'll need to make sure to turn off the
internal web server in EWB, or else you'll get an IP address bind conflict.

The root document directory should be set to the output path for the EWB
project that you want to run, and the DBISAM database directory should be
set to the location of the DBISAM tables that you want to use.

The structure of the URLs used when accessing this server in order to load
tables and their structures via JSON should be:

http://localhost/<TableName>?method=<Method>

where <TableName> is the name of the DBISAM table to load (must reside in
the database directory specified on the main form), and <Method> is either
"columns" or "rows".

For example, to load the structure for a DBISAM table called vendors from
within the IDE for a TDataSet component, you would use this URL:

http://localhost/vendors?method=columns

and the columns will be automatically loaded for the TDataSet.  The steps to
do this are:

1) Edit the Columns property for the desired TDataSet by clicking on the ...
button in the Object Inspector.
2) Once the Columns editor is open underneath the Object Inspector, click on
the far-right toolbar button above the columns list.  This is the "Get Data
Columns" option, and will prompt you for a URL to use for retrieving the
dataset structure as JSON.  Provided that you used the correct URL, you will
see a list of columns appear after you click on Ok.

Finally, this dataset loading functionality will be present in the EWB IDE
shortly, so this is just a temporary thing.

If you have any questions, please let me know.

--
Tim Young
Elevate Software
www.elevatesoft.com



Attachments: error.png
Mon, Feb 20 2012 8:11 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

<< could you give an example of json file, I get the following error when
loading columns. Thanks  >>

You can see the JSON generated by the test web server directly in the EWB
IDE by doing the following:

1) Make sure the test web server is running, and that the test DBISAM
Customer table files (customer.dat, customer.idx) are present in the
specified database directory.
2) Drop a TServerRequest component on a form.
3) Click on the .. button for the Params property of the TServerRequest
component in the Object Inspector.  Input the following for the Params:

method=columns

2) Click on the ... button for the URL property of the TServerRequest
component in the Object Inspector.
3) Input the following URL into the URL test dialog:

http://localhost/customer

Click on the Test button, and you will see the JSON results.  You can then
save them to a text file, etc.

I hope that helps,

--
Tim Young
Elevate Software
www.elevatesoft.com
Sun, Sep 23 2012 11:20 PMPermanent Link

Jeff Cook

Aspect Systems Ltd

Avatar

Hi

Sorry to revive an old thread - just getting up to speed on this EWB.
-------------------------
"Tim Young [Elevate Software]" wrote:

I've attached a test web server (with source code) that will serve up DBISAM
4.x tables as JSON to any EWB application.  The source code requires DBISAM
(for the tables) and EDB (for the web server core), so you'll need both if
you want to recompile it.  Also, you'll need to make sure to turn off the
internal web server in EWB, or else you'll get an IP address bind conflict.
--------------------------

I want to adapt this server to serve DBISAM 3 files, so need to recompile.   I have EDB installed, but when I try to open the project I get "Class: EDBWebServer not found...."   EDBWebServer doesn't seem to be mentioned in the manuals, so perhaps I am missing some "extra" download.

Cheers'

Jeff
Mon, Sep 24 2012 12:30 AMPermanent Link

Uli Becker

Jeff,

> I want to adapt this server to serve DBISAM 3 files, so need to recompile.   I have EDB installed, but when I try to open the project I get "Class: EDBWebServer not found...."   EDBWebServer doesn't seem to be mentioned in the manuals, so perhaps I am missing some "extra" download.

You'll find it in edbutilcomps.pas (normally installed in C:\Program
Files (x86)\ElevateDB 2 ADD\utilcomps). Just install the package.

If you are using Unicode, have a look here before:

http://www.elevatesoft.com/forums?action=view&category=edb&id=edb_general&page=1&msg=8255#8255

Uli
Mon, Sep 24 2012 12:36 AMPermanent Link

Uli Becker

Jeff,

one more hint: when you install the designtime package, you have to
replace "edbrun" in the "requires" clause by the current version of your
runtime package of EDB, e.g. "edb208rsdelphi2010run".

Uli
Mon, Sep 24 2012 4:39 PMPermanent Link

Jeff Cook

Aspect Systems Ltd

Avatar

Thanks, Uli

Cheers

Jeff
Mon, Sep 24 2012 8:05 PMPermanent Link

Jeff Cook

Aspect Systems Ltd

Avatar

Hi Uli

I went looking for "edbutilcomps.pas" and found it here "C:\Program Files\ElevateDB Additional\Version 2\utils\edbmgrunicode\source" BUT it doesn't contain the TEDBWebServer component Frown

Cheers

Jeff
--

Uli Becker wrote:

Jeff,

one more hint: when you install the designtime package, you have to
replace "edbrun" in the "requires" clause by the current version of your
runtime package of EDB, e.g. "edb208rsdelphi2010run".

Uli
Tue, Sep 25 2012 4:21 AMPermanent Link

Uli Becker

Jeff,

> I went looking for "edbutilcomps.pas" and found it here "C:\Program Files\ElevateDB Additional\Version 2\utils\edbmgrunicode\source" BUT it doesn't contain the TEDBWebServer component Frown

On my computer it's here:

C:\Program Files (x86)\ElevateDB 2 ADD\utilcomps\edbutilcomps.pas

More than likely you are using an older version that does not contain
edbWebserver already.

Uli
Tue, Sep 25 2012 5:21 PMPermanent Link

Jeff Cook

Aspect Systems Ltd

Avatar

Very strange!

I only downloaded EDB last week (2012-09-19) and got the following files:-

202b15edbadd.exe
202b15edbvclcssrcdelphi7.exe

.... so I can't see how I can be missing anything.

Cheers

Jeff



--
Jeff Cook
Aspect Systems Ltd
www.aspect.co.nz

"Uli Becker" <johnmuller54@gmail.com> wrote in message
news:C7A9D5CC-DA8C-4630-A8B6-3A90168CCF7E@news.elevatesoft.com...
> Jeff,
>
>> I went looking for "edbutilcomps.pas" and found it here "C:\Program
>> Files\ElevateDB Additional\Version 2\utils\edbmgrunicode\source" BUT it
>> doesn't contain the TEDBWebServer component Frown
>
> On my computer it's here:
>
> C:\Program Files (x86)\ElevateDB 2 ADD\utilcomps\edbutilcomps.pas
>
> More than likely you are using an older version that does not contain
> edbWebserver already.
>
> Uli

Page 1 of 2Next Page »
Jump to Page:  1 2
Image