Home All Groups Group Topic Archive Search About

How to get varchar parameter in Extended stored procedure

Author
17 Mar 2006 4:38 PM
nick
I have the following code to read the varchar in parameter. However,
srv_convert function sound doesn't fill the temp variable. It remains the
testing 'aaaaaaaa...' string. Any clue? Thanks.

            char* temp = new char[8000];
            for (int i=0; i<7999; i++) temp[i] = 'a'; // For test
            temp[7999]=0;
            srv_convert(spSrvProc,
                srv_paramtype(spSrvProc, 1),
                srv_paramdata(spSrvProc, 1),
                srv_paramlen (spSrvProc, 1),
                SRVVARCHAR, temp, 8000 );
            if (srv_paramlen(spSrvProc, 1) != 0) {
                param.value = std::string(temp); // This line was executed
            }
            delete temp;

Author
17 Mar 2006 5:01 PM
nick
The function srv_convert returned -1. Is it true that extended stored
procedure cannot pass varchar?

AddThis Social Bookmark Button