i try to execute this command by my application(C# winapp) but it show error like Parameter '@sqlstmt' must be defined but i try this command by navicat it working well please help me
"DELIMITER $$" +
" DROP PROCEDURE IF EXISTS " + txtDB.Text + ".`index_startTime` $$" +
" CREATE PROCEDURE " + txtDB.Text + ".`index_startTime`" +
" (" +
" given_database VARCHAR(64)," +
" given_table VARCHAR(64)," +
" given_index VARCHAR(64)," +
" given_columns VARCHAR(64)" +
" )" +
" BEGIN" +
" DECLARE IndexIsThere INTEGER;" +
" SELECT COUNT(1) INTO IndexIsThere" +
" FROM INFORMATION_SCHEMA.STATISTICS" +
" WHERE table_schema = given_database" +
" AND table_name = given_table" +
" AND index_name = given_index;" +
" IF IndexIsThere = 0 THEN" +
" SET @sqlstmt = CONCAT('CREATE INDEX ',given_index,' ON '," +
" given_database,'.',given_table,' (',given_columns,')');" +
" PREPARE st FROM @sqlstmt;" +
" EXECUTE st;" +
" DEALLOCATE PREPARE st;"+
" ELSE" +
" SELECT CONCAT('Index ',given_index,' already exists on Table ',"+
" given_database,'.',given_table) CreateindexErrorMessage; "+
" END IF;"+
" END $$" +
" DELIMITER ;";

@) so that you don't have to program that way. A concat can happen or other creativity for the variable replacement.