B4J Question How to call Oracle Stored Procedure

AndroidMadhu

Active Member
Licensed User
Hello,
I am facing two below issues:

1. I am not sure how to call Oracle stored procedure from b4j. I found the below link but confused.
https://www.b4x.com/android/forum/t...ould-first-be-initialized.135162/#post-855048

2. I am getting below error while declaring jdbcResultSet

B4X:
Private Sub SQL_Success(Success As Boolean)
    If Success Then
        Dim rs As JdbcResultSet
    End If
End Sub

B4X:
B4XMainPage - 52: Unknown type: jdbcresultset
Are you missing a library reference?

Please advice which library need to include?

Thanks
 

Johan Schoeman

Expert
Licensed User
Longtime User
Probably something similar to this:

 
Upvote 0

AndroidMadhu

Active Member
Licensed User
Hi,
I am able to connect at Oracle DB with success. But how do I call both the procedure SQL_Success from button1_Click() event.
Here is my test code

B4X:
Public Sub SQL_Connect
    sql.InitializeAsync("Oracle", "oracle.jdbc.driver.OracleDriver", $"jdbc:oracle:thin:@${dbsrv}:1521:mmjdb"$, dbusername, dbpwd)
End Sub

Private Sub SQL_Success(Success As Boolean)
    If Success Then
        Log("Connected Successfully")
        Dim rs As ResultSet
        rs=sql.ExecQuery("select table_name from user_tables")
        Do While rs.NextRow
            Log(rs.GetString2(0))
        Loop
        rs.Close
        sql.Close
    End If
End Sub

Please advice

Thanks
 
Upvote 0
Top