Android Question Remote Database Connection to maintain or not?

Jakes72

Active Member
Licensed User
Longtime User
Hi to all the Experts,

Just a quick question.
I am connecting to a MS SQL database on a remote Server using the JdbcSQL driver.
Now is it better to establish a connection at the start of my app and maintain the connection, or is it better to connect and disconnect everytime I do a query/non query?

Thank you for your time,
Regards Jacques.
 

Jakes72

Active Member
Licensed User
Longtime User
Thank you for your reply Erel I appreciate it.
What would the connection string look like using jRDC2 if I wanted to connect to an MS SQL database?
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
Based on:

It should be something like:
B4X:
JdbcUrl=jdbc:jtds:sqlserver://127.0.0.1/test
supposing your jRDC2 server is on the same MS SQL server

Note that if you want to use jRDC2, you should have a VPS.
 
Upvote 0
Top