SQL Server Performance

Embedded SQL host Variables

Discussion in 'SQL Server 2005 CLR' started by elireu, Dec 2, 2005.

  1. elireu New Member

    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
  2. alzdba Member

    doesn't varchar exist in this context ?
    EXEC SQL BEGIN DECLARE SECTION;
    varchar cParName[80] = "";
    varchar cParValue[512] = "";
    EXEC SQL END DECLARE SECTION;

Share This Page