Data Connection Query - InfoPath Dev
in

InfoPath Dev

Data Connection Query

Last post 02-23-2006 07:13 AM by Agni Jonnalagadda. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-22-2006 11:33 PM

    • delu
    • Not Ranked
    • Joined on 01-12-2006
    • Posts 13

    Data Connection Query

    I'm confused: I have a data connection:


    select distinct "FullName" from "employee" as "FullName" order by "FullName"


    When I run this data connection from managed code, everything works fine. But when I put a 'where' statement in it, the result will always be "".


    SELECT distinct FullName
    FROM bi_employee
    AS FullName
    WHERE LogonName=N'blah'
    ORDER BY "FullName"


    When I exclude the "where" statement, everything works fine. the management studio performs the query without an error on manual try.


    I assumed the XPath of the result set changed, but I just can't figure out to what. I tried everything I could imagine.

    Can anybody help me?

    Thanks a lot!!
  • 02-23-2006 07:13 AM In reply to

    Hi,
    You are using single quote in the query string, database thinks single quote as a starting of the string.
    You need to escape single quote with one extra single quote then it should work.

    So your query should be
    SELECT distinct FullName
    FROM bi_employee
    AS FullName
    WHERE LogonName=N''blah''
    ORDER BY "FullName"

    Agni
    INFOPATHdev India
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.