Page 1 of 1
a Mobile Application that Connects to the DataSnap Server
Posted: Fri 25 Sep 2015 16:54
by Suhaimin
Dear Experts,
Is there a sample program how to write a mobile application (android) that connects to the datasnap server via internet using unidac component ( remote database postgresql) ?at client side (android) ,what i have to setting at unidac component so that can connect to remote DB postgresql via internet network. thanks
best wishes,
haimin
Re: a Mobile Application that Connects to the DataSnap Server
Posted: Tue 29 Sep 2015 10:00
by azyk
Suhaimin wrote:Is there a sample program how to write a mobile application (android) that connects to the datasnap server via internet using unidac component ( remote database postgresql)
You can read about UniDAC usage on creating DataSnap applications in our blog:
http://blog.devart.com/using-dac-produc ... pment.html
Suhaimin wrote:at client side (android) ,what i have to setting at unidac component so that can connect to remote DB postgresql via internet network.
See the UniDAC demo project for a sample application that connects to PostgreSQL server via Internet and not using DataSnap Server. For example, the path to the demo in UniDAC for RAD Studio 10 Seattle may be like the following: "C:\Users\Public\Documents\Devart\UniDAC for RAD Studio 10\Demos\Mobile\Delphi23\".
Re: a Mobile Application that Connects to the DataSnap Server
Posted: Tue 29 Sep 2015 12:12
by Suhaimin
Dear Experts,
can I check what IP Address (mobile android) that will connect to remote postgesql use unidac component ? thanks
Re: a Mobile Application that Connects to the DataSnap Server
Posted: Thu 01 Oct 2015 10:29
by azyk
This question is not related to UniDAC functionality. To get the IP address that has remote access to the PostgreSQL server, contact the administrator of the server.
Re: a Mobile Application that Connects to the DataSnap Server
Posted: Fri 02 Oct 2015 16:16
by Suhaimin
Dear azyk,
I have tried example C:\Users\Public\Documents\Devart\UniDAC for RAD Studio XE7\Demos\Mobile\Delphi21 at samsung galaxy s4 but with error message "unidac stop" at mobile samsung galaxy s4.
component unidac version 6.2.7 IDE delphi XE7. whats wrong with the code.. thanks.
best wishes,
haimin
Re: a Mobile Application that Connects to the DataSnap Server
Posted: Mon 05 Oct 2015 10:02
by azyk
Please describe the issue in more details, such as:
- the full error message text you are getting;
- the moment when you are getting the error: on application start; on connection to PostgreSQL( execution of the TUniConnection.Connect method); on opening the table ( execution of the TUniQuery.Open method ); etc.
Re: a Mobile Application that Connects to the DataSnap Server
Posted: Mon 26 Oct 2015 12:17
by Suhaimin
Dear Expert,
after I compile to the phone then i run the program from my phone It occur error message "Unfortunately,UNIDAC has stopped" . then program close. what happened ? thanks
Re: a Mobile Application that Connects to the DataSnap Server
Posted: Thu 29 Oct 2015 15:03
by azyk
Please create a new project, drop components TUniConnection and TPostgreSQLUniProvider onto the form. Double-click UniConnection1, fill in all the fields in the appeared design-time editor, click Connect. In case of successful connection to PostgreSQL, in the left bottom corner of the editor there will appear a green circle. Click OK. Double-click the form and insert the following code:
Code: Select all
if UniConnection1.Connected then ShowMessage('Connected')
else ShowMessage('Not Connected');
Deploy this project to your device and run the application. What message do you get now?
Re: a Mobile Application that Connects to the DataSnap Server
Posted: Sat 31 Oct 2015 06:26
by Suhaimin
Hello azyk,
i dont get any error messages and any result too. black screen occurs the program close. what happened? thanks
Re: a Mobile Application that Connects to the DataSnap Server
Posted: Tue 03 Nov 2015 10:54
by azyk
1) Create an empty project. Don't add any components or code. Build the project, deploy it to your device, run the application.
2) Drop the TUniConnection component onto the form. Build the project, deploy it to your device, run the application.
Please let us know the results/messages you get at steps 1 and 2.