Posts

Showing posts from 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...

Flash focus in Firefox and chrome

Recently i encountered a problem which was hard finding a solution in the internet: setting the focus to the flash object in firefox and chrome when loading the website. I tried using this idea: <body onload="window.document.FlashName. focus ();"> <object name="FlashName" ... /> <embed name="FlashName" ... /> </object> </body> but while this works in IE it's not working in firefox at all. I also tried detecting the browser and focusing the embed instead of the object in firefox, but turns out that the embed can't take focus easily. Eventually i've encountered this post: http://www.asserttrue.com/articles/2006/11/17/firefox-and-flash-swf-selection-and-focus-problems which solved this issue. In order to focus flash in both firefox and IE, there're 2 things need to be done: 1. add wmode="opaque" to the object and to the embed 2. address the flash by name and not by ID or separating the code for IE and F...