This code works correctly and OK on the SQL Server.
Please convert this code to a MySQL.
Running on the MySQL gives the following error.
Error = You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1=IdMax + 1 where TypeID>1' at line 1
Public Def_Command_SQL1 As SqlClient.SqlCommand
Def_Command_SQL1.CommandText = "UPDATE ID_Max1 SET IdMax = IdMax + 1 , @OutID = IdMax + 1 where TypeID>1"
Def_Command_SQL1.Parameters.Clear()
Def_Command_SQL1.Parameters.Add(New SqlParameter("@OutID", SqlDbType.Int))=1
Def_Command_SQL1.Parameters("@OutID").Direction = ParameterDirection.Output
Def_Command_SQL1.ExecuteNonQuery()
IDMax_Update = Def_Command_SQL1.Parameters("@OutID").Value