In This Topic
Gets or sets the command delimiter that is used in the script by default, i.e., before the DELIMITER statement is explicitly called.
Syntax
'Declaration
Public Property Delimiter As String
public string Delimiter {get; set;}
Property Value
The command delimiter that is used in the script by default.
Example
In the following sample, the script creates a stored procedure and then inserts a row into the Dept table. The delimiter is set to '&&' via the Delimiter property for creating the procedure, and then changed back to default semicolon via the DELIMITER statement.
MySqlScript script = new MySqlScript();
script.Connection = mySqlConnection1;
script.Delimiter = "&&";
script.ScriptText = @"
CREATE PROCEDURE procedure1 (OUT c INT)
BEGIN
select count(*) from Dept into c;
END&&
DELIMITER ;
INSERT INTO Dept VALUES (100, 'New dept', 'New York');
";
script.Execute();
Dim script As New MySqlScript()
script.Connection = mySqlConnection1
script.Delimiter = "&&"
script.ScriptText = _
"CREATE PROCEDURE procedure1 (OUT c INT) " & vbCrLf & _
" BEGIN" & vbCrLf & _
" select count(*) from Dept into c;" & vbCrLf & _
" END&& & _" & vbCrLf & _
"DELIMITER ; & _" & vbCrLf & _
"INSERT INTO Dept VALUES (100, 'New dept', 'New York'); "
script.Execute()
See Also