Android Question RDC and send query to server

Pisinho

Active Member
Licensed User
Longtime User
Hi,
It's possible send a query to server if a config.properties not have a query defined in the file ?
Because if don't have a access directly to file , for example if I do not have direct access to the server that has the server DRC, every time I have to ask the administrator to make the change. It would be great just to spend only part of the query, for example, after the WHERE clause so that a single query defined can have all the queries I want without filter data after you've downloaded them all in memory. This would avoid waste of bandwidth especially if 3G phone and of course cost.

example config.properties:
######
sql.select_animal=SELECT * FROM table
######

Name = "WHERE Name='pippo' AND Surname='Pluto'"

cmd.Name = "select_animal"
cmd.Parameters = Array As Object(Name)
reqManager.ExecuteQuery(cmd, 0, "OK")

Excuse me for my English.

Regs.
 

LucaMs

Expert
Licensed User
Longtime User
Unfortunately, you must have the ability to edit the query in the config.properties file (this is also an advantage for security).

In your example, however, you should use:

example config.properties:
######
sql.select_animal=SELECT * FROM table WHERE Name = ? AND Surname = ?"
######

and then pass Name and Surname as parameters.

About bandwidth, I do not understand: if the query is located directly on the server, you will send a smaller number of bytes, not greater.

Sorry for my bad English, but ... I'm italian, like you
 
Upvote 0

Pisinho

Active Member
Licensed User
Longtime User
Yes, Luca
the query it's such ok,I know.

they avoided many queries write to the configuration file, that's all.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…