Posts

Showing posts from September, 2009

SubSonic 3 with MySQL

Recently I've tried to user the new version of SubSonic (3.0.0.3) with MySQL. for two days i was struggling to make it work. I've tried the new MySQL .NET connector (6.1) and every time got errors. Eventually, I've downloaded the code of both, MySQL and SubSonic and tried to understand what the heck they are doing there. I've used the MySQL t4 that was supplied with the subsonic 3, renamed it to SQLServer.ttinclude and it still didnt work. After breaking it down and solving one part after the other i've realized that the MySQL include file is missing support of Stored Procedures. So I've rewrote it out of the SQL Server template, and using the MySQL Schema. Here it is: List GetSPParams(string spName){ var result=new List (); string[] restrictions = new string[4] { DatabaseName, null, spName, null }; using(conn=new MySqlConnection(ConnectionString)){ conn.Open(); var sprocs=conn.GetSchema("PROCEDURE PARAMETERS", restrictions); c