AMFPHP and MSSQL
Thursday, July 2nd, 2009Recently I had to work on a project using AMFPHP and FLEX and (aaargh) MSSQL.
I am a MySQL guy but since I am working in the finance sector now, Microsoft SQL Server always comes to haunt me, but this was the first time with AMFPHP. Remember, Microsoft is good at selling their stuff to corporate. Anyway, that’s is OK if I consider I came to have nightmares working with worst things (like Sharepoint).
Anyway, for my surprise, AMFPHP adapter for Microsoft SQL didn’t work at all. I tried googling and apparently there was not that much info (no one using MSSQL with AMFPHP?). I ended up digging in the adapter files after trying everything possible and impossible.
In the end there was a “simple” bug that after fixed made everything work magically:
In the core/shared/mssqlAdapter.php file, line 28, just rename columnNames[] to columns[]
That will do it.
I contacted the AMFPHP dev team and they replied back telling me it is patched but since they have no idea when the next update is out, I should blog about it, so here it is my humble contribution :)




