Subsonic 3 and Activerecord isn't generating MySQL Stored Procedures -
It seems that the included T4 template (or one of the SVN trunks for that matter) simply prevents SP for generating MySQL. .. When stored processing runs. Join Myths with MySQL. Include, I get the "compile compile" error: The name 'gettypex' does not exist in the current context. "Is define the SQLServer the
GetSps and I saw that someone wrote his for Oracle, but no clue how to look for MySQL - the method appropriate GetSPs () ?
Personally I do not think that it is actually functional unless I can run my own SP: /
I was slightly with the code from version 2 and came up with a small code (all the conditions Keep this in MySQL, which may have been a trick for me. To get a protected process, please enjoy!
string [] GetSPList () {var results = New List (); Const String SQL = "Information from Information routine_name SOCEMA.ROUTINES where ROUTINE_SCHEMA =? DatabaseName "; Stringbillder sList = new Stringbilder (); (Conn = new MySqlConnection (using the connection string)) {MySqlCommand cmd = new MySqlCommand (SQL, conn); Cmd.Parameters.AddWithValue (" databaseName ", DatabaseName); conn .Open (); (IDataReader rdr = is using cmd.ExecuteReader (CommandBehavior.CloseConnection)) {bool isFirst = true; while (rdr.Read ()) {if (! IsFirst) sList.Append ( '|' ); IsFirst = false; sList.Append (RDR [0]);} Rdr.Close ();}} return sList.ToString (). split (new char [] { '|'}, string Split option. RemoveEmptyEntries) ;} GetSparks list (string spName) {var results = new list (); MySqlCommand CMD = new M ySqlCommand (); (Conn = new MySqlConnection (using the connection string)) {conn.Open (); Cmd.Connection = conn; Cmd.CommandText = spName; Cmd.CommandType = CommandType.StoredProcedure; {MySqlCommandBuilder.DeriveParameters (cmd Try);} catch {} if (Simdikpametrskkount> 0) Maisclprametr in {foreach (Simdikparmetrs ultimate) {Speepiram p = new Speepiaarm (); P.SysType = GetSysType (param.MySqlDbType.ToString ()); P. Db type = param.DbType.ToString (); P.Name = param.ParameterName; P.CleanName = CleanUp (p.Name); Result.Add (P); }} Conn.Close (); } Return results; } GetSp () {var results = new list (); String [] spNames = GetSPList (); Foreach (string spName in spNames) {var sp = new SP (); SpName = spName; Sp.CleanName = CleanUp (sp.Name); Sp.Parameters = GetSPParams (sp.Name); Result.Add (SP); } Return results; }