Android Question Save string connection, KeyValueStore or Sharedpreferences ?

Friends, I'm starting with B4A, and I'm really enjoying it. In a small app I'm creating, I'm not sure how to save the connection string for the ms slq server. To activate the App, I will send a code to the user, and the user will inform this code in the app, which will search for the string in my database. From this point on, is it advisable to save it in KeyValue? Could anyone post an example of how to save the string and then read it for use in the connection?

Grateful.
 

ilan

Expert
Licensed User
Longtime User
i would stop the line here:

It's not a good idea to store connection string of a database inside a mobile app!!!!!!


Friends, I'm starting with B4A, and I'm really enjoying it. In a small app I'm creating, I'm not sure how to save the connection string for the ms slq server. To activate the App, I will send a code to the user, and the user will inform this code in the app, which will search for the string in my database. From this point on, is it advisable to save it in KeyValue? Could anyone post an example of how to save the string and then read it for use in the connection?

Grateful.

to tell you the truth i did not understood your question.
you want to save the sql connection string and send it to a user so he can connect to the database?

how are you communicating with the database? php?
 
Upvote 0
Yes, the app would make a query using a code sent by me, and would get the connection string to save as a key on the device. As the app is for sales, and will be used by different stores, the string cannot be fixed, as each store will have its own data server. But see that this string would have to be protected or encrypted, so I need to know how to encrypt it in b4x before sending it.

Sorry if the Google translation isn't good.

I'm in Brazil.

Thankful to everyone.
 
Upvote 0
Solved:
Thank´s
 
Upvote 0
Top