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 5 months, 1 week ago.

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

    efim
    Participant

    Hi,

    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

    /Efim

    #5019 Score: 0

    Admin
    Keymaster

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

    #5021 Score: 0

    efim
    Participant

    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.