<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>trying to define where with unserName()</title><link>https://www.infopathdev.com:443/forums/thread/54421.aspx</link><pubDate>Sun, 02 May 2010 09:29:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54421</guid><dc:creator>amirli</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54421.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=54421</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;i defined data connection to SQL DB.&amp;nbsp;&lt;/p&gt;&lt;p&gt;to reduce the timing, i would like to create a specific query inside the data connection.&lt;/p&gt;&lt;p&gt;i used the Edit SQL button and wrote this query:&lt;/p&gt;&lt;p&gt;select &amp;quot;LastName&amp;quot;,&amp;quot;FirstName&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; from &amp;quot;dbo&amp;quot;.&amp;quot;Worker&amp;quot;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where ShortID =&amp;#39;&amp;quot; + userName() + &amp;quot;&amp;#39;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;i can use userName() inside any field, but when writing this syntax, it doesn&amp;#39;t work.&lt;/p&gt;&lt;p&gt;i tried adding @,&amp;nbsp; &amp;amp; changing syntax but nothing. when i writhing my specific&amp;nbsp; user name (not function), it&amp;#39;s work, so it has to be syntax problem.&lt;/p&gt;&lt;p&gt;any ideas?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>