Android Question RDC is a good choice for me?

select

Member
Licensed User
Longtime User
Hi,

I'm trying to understand if this kind of approach (Remote Database Connector) is a good choice for me.

I'm making an Android version of a software for Windows and I'm reusing, as are, original sql queries (I insert only the variables)
.

Those queries are very complicated (for me), this is an example:

B4X:
L=a.Query("select DVDT.SCP_TAR,DVDT.SCP_NET,DVDT.SCP_INV,CASE  WHEN  DVDT.SCP_PACK=0 OR DVDT.SCP_NET=0 THEN 0  ELSE ROUND(DVDT.SCP_NET/DVDT.SCP_PACK,2 )  END as midw,CLIENT.CLNAME  from ((" & DVDTAz & " DVDT Left outer Join " & ClientAz & " CLIENT on DVDT.SCP_CODCLI=CLIENT.CLCODE) Left outer Join " & TrtocauAz & " ORTOCAU on DVDT.SCP_CMOV=ORTOCAU.OrtcCod)  where (((' ' <> SPACE(1) AND DVDT.SCP_CMOV = 'VE  ' OR DVDT.SCP_CMOV = 'NC  ') OR ' ' = SPACE(1)) AND DVDT.SCP_DTDOC = {d '" & Vyear & "-" & Vmonth & "-" & Vday & "'} AND DVDT.SCP_CODART = '" & Value & "' AND ((' ' = ' ') OR (' ' = 'S' AND (DVDT.SCP_CMO = 'VE  ') OR (DVDT.SCP_CMO = 'NC  '))))       order by  1 , 2 , 3 ")

Currently I connect my app to MS Sql Server with MSSQL with JDBC Library and it send queries directly to the database. It works but it could be better to use web server approach.

The problem is that The RDC client doesn't send queries. It sends the names of the queries.

It's possible use RDC with so complicated queries? It's possible to use queries without modify it?

Thank you
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
RDC (or better jRDC 2) is suitable for this.

It's possible use RDC with so complicated queries?
Yes. There is no limit on the queries complexity. It doesn't matter whether you send the query or whether it is loaded from a text file.

It's possible to use queries without modify it?
No.
 
Upvote 0

select

Member
Licensed User
Longtime User
Big question, how can I translate my queries for RDC? I read the Remote Database Connector tutorial, I understood how to configure web server and how to connect the client. I can't understand how to "translate" my query (like the query of the first post) into correct query for RDC. Can you help me? There is some example of big query translated for RDC to follow?
 
Upvote 0

select

Member
Licensed User
Longtime User
Ok, tnx.

Another question, when java webserver is active, could I open on my firewall only java webserver port on internet (or in LAN for local use) and leave closed SQL port to connect android client? If this is true it could be a great security increase for all data...
 
Upvote 0
Top