Oracle 5.0 Reference Manual page 1915

Table of Contents

Advertisement

string sql = "DROP PROCEDURE IF EXISTS test_routine??" +
You can change the delimiter back at any point by setting the Delimiter property. The following code
shows a complete working example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data;
using MySql.Data.MySqlClient;
namespace ConsoleApplication8
{
class Program
{
static void Main(string[] args)
{
string connStr = "server=localhost;user=root;database=TestDB;port=3306;password=******;";
MySqlConnection conn = new MySqlConnection(connStr);
try
{
}
catch (Exception ex)
{
}
conn.Close();
Console.WriteLine("Done.");
}
}
}
20.2.4.9. Tutorial: Generating MySQL DDL from an Entity Framework Model
In this tutorial, you will learn how to create MySQL
Studio 2010 and MySQL Connector/Net 6.3 to carry out this tutorial.
1. Create a new console application in Visual Studio 2010.
2. Using the Solution Explorer, add a reference to MySql.Data.Entity.
Connector/Net Tutorials
"CREATE PROCEDURE test_routine() " +
"BEGIN " +
"SELECT name FROM TestTable ORDER BY name;" +
"SELECT COUNT(name) FROM TestTable;" +
"END??" +
"CALL test_routine()";
Console.WriteLine("Connecting to MySQL...");
conn.Open();
string sql =
"DROP PROCEDURE IF EXISTS test_routine??" +
"CREATE PROCEDURE test_routine() " +
"BEGIN " +
"SELECT name FROM TestTable ORDER BY name;" +
"SELECT COUNT(name) FROM TestTable;" +
"END??" +
"CALL test_routine()";
MySqlScript script = new MySqlScript(conn);
script.Query = sql;
script.Delimiter = "??";
int count = script.Execute();
Console.WriteLine("Executed " + count + " statement(s)");
script.Delimiter = ";";
Console.WriteLine("Delimiter: " + script.Delimiter);
Console.WriteLine("Query: " + script.Query);
Console.WriteLine(ex.ToString());
DDL
from an Entity Framework model. Use Visual
1895

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents