Android Question Use DBUTILS with JRDC2

tigrot

Well-Known Member
Licensed User
Longtime User
Hi everybody,
I have an app running on SqlLite and DbUtils. Is it possible to port to JRDC2 or have I to change radically the code? I think the last answer is the correct.

Ciao and Thank You!
Maur
 
Last edited:

tigrot

Well-Known Member
Licensed User
Longtime User
Yes, that's what I need. I have a task that needs a dynamically built SQL. The model of JRDC is based on fixed sql texts on server side. Maybe I can find a way changing protocol and including sql text instead of reading it on config file. Am I rigth?
Thank you.
Mauro
 
Upvote 0

tigrot

Well-Known Member
Licensed User
Longtime User
A change to JRDC could be:
B4X:
Public Sub GetCommand(Key As String) As String
    If Key.StartsWith("#") Then Return Key.SubString(1)  ' if key starts with # then return key itself without #
    If commands.ContainsKey("sql." & Key) = False Then
        Log("*** Command not found: " & Key)
    End If
    Return commands.Get("sql." & Key)
End Sub

The first line of the sub in RDCConnector allows the string to be used as a parametrized SQL string instead fo sql. entry in case first letter is "#"
Let me try...
Ciao
Mauro
 
Upvote 0
Top