Android Question RDC MS SQL Server Stored Procedure

Declan

Well-Known Member
Licensed User
Longtime User
I am accessing a Ms SQL Server database using RDC.
I am attempting to read data using a stored procedure.

My Code for calling the stored procedure:
B4X:
Sub GetTestYesterday
    Dim cmd As DBCommand
    cmd.Initialize
    cmd.Name = "get_test"
    cmd.Parameters = Array As Object("Yesterday")
    reqManager.ExecuteQuery(cmd, 0, "GetTest")
End Sub
My entry in the server Config file:
B4X:
sql.get_test = [Reports_Mobile_SalesBasketSummary] @Period = N'?'

Running the above, I get only the column names and not the data:
Log:
B4X:
HandleJob: 11
Tag: GetTest, Columns: 8, Rows: 1
TodaysSales    NumberOfItemBought    NumOfSales    AverageBasketTotal    ItemsPerbasket    TotalCost    GP    MyPrice  
0.0000    0.00    0    0.0000    0E-13    0.0000    null    0.0000

Using Ms Server Manager, I can obtain all the data using the following statement:
B4X:
[dbo].[Reports_Mobile_SalesBasketSummary] @Period = N'Yesterday'

Is my syntax in the server Config incorrect
Or is there something major that I am overlooking?
 
Last edited:

Declan

Well-Known Member
Licensed User
Longtime User
JTDS is the jdbc driver. jRDC2 is the latest version of RDC.

It should work with stored procedures: https://www.b4x.com/android/forum/threads/61801/#content
In
forum/threads/class-jrdc2-b4j-implementation-of-rdc-remote-database-connector.61801/
it says:
Migrating from v1 to v2 is very simple. On the server side you just need to upgrade to the new attached code.
I have downloaded jRDC2.zip on my server.
Where to from here?
The previous version I downloaded RDC-Server.zip and when unzipped I had a folder "RemoteDatabaseConnector" which included the Config file.
The jRDC2.zip when unzipped does not have the folder "RemoteDatabaseConnector".
What is the folder structure or do I just replace the files in my existing "RemoteDatabaseConnector" folder with the files from the NEW unzipped jRDC2 folder?
 
Upvote 0
Top