Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread EWB 1 or 2 server sample
Mon, Jun 1 2015 11:52 AMPermanent Link

Godfrey

Ultimatesoft

Hi All

I am looking for a simple delphi sample app using EWB modules(custom datasets) to create a server that links to MSSql Server using ADO components,  I have looked at all the samples and they all use elevate databases.
Not sure what code I need to add to initialize database connection and for requests.  My client is using MS Sql Server.  Just maybe 2 tables with a few fields.

Thanks
Godfrey
Mon, Jun 1 2015 1:51 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Godfrey,

<< I am looking for a simple delphi sample app using EWB modules(custom
datasets) to create a server that links to MSSql Server using ADO
components,  I have looked at all the samples and they all use elevate
databases. >>

Did you look at the custom dataset module example that uses a TClientDataSet
?  It shows how to do so, and you can find it in this download:

http://www.elevatesoft.com/download?action=info&category=ewb&type=ewbmodule&majorversion=1&version=1.05

under the \Examples directory.

Also, EWB 2 has automated custom dataset module request handling quite a bit
more than EWB 1, so there isn't nearly as much code required:

http://www.elevatesoft.com/manual?action=viewmethod&id=ewb2mod&product=rsdelphi&version=XE&comp=TEWBDatabaseAdapter&method=HandleRequest

In EWB 1, you have to code the request handling manually, whereas in EWB 2
you can just call this method and it will handle everything for you,
triggering various events for authentication and dataset filtering as
necessary.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Jun 2 2015 2:56 AMPermanent Link

Godfrey

Ultimatesoft


Also, EWB 2 has automated custom dataset module request handling quite a bit
more than EWB 1, so there isn't nearly as much code required:


Tim Young
Elevate Software
www.elevatesoft.com


Thanks I found that example.  Did not have EWB 1 installed.  

Regarding the request handling.  I see in the TDatasetModule.EWBModuleExecute event you have
code to handle the request.  Do I not need to use this in Ver2?

Godfrey
Wed, Jun 3 2015 10:31 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Godfrey,

<< Regarding the request handling.  I see in the
TDatasetModule.EWBModuleExecute event you have code to handle the request.
Do I not need to use this in Ver2? >>

The dataset module example (\examples\datasetmodule subdirectory) for EWB 2
isn't entirely complete yet and the front end app, DataSetClient, needs to
be completed, but the EWBModuleExecute event for the TExampleDataSetModule
should look like this:

procedure TExampleDataSetModule.EWBModuleExecute(Request:
TEWBServerRequest);
begin
  DatabaseAdapter.HandleRequest(Request,'customdatasets/biolife');
end;

IOW, gone is the all of the old code that you needed for inspecting each
dataset method (columns, rows, commit) and conditionally handling each.

Tim Young
Elevate Software
www.elevatesoft.com
Image