sqlPassThrough and string constants

CapableObjects Forums SupportForum sqlPassThrough and string constants

This topic contains 2 replies, has 2 voices, and was last updated by  efim 1 year ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #5018 Score: 0



    if anybody worked with sqlPassThrough and OCLPSService?
    I can’t figure out how to specify a string constant in SQL expression.

    E.g. this brings runtime error “Syntax Fehler”:

    var expr = “Teilauswertung.sqlpassthrough(‘Select ECO_ID From TEILAUSWERTUNG Where Bezeichnung = /’onlinedatenpunkte/’)’, String)”;
    EcoSpace.GetEcoService<IOclPsService>().GetValue(null, null, expr, 0, 0);

    The same expression can be executed without problems in OCLPS editor


    #5019 Score: 0


    You must use the backslash to escape the ‘ – like this: \’onlinedatenpunkte\’

    #5021 Score: 0


    Yes, my expression was a bit incorrect. I have corrected it like this:

    Teilauswertung.sqlpassthrough(‘Select ECO_ID From TEILAUSWERTUNG Where Bezeichnung = \’onlinedatenpunkte\”, Integer)

    It evaluates in OCLPS editor, but throws Exception at runtime. Try it – you will see

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Comments are closed.