Get data from database using Web component

I was failed to get data using Web component which the database reside in web hosting Hostinger.
I did not get expected data that I want, what I got is html script that explain "

The document has been permanently moved

.
When I tried to ask to my web hosting customer service, they ask me to ask this issue to MIT app inventor.

1 Like

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

For such a vague query, here is a broad answer:

If you are doing like here:

You may change to use Webviewer like this:

Thanks for this solution.
Actually my problem just solved by change the web address from http://x to https://x
My hosting seems expecting accessing database using https instead of http.

There was another problem for a few of record (specific record).
Got error "Webpage not available" at https://x.com/invquery.php?search=123 could not be loaded because:
net::ERR_HTTP_RESPONSE_CODE_FAILURE

For other records are working well

But when open directly from browser by type https://x.com/invquery.php?search=123 are working well.

I am using webviewer component to retrieve data.
For around 2 days my application working well.
But suddenly I got problem yesterday to retrieve a few record which is OK before.
I got error "Webpage not available. The webpage at https://x.com/invquery.php?search=123 could not be loaded because net::ERR_HTTP_RESPONSE_CODE_FAILURE"

If I access the page https://x.com/invquery.php?search=123 directly from browser, I got no problem.

Please help to share solution for this issue.

Hello Asri

We need to know about the type of data your app collects. Normally, the Web component would be used for data collection, not the WebViewer component.....

Now, the 'X' pages change very rapidly, you probably can't rely on a search - what is the real search (not '123')?

You can check from this link
https://tempatberbagi.com/lab/invquery.php?dicari=INV/2017-0000012
But if I run my android application and search data for INV/2017-0000014 or others data are working well.

I just resolved my issue by changing Webviewer component setting to be :

  • Tick option "IgnoreSslErrors"
  • Untick option "PromptforPermission"

By considering the security of accessing data may be lower/unsafe.