I have reviewed several posts to understand how to call a stored procedure in MySQL and I can't get it. I am grateful to those who have answered me with "links", however, and due to the little experience I have with B4A, I ask again for help from an expert to guide me through the steps to achieve this. I understand that it can be basic for most, but I have seen multiple solutions and almost all take many things for granted, such as the libraries and references to use.
I have read and tested this link several times
Could some of you share a brief example of calling a procedure with 2 input and 1 output parameters?
This is part of the code I am using:
The calls to SELECT, INSERT, UPDATE and DELETE work perfectly ... but the calls to procedures are breaking my head. ;-(
References used:
Thanks again.
I have read and tested this link several times
in which the procedure that does it appears, however the library or version used is not clear to me.
Could some of you share a brief example of calling a procedure with 2 input and 1 output parameters?
This is part of the code I am using:
Sub connect1 As ResumableSub
mysql.InitializeAsync("mysql", driver, jdbcUrl, Username, Password)
Wait For mysql_ready (Success As Boolean)
If Success = False Then
Log("Check unfiltered logs for JDBC errors.")
End If
Return Success
End Sub
Sub ValidarCuenta1 As ResumableSub
Wait For (connect1) Complete (Success As Boolean)
If Success Then
Try
Dim cur As Object = mysql.ExecQueryAsync("mysql","Select * from creadores where idcreador='" & Main.gUsuario & "' And password='" & Main.gPassword & "'",Null) 'general.Encriptar(txtPassword.Text.trim) & "'")
Wait For (cur) mysql_QueryComplete (Success As Boolean, Crsr As JdbcResultSet)
If Success Then
Return Crsr
End If
Catch
Return Crsr
Log(LastException)
End Try
CloseConnection
End If
Return Null
End Sub
Sub ExecQuerySQL As ResumableSub
Wait For (connect1) Complete (Success As Boolean)
If Success Then
Try
Dim cur As Object = mysql.ExecQueryAsync("mysql",Main.gsql,Null)
Wait For (cur) mysql_QueryComplete (Success As Boolean, Crsr As JdbcResultSet)
If Success Then
Return Crsr
End If
Catch
Return Crsr
Log(LastException)
End Try
CloseConnection
End If
Return Null
End Sub
The calls to SELECT, INSERT, UPDATE and DELETE work perfectly ... but the calls to procedures are breaking my head. ;-(
References used:
Thanks again.