Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread dataset not found
Tue, Feb 13 2018 6:27 AMPermanent Link

Ronald

I (still) can not load a DBISam table in my EWB application.
If I create the dataset in the database manager in the ide then I can get a correct preview of the table.
Then I import the defined database in the EWB webserver and I also can get a correct preview of the table.

But when I test it in an application like this, I keep getting the dataset not found error:

Database.DatabaseName:='testdatabase';
Database.BaseURL:='databasemodules/databasemodule';
Database.Loadrows(test);

I have been working on the problem for two days now, but I must be overlooking something.
What is wrong?

Greetings,
Ronald





 
Tue, Feb 13 2018 8:57 AMPermanent Link

Raul

Team Elevate Team Elevate

On 2/13/2018 6:27 AM, Ronald wrote:
> But when I test it in an application like this, I keep getting the dataset not found error:


> Database.BaseURL:='databasemodules/databasemodule';

Why are you setting this exactly ?

Normally it's no needed and uses default which is "databases".

You should be able to just do this in code:

Database.DatabaseName:='testdatabase';
Database.Loadrows(test);

Try the URL (with IDE and internal Web Server running) in browser link
this :

http://localhost:<web server
port>/databases?method=rows&database=testdatabase&dataset=test

See if this shows data as expected

Raul
Tue, Feb 13 2018 9:51 AMPermanent Link

Ronald

Raul wrote:

>Database.DatabaseName:='testdatabase';
>Database.Loadrows(test);

>Try the URL (with IDE and internal Web Server running) like this :

Thanks a lot, that did the trick! I assumed I had to fill in the path to the databasemodule.
Thu, Feb 15 2018 8:01 AMPermanent Link

Ronald

Ronald wrote:

<Thanks a lot, that did the trick! I assumed I had to fill in the path to the databasemodule.

This works fine, but I still need to use my own datasetmodule. This module is called gdb.dll, so I need to set

Database.DatabaseName:='testdatabase';
Database.BaseURL:='databasemodules/gdb';
Database.Loadrows(adataset);

The gdb.dll is called correctly (I can verify that in a log), but I get the error: dataset "test" not found.
If I leave the BaseURL out, it works fine.
Any ideas why it cannot find the dataset?

Ronald
Thu, Feb 15 2018 12:41 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ronald,

<< The gdb.dll is called correctly (I can verify that in a log), but I get the error: dataset "test" not found. If I leave the BaseURL out, it works fine.  Any ideas why it cannot find the dataset? >>

What is the full error message that you're seeing ?

The dataset name is passed into your database module, and then what you do with that afterwards is up to the code in the database module.  In other words, if your database module returns such an error message, then there's something wrong in the database module.

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Feb 16 2018 3:14 AMPermanent Link

Ronald

Tim Young [Elevate Software] wrote:

>The dataset name is passed into your database module, and then what you do with that afterwards is up to the >code in the database module.  In other words, if your database module returns such an error message, then >there's something wrong in the database module.

Hi Tim,

I forgot to mention that I dropped a TEWBDatabaseAdapter on the module and call EWBDatabaseAdapter1.HandleRequest(Request) in the EWBModuleExecute method:

procedure TEWBModule1.EWBModuleExecute(Request: TEWBServerRequest);
begin
EWBDatabaseAdapter1.HandleRequest(Request);      
end;

The full errormessage that I get is:
Error: Dataset load response error (Dataset "test" not found)

The url that is sent is:
http://localhost:6060/databasemodules/gdb?method=rows&database=testdatabase&dataset=test
Thu, Feb 22 2018 3:58 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ronald,

<< procedure TEWBModule1.EWBModuleExecute(Request: TEWBServerRequest);
begin
EWBDatabaseAdapter1.HandleRequest(Request);      
end;

The full errormessage that I get is:
Error: Dataset load response error (Dataset "test" not found) >>

This means that the TEWBDatabaseAdapter component in your web server module is not handling the OnGetDatasetAdapter event properly:

https://www.elevatesoft.com/manual?action=viewevent&id=ewb2mod&product=rsdelphiwin32&version=10T&comp=TEWBDatabaseAdapter&event=OnGetDataSetAdapter

You need this event to return a valid TEWBDataSetAdapter instance via the Adapter variable parameter.

Tim Young
Elevate Software
www.elevatesoft.com
Image