<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Check a new record for Duplicate</title><link>https://www.infopathdev.com:443/forums/thread/40585.aspx</link><pubDate>Tue, 14 Apr 2009 11:31:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40585</guid><dc:creator>A.Nemati</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40585.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=40585</wfw:commentRss><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I have a form with students and those lessons informations.Information be save in 2 table on a sqlserver database. When user enter duplicate records i&amp;nbsp;have&amp;nbsp;two rule.&lt;/p&gt;
&lt;p&gt;1- If user requset for submit an existing student infromation on a new record, i must confirm: &amp;quot;This student exists, do you want submit new lesson information for this student?&amp;quot;&lt;/p&gt;
&lt;p&gt;2- If user requset for submit an existing student and his/her lesson infromation on a new record, i must alert: &amp;quot;Duplicate record.&amp;quot;&lt;/p&gt;
&lt;p&gt;How i can do this? How i can query to sqlserver database without (XDocument.Query) and get result? Note: for query result, a logic value or a recordCount is enough.&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;haven&amp;#39;t time, please help me soon.&lt;/p&gt;
&lt;p&gt;Thank.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>