SQL Server Performance Forum – Threads Archive
Embedded SQL host Variables
Hi,I complied the following "C" embedde SQL statement but all the data that the SQL server returned are blank padded to the size of my variable. I tried using "DECL_VARCHAR" but the esql precompiler didn’t like it. EXEC SQL DECLARESEL_SYS_CONFIG_CUR CURSOR FOR
SELECTparam_name, param_value
FROMSYS_CONFIG; EXEC SQL BEGIN DECLARE SECTION;
charcParName[80]= "";
charcParValue[512]= "";
EXEC SQL END DECLARE SECTION; any idea how not to get the blank padding ? thanks
Eli
doesn’t varchar exist in this context ?
EXEC SQL BEGIN DECLARE SECTION;
varchar cParName[80] = "";
varchar cParValue[512] = "";
EXEC SQL END DECLARE SECTION;
]]>