Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
3.2.2
-
None
-
MS Access 2003 on Windows 10/11
Description
I know, MS Access 2003 is quiet old but...
I have a stored function in my mariadb 11.4.2 server like this:
CREATE DEFINER=`root`@`%` FUNCTION `separator_test`(var_in_separatore VARCHAR(3)) RETURNS varchar(255) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci |
DETERMINISTIC
|
BEGIN
|
|
RETURN concat('hello', var_in_separatore, 'world'); |
|
END |
If I call this function using the ODBC connector in this way
Public Sub test()
|
|
Dim cn As ADODB.Connection
|
Dim rst As ADODB.Recordset
|
|
Set cn = mariadbConnection
|
Set rst = dammirecordset_ADO(cn, "SELECT separator_test('§');")
|
|
Debug.Print "output: " & rst(0)
|
|
End Sub
|
mariadbConnection creates an ADODB.Connection object.
dammirecordset_ADO creates an ADODB.Recordset object using the query specified as parameter.
Why the output string I receive has a space at the end of the string?
Also, if I specify a 2§ as parameter the output string has 2 empty chars at the end of the string and so on.
Please note that if I trim the output string the output is always the same.
In addition, if I execute
SELECT TRIM(separator_test('§')); |
the result is again the same.
I solved changing the character used as separator (using # the output string is correct) but I think there's no good reason to not use the § character, isn't it?
PS: I tried other characteres and £ character produce the same problem.
Thank you so much for your help and your effort.
Francesco