Hi All,

          I would like to fetch values from Sipxces database tables
through C++ code.

          For that I have used the following database functions


         OdbcHandle handle = NULL;

          
handle=odbcConnect("SIPXCONFIG","localhost","postgres","{PostgreSQL}");

          char sqlStatement[256];       

          sprintf(sqlStatement, "SELECT *  FROM table_name;");

          odbcExecute(handle,sqlStatement);

           char buffer[256];

           odbcGetColumnStringData(handle, 1, buffer, 256);
                                                                        
                                        
        I checked each database statements manually (means check value by the
help of log file) all returns true and working well.

        But when I print "buffer" as a string then it gives me garbage.

        Please, tell me how can I get this value in buffer or do I
need to follow some extra steps. where I am lacking.

        It is urgent so please reply me asap.


Thanks In Advance,
Anand.
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to