a Mobile Application that Connects to the DataSnap Server

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Suhaimin
Posts: 79
Joined: Mon 06 May 2013 12:19

a Mobile Application that Connects to the DataSnap Server

Post by Suhaimin » Fri 25 Sep 2015 16:54

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

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: a Mobile Application that Connects to the DataSnap Server

Post by azyk » Tue 29 Sep 2015 10:00

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\".

Suhaimin
Posts: 79
Joined: Mon 06 May 2013 12:19

Re: a Mobile Application that Connects to the DataSnap Server

Post by Suhaimin » Tue 29 Sep 2015 12:12

Dear Experts,
can I check what IP Address (mobile android) that will connect to remote postgesql use unidac component ? thanks

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: a Mobile Application that Connects to the DataSnap Server

Post by azyk » Thu 01 Oct 2015 10:29

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.

Suhaimin
Posts: 79
Joined: Mon 06 May 2013 12:19

Re: a Mobile Application that Connects to the DataSnap Server

Post by Suhaimin » Fri 02 Oct 2015 16:16

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

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: a Mobile Application that Connects to the DataSnap Server

Post by azyk » Mon 05 Oct 2015 10:02

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.

Suhaimin
Posts: 79
Joined: Mon 06 May 2013 12:19

Re: a Mobile Application that Connects to the DataSnap Server

Post by Suhaimin » Mon 26 Oct 2015 12:17

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

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: a Mobile Application that Connects to the DataSnap Server

Post by azyk » Thu 29 Oct 2015 15:03

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?

Suhaimin
Posts: 79
Joined: Mon 06 May 2013 12:19

Re: a Mobile Application that Connects to the DataSnap Server

Post by Suhaimin » Sat 31 Oct 2015 06:26

Hello azyk,
i dont get any error messages and any result too. black screen occurs the program close. what happened? thanks

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: a Mobile Application that Connects to the DataSnap Server

Post by azyk » Tue 03 Nov 2015 10:54

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.

Post Reply