• Welcome, Guest. Please login.
 
October 25, 2021, 09:05:02 PM

News:

Welcome to the SQLitening support forums!


How to use password to connect server?

Started by cyberazor, February 10, 2014, 10:23:28 PM

Previous topic - Next topic

cyberazor

For the password is already set in SQLiteningServer.cfg, like "test.db=123456", is there any way to use it in remote mode?

I cannot find a parameter to set password in slConnect function.

Rolf Brandt

The password is not used in slConnect but in slOpen. In other words anbody can connect to the database but must have the password to open any of the tables and do something with the database.

Code Example:
r = slOpen("mydatabase.db3" & $Bs & svrpassword, "E0")
slAttach "anotherdb.db3" & $Bs & svrpassword,"Status"


Hope that helps.

I like to cook with wine - sometimes I even add it to the food.
www.rbsoft.eu

cyberazor

Thank you Rolf! It works!

I've misunderstood that slOpen is only used in local mode. :P

Rolf Brandt

The nice thing about SQLitening is that you can use the same code for local and network mode. slConnect is all that makes the difference.

Rolf
I like to cook with wine - sometimes I even add it to the food.
www.rbsoft.eu