AMFPHP and MSSQL
Recently 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 :)

September 16th, 2009 at 20:55
Olá Estou trabalhando em uma aplicação com as mesmas caracteristicas e gostaria de saber se vc tem ai algum tutorial de como utilizar ou ligar o mssql ao AMFPHP talvez algum exemplo que eu possa me basear
Obrigado.
January 9th, 2010 at 02:41
Hi, I had the same problem, but your solution was perfect.
thx so much.
January 15th, 2010 at 18:38
I have a similar problem but with the an odbc connection (AMFPHP 1.2.6), I´m using :
$conn=odbc_connect(’xxx’, ”, ”);
$sql=”SELECT * FROM table “;
$res=odbc_exec($conn,$sql);
return $res;
from the browser i can only see an empty array. From flash netDebugger i can see only the names of the table fields, nothing more. I tried your solution but it doesn’t work for me. Do you know if I have to make something special if I use the odbc, I mean using an adapter, or it’s automatic? With mysql everything worked perfect.
Can you help me? I’m a little bit fodido…
Obrigado.
March 19th, 2010 at 03:01
Thanks, I was just start a project using AMFPHP with MySQL and they switched to MSSQL and i hit this issue, you post help me out greatly.
Thanks