<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Beakersoft Blog &#187; dotnet</title>
	<atom:link href="http://www.beakersoft.co.uk/category/dotnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.beakersoft.co.uk</link>
	<description>My (mis)adventures in the IT industry</description>
	<lastBuildDate>Thu, 11 Mar 2010 19:40:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<image>
  <link>http://www.beakersoft.co.uk</link>
  <url>http://www.beakersoft.co.uk/wordpress/wp-content/themes/Beakersoft/favicon.ico</url>
  <title>Beakersoft Blog</title>
</image>
	<atom:link rel='hub' href='http://www.beakersoft.co.uk/?pushpress=hub'/>
		<item>
		<title>ASP.Net not seeing an SQL syntax error</title>
		<link>http://www.beakersoft.co.uk/2009/01/25/aspnet-not-seeing-an-sql-syntax-error/</link>
		<comments>http://www.beakersoft.co.uk/2009/01/25/aspnet-not-seeing-an-sql-syntax-error/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 17:10:15 +0000</pubDate>
		<dc:creator>beakersoft</dc:creator>
				<category><![CDATA[dotnet]]></category>

		<guid isPermaLink="false">http://www.beakersoft.co.uk/?p=201</guid>
		<description><![CDATA[I have been doing some work on an asp.net project that connects to a db with full text indexing enabled on a text field. We are building the app up so that users can run advanced searches using the info in this filed. While debugging the app, i came across a problem that i thought [...]]]></description>
			<content:encoded><![CDATA[<p>I have been doing some work on an asp.net project that connects to a db with full text indexing enabled on a text field. We are building the app up so that users can run advanced searches using the info in this filed.</p>
<p>While debugging the app, i came across a problem that i thought i was catching and trapping, but my app seamed to be ignoreing the problem and carrying on running so i was getting some strange results.</p>
<p>I was running some sql similar to this:</p>
<p><em>SELECT Count(title) as rec_count FROM tbl_text WHERE tbl_text.Title=&#8217;WXXX&#8217;<br />
AND Contains(tbl_text.page_text, &#8216;Tax Evasion&#8217; AND &#8216;Joe Blogs&#8217;)</em></p>
<p>In the sql i had constructed i just had an apostrophe out of place (i know rookie mistake), so the sql was failing to run. Problem was the try/catch loop it was in did&#8217;t seem to mind! I got out the sql and ran it in sql advantage, and sure enough i got this error:</p>
<p><em>Server: Msg 7631, Level 15, State 1, Line 1<br />
Syntax error occurred near &#8216;</em><em>Evasion</em><em>&#8216;. Expected &#8221;&#8221;&#8217; in search condition &#8216;</em><em>Tax Evasion&#8217; AND &#8216;Joe Blogs&#8217;</em><em>.</em></p>
<p>So sql advantage managed to trap the error, but the dotnet framework for some reason took no notice of it and carried on running. I got round the problem being checking my record set had rows before trying to use it, but i have no idea why an execption was not rasied in the first place. Anyone any ideas?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beakersoft.co.uk/2009/01/25/aspnet-not-seeing-an-sql-syntax-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
