Possible to connect solution to Db in a different URL?

Questions and answers regarding general SQL and backend databases

Possible to connect solution to Db in a different URL?

Postby cuoredisardegna@tiscali.i » Sun Aug 05, 2012 11:24 am

Hi to Everyone,
could Someone tell if:
it is possible to connect a solution to a Datatbase Server in a different URL?

Example:
You suppose that You have Your solution on URL 79.5.123.154 in the server user_data. The Database Server URL is configured :

Database Server URL:jdbc:postgresql://localhost:5432/user_data

Now You suppose that You want to connect Your solution to the server user_data in another machine : URL 79.5.123.180.
How to configure The Database Server URL?

Tanks in advance.
Gianni Pinna.
cuoredisardegna@tiscali.i
 
Posts: 151
Joined: Sun Feb 29, 2004 10:35 pm
Location: Sassari

Re: Possible to connect solution to Db in a different URL?

Postby Harjo » Sun Aug 05, 2012 8:28 pm

you can add both Url's to the app-server or developer and than use the databaseManager switch option, to switch between them
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Possible to connect solution to Db in a different URL?

Postby omar » Mon Aug 06, 2012 9:55 am

So that would be:

Code: Select all
var success = databaseManager.switchServer('connection1', 'connection2')


But both connections will have to be accessible for this to work properly.
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 377
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: Possible to connect solution to Db in a different URL?

Postby cuoredisardegna@tiscali.i » Mon Aug 06, 2012 11:03 am

Hi Harjo , Hi Omar,

Tank You very much, for Your replays.
Excuse, for the need of steps in understanding. Hope You could be patient.

1st sep.

Harjo wrote:

Code: Select all
you can add both Url's to the app-server or developer and than use the databaseManager switch option, to switch between them


WHERE both Urls have to been added:
-in whath mask
-in wath machine: that one with ip 79.5.123.154 or thath one with the ip 79.5.123.180?

HOW both Url's have to been attached: could You write a line for example?

Tanks in advance.
Gianni Pinna.
cuoredisardegna@tiscali.i
 
Posts: 151
Joined: Sun Feb 29, 2004 10:35 pm
Location: Sassari

Re: Possible to connect solution to Db in a different URL?

Postby Harjo » Mon Aug 06, 2012 2:11 pm

No we are talking here about 2 database servers! not two application-servers.

so you have one (servoy) application-server with a localhost database, right?
so you create a database connection, to the localhost database
and you create a database connection to the other database on the other ip-adres.

database connection can be made in developer and they end up in the servoy.properties file.
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 7 guests

cron