Question to SQLPassThrough

CapableObjects Forums SupportForum Question to SQLPassThrough

This topic contains 1 reply, has 1 voice, and was last updated by  efim 1 week, 5 days ago.

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

    efim
    Participant

    Hi,

    I have trouble using string literals in a SQLPassThrough expressions at runtime.
    For example:

    var sqlPassThroughExpr = “Datenpunkt.sqlpassthrough(‘SELECT DISTINCT Standort FROM Datenpunkt Where Standort <> /’/’ ORDER BY Standort’, String)”;

    runs in MDriven Debugger but when using in this code:

    parServiceProvider.GetEcoService<IOclPsService>().GetValue(null, null, sqlPassThroughExpr, 0, 0).GetAsIList<object[]>();

    it is translated to

    “Datenpunkt.sqlpassthrough(‘SELECT DISTINCT Standort FROM Datenpunkt Where Standort <> ORDER BY Standort’, String)”

    and throws exception.

    Any idea?

    #5234 Score: 0

    efim
    Participant

    I could figure out it: triple back slash is the solution:

    var sqlPassThroughExpr = “Datenpunkt.sqlpassthrough(‘SELECT DISTINCT Standort FROM Datenpunkt Where Standort <> //////’ ORDER BY Standort’, String)”;

    I have impression GetValue performs dubble deprication

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

You must be logged in to reply to this topic.

Comments are closed.