I have problems getting data from several databases in one host, for example :
dbsample_01
dbsample_02
etc...
how do i pass parameters to jrdc's config.properties?
or there are special changes to be able to access between databases?
how to get the data with the following query?
this is the query in my jrdc config.properties :
sample code from client :
And the result :
dbsample_01
dbsample_02
etc...
how do i pass parameters to jrdc's config.properties?
or there are special changes to be able to access between databases?
how to get the data with the following query?
B4X:
select * from dbsample_01.table_A;
select * from dbsample_02.table_A;
this is the query in my jrdc config.properties :
SQL:
sql.list_datatable = select * from dbsample_?.table_A;
sample code from client :
B4X:
Dim strNumberDB as String = "01"
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("list_datatable", Array(strNumberDB))
Wait For (req.ExecuteQuery(cmd, 0, Null)) JobDone(j As HttpJob)
If j.Success Then
....
End If
And the result :
B4X:
(MySQLSyntaxErrorException) com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right syntax to use near ''01'.table_A LIMIT 0,25' at line 1
Last edited: