I have a database that, along with the data tables, contains a couple of stored functions. Access to these functions with VB6 was part of the cmd string - eg in the following, the stored function is sfArticle:
B4X:
cmdSelectPerformers = "SELECT DISTINCT Performers,sfArticle(Performers) AS FPerformers FROM primarygroups ORDER BY FPerformers;"
Running this is B4J yields this error in the log:
B4X:
java.sql.SQLSyntaxErrorException: (conn=511) FUNCTION sfArticle does not exist
Exactly as shown in my first post. But it's not a procedure - it's a (stored) User Defined Function function.
Edit: Just looking into the link you have in your post ...
Exactly as shown in my first post. But it's not a procedure - it's a (stored) User Defined Function function.
Edit: Just looking into the link you have in your post ...
No, it's MariaDB … but you pointed me in the right direction!
It works with very little change, and I was looking for solutions in all the wrong places!
My database is MariaDB running on a Synology NAS. The database name (schema) is "NAS1_MusicBase" and this statement works:
B4X:
"SELECT DISTINCT Performers, NAS1_MusicBase.sfArticle(Performers) AS FPerformers FROM NAS1_MusicBase.primarygroups ORDER BY FPerformers;"
No, it's MariaDB … but you pointed me in the right direction!
It works with very little change, and I was looking for solutions in all the wrong places!
My database is MariaDB running on a Synology NAS. The database name (schema) is "NAS1_MusicBase" and this statement works:
B4X:
"SELECT DISTINCT Performers, NAS1_MusicBase.sfArticle(Performers) AS FPerformers FROM NAS1_MusicBase.primarygroups ORDER BY FPerformers;"
Ah OK. It was the terminology that confused me. A UDF in MySQL/MariaDB is a global function usually written in C++. In SQL server a UDF is the equivalent of a stored function in MariaDB/MySQL.... Glad you got it sorted.