Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 14 total
Thread Datasetmodule example
Mon, Mar 14 2016 3:42 PMPermanent Link

KimHJ

Comca Systems, Inc

I'm trying to compile the example Datasetmodule in Delphi XE6 and I get this error:
[dcc32 Fatal Error] main.pas(5): F1026 File not found: 'C:\Program Files (x86)\Elevate Web Builder 2 Modules\RAD Studio XE6 (Delphi Win32)\examples\datasetmodule\edbcomps.dcu'

I see edbcomps.pas is in this directory:
C:\Program Files (x86)\ElevateDB 2 VCL-TRIAL\RAD Studio XE6 (C++ Win32)\code\source
If I add it to the search path I get this error;
[dcc32 Fatal Error] edbcomps.pas(35): F1026 File not found: 'C:\Program Files (x86)\Elevate Web Builder 2 Modules\RAD Studio XE6 (Delphi Win32)\examples\datasetmodule\edbtype.dcu'

I can't find any edbtype.pas

Thanks,
Kim
Mon, Mar 14 2016 7:55 PMPermanent Link

KimHJ

Comca Systems, Inc

KimHJ wrote:

I'm trying to compile the example Datasetmodule in Delphi XE6 and I get this error:
[dcc32 Fatal Error] main.pas(5): F1026 File not found: 'C:\Program Files (x86)\Elevate Web Builder 2 Modules\RAD Studio XE6 (Delphi Win32)\examples\datasetmodule\edbcomps.dcu'

I see edbcomps.pas is in this directory:
C:\Program Files (x86)\ElevateDB 2 VCL-TRIAL\RAD Studio XE6 (C++ Win32)\code\source
If I add it to the search path I get this error;
[dcc32 Fatal Error] edbcomps.pas(35): F1026 File not found: 'C:\Program Files (x86)\Elevate Web Builder 2 Modules\RAD Studio XE6 (Delphi Win32)\examples\datasetmodule\edbtype.dcu'

I can't find any edbtype.pas

I did went to Project, options Runtime Packages and check "Link with runtime Packages" for all Configurations.

Thanks,
Kim
Tue, Mar 15 2016 8:17 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Kim,

<< I did went to Project, options Runtime Packages and check "Link with runtime Packages" for all Configurations. >>

Yes, you'll need to compile with runtime packages if using the EDB trial version.  I'll try to make this more clear in the datasetmodule comments and in the manual.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Mar 17 2016 2:56 PMPermanent Link

KimHJ

Comca Systems, Inc

Tim Young [Elevate Software] wrote:

Kim,

<< I did went to Project, options Runtime Packages and check "Link with runtime Packages" for all Configurations. >>

Yes, you'll need to compile with runtime packages if using the EDB trial version.  I'll try to make this more clear in the datasetmodule comments and in the manual.

Tim Young
Elevate Software
www.elevatesoft.com

Tim,
I still have the same error nothing changed. I tried to make a sample program my self and I get the same error.
Look like I have to buy it.
Kim
Fri, Mar 18 2016 2:30 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Kim,

<< I still have the same error nothing changed. I tried to make a sample program my self and I get the same error.
Look like I have to buy it. >>

No, you won't need to buy EDB in order to test the datasetmodule example project, the trial version will work fine.  Please make sure that you are *definitely* compiling with runtime packages, and that the edbrun package is listed in the list of runtime packages to use.

Tim Young
Elevate Software
www.elevatesoft.com
Mon, Mar 21 2016 4:13 PMPermanent Link

KimHJ

Comca Systems, Inc

Tim,

>>
No, you won't need to buy EDB in order to test the datasetmodule example project, the trial version will work fine.  Please make sure that you are *definitely* compiling with runtime packages, and that the edbrun package is listed in the list of runtime packages to use.
<<

I have attached a screen capture.


[dcc32 Fatal Error] unit1.pas(5): F1026 File not found: 'C:\Users\Kim\Elevate\DryApp\edbcomps.dcu'

Kim



Attachments: LinkWithRuntime.png
Mon, Mar 21 2016 4:25 PMPermanent Link

KimHJ

Comca Systems, Inc

Tim,

When I select runtime package it is empty. I added the edbrun.dcp.

Now I can compile.

Kim
Mon, Mar 21 2016 5:48 PMPermanent Link

KimHJ

Comca Systems, Inc

Tim,

Is there a step by step tutorial how to make a web service  and add it to the Elevate Web Builder 2 Server. I'm spending a lot of time trying to find out how to do it. I cannot figure out how to make the demo work I thought I had found it somewhere on the website but I can't find anything now.

Here is what I did so far. Add the datasetmodule.dll in the EWB2S modules setup page, I assume I don't need to do anything in the Content page of the setup since I'm not displaying any pages.

Is there anyway to run modules in Delphi XE6's debugger and then send a request using Postman so I can see what happens when the module receive the request?

I tried to send the following command using Postman but I have no idea what parameters to send to the demo: http://localhost:8099/modules/datasetmodule

I just need to understand how it all works and I can't find anything in the manual.

Thanks,
Kim
Tue, Mar 22 2016 10:10 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Kim,

<< Is there a step by step tutorial how to make a web service  and add it to the Elevate Web Builder 2 Server. I'm spending a lot of time trying to find out how to do it. I cannot figure out how to make the demo work I thought I had found it somewhere on the website but I can't find anything now. >>

You're going to need to do some reading of the manual, especially if you haven't done much web stuff.  Be sure to read this section completely:

http://www.elevatesoft.com/manual?action=viewtopic&id=ewb2mod&product=rsdelphiwin32&version=XE6&topic=Handling_Requests

if you're trying to develop a web service.

<< Here is what I did so far. Add the datasetmodule.dll in the EWB2S modules setup page, I assume I don't need to do anything in the Content page of the setup since I'm not displaying any pages.>>

That's correct.

<< Is there anyway to run modules in Delphi XE6's debugger and then send a request using Postman so I can see what happens when the module receive the request? >>

Sure, just do this:

1) With the module project open in the IDE, select Run/Parameters and specify the EWB IDE (ewbide.exe) or the EWB Web Server (ewbsrvr.exe) as the Host Application.  Be sure to use the complete path to the executable.  The IDE uses the same EWB Web Server, so sometimes it's easier to just use it as the host application, but it doesn't really matter.

2) Click on OK.

3) Run your module project using Run/Run.

<< I tried to send the following command using Postman but I have no idea what parameters to send to the demo: http://localhost:8099/modules/datasetmodule >>

Don't use Postman for this, you don't need it.  You only need to use the EWB DataSetClient example project to see how the module works in relation to requests from a client application, and you can see this by running it in the IDE as described above.  The EWB dataset JSON API is also described in detail here:

http://www.elevatesoft.com/manual?action=viewtopic&id=ewb2&topic=DataSet_JSON_Reference

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Mar 22 2016 5:47 PMPermanent Link

KimHJ

Comca Systems, Inc

Tim

<<You're going to need to do some reading of the manual, especially if you haven't done much web stuff.  Be sure to read this section completely:

http://www.elevatesoft.com/manual?action=viewtopic&id=ewb2mod&product=rsdelphiwin32&version=XE6&topic=Handling_Requests
if you're trying to develop a web service.
>>

I did read the manual and I'm still lost. In the past five years I used Delphi Prism to make my web services. I have several Android applications accessing the web services. I understand how it works and I use json in the return request.

Right now I'm using Advantage Database Server, but since SAP bought Sybase and with that Advantage Database there have been no update to the server for three years and I'm afraid they will drop it or worst ask us to move to SAP.

I install the EDB trail to test it against my Android app's Web Service requests and I use Postman for testing.
I have an idea how it works but it's always nice to see it in the debugger.


<<1) With the module project open in the IDE, select Run/Parameters and specify the EWB IDE (ewbide.exe) or the EWB Web Server (ewbsrvr.exe) as the Host Application.  Be sure to use the complete path to the executable.  The IDE uses the same EWB Web Server, so sometimes it's easier to just use it as the host application, but it doesn't really matter.

2) Click on OK.

3) Run your module project using Run/Run.
>>

I did that but I get an error " The requested operation requires elevation." I gave my self Full Control to the whole hard drive I moved the project to the User folder and I still get it. I'm using Windows 10 and Delphi XE6.

Since there is no example let me know if this is correct or if I'm missing something.
I will send GET request and want a json response.

I created a ewbmodule
Added a TEWBDatabaseAdapter , TEDBSession, TEDBDatabase, three TEDBQuery and three TEWBDataSetAdapter for the three TEDBQuery.

procedure TEWBModule1.EWBModuleExecute(Request: TEWBServerRequest);
var
TempParam: TParam;
begin
AppDatabaseAdapter.HandleRequest(Request,'customdatasets');
if AuthenticateUser(Request) then
     begin
   
     Request.ResponseHeaders.Add('Cache-Control: no-cache');
     case Request.RequestMethod of rmGet:
           begin
           if AnsiSameText(Request.RequestParams.Values['customer'],'paramvalue') then
              begin
                      TempParam := FindCustomer(Request.RequestParams.Values['customer'],'paramvalue');
                      Request.SendContent(TempParam,HTTP_OK,'1');
              end
           else  if AnsiSameText(Request.RequestParams.Values['pickup'],'paramvalue') then
              begin

              end
           else
              Request.SendError(HTTP_BAD_REQUEST,'Invalid request');
           end;
    end;
    end;


procedure TEWBModule1.FindCustomer(accountnumber: String);
begin
       TEDBQuery(CustAdapter.DataSet).SQL.Clear;
       TEDBQuery(CustAdapter.DataSet).SQL.Add('Select * from customer where account=''' + accountnumber + '''');
       TEDBQuery(CustAdapter.DataSet).Open;
       if TEDBQuery(CustAdapter.DataSet).RecordCount = 1 then
          FindCustomer := TEDBQuery(CustAdapter.DataSet).FieldByName('Name').AsString
       else
          FindCustomer := 'Customer not Found!';
end;

How do I get it back as a Json string, do I have to create it my self?
I see there is a method called BuildRows but I can't find out how to use it.


Thanks,
Kim
Page 1 of 2Next Page »
Jump to Page:  1 2
Image