How can i pull raster data from database?

Hi Everyone,

I am trying to show spatial datas using MapWinGis in C#. The database that i am using is postgresql/PostGIS. I have number of tables in my database either in vector and raster format. To call and show these datas i am using the code below.

        string text = textBox1.Text;
        string sql = "SELECT * FROM public.\"" + text + "\"";
        int handle = axMap1.AddLayerFromDatabase(ConnectionString, sql, true); 

For vector datas which is stored in database with ‘geom’ type, works perfect but for raster data (column type is raster) does not work. ‘AddLayerFromDatabase’ function returns a layer but it is am empty layer. when i call the function ‘ZoomToLayer’ it goes to (0,0).

My raster data is a .tif file. i use raster2pgsql.exe to upload it. I don’t get any error but can’t view it.

How can i pull raster data from my database and view it on Map?