X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 0D1DA9FA38F for ; Tue, 13 Jun 2006 23:39:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 70349-06 for ; Tue, 13 Jun 2006 23:39:27 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.233]) by postgresql.org (Postfix) with ESMTP id 05DFD9FA1A8 for ; Tue, 13 Jun 2006 23:39:27 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 36so21218wra for ; Tue, 13 Jun 2006 19:39:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:message-id:mime-version:content-type:content-transfer-encoding:x-mailer:thread-index:x-mimeole:in-reply-to; b=dDUHUG3O8rArLzRPljSyFKxzV1i2GqIWh7iOs3ENfKhypw5WLDLsvQYLt3X3xmjNGljMduZhWyHkeAf7B1d6jLLJgGXVV7XbQfxY9j8kdwfnZb4ImIwlAkUIS0OTKLup/ZCwFcUkm2udciiRzVPtEnR+euqxlbqlPDHSI4Kyfq8= Received: by 10.54.71.16 with SMTP id t16mr182884wra; Tue, 13 Jun 2006 19:38:19 -0700 (PDT) Received: from mis06 ( [205.214.220.146]) by mx.gmail.com with ESMTP id g2sm91080wra.2006.06.13.19.39.24; Tue, 13 Jun 2006 19:39:25 -0700 (PDT) From: "Rommel the iCeMAn" To: "PostgreSQL SQL Mailing List" Subject: Re: Error with "limit" clause Date: Tue, 13 Jun 2006 22:37:40 -0400 Message-ID: <006801c68f5b$82a03090$1264a8c0@theport.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcaPVf+btq5OjujdSXCWI4c99OR4fwABNI7g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 In-Reply-To: <18723.1150250293@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/146 X-Sequence-Number: 25382 > Could VB be rewriting the query behind your back? Turn on log_statement logging, and look in the postmaster log to see what's really being sent to the > backend ... Exactly! This was an oversight on my part tho. I had used the following command: MyDataReader = MyCommand.ExecuteReader(CommandBehavior.SingleRow) By passing the "CommandBehavior.SingleRow" parameter VB inserted the "limit 1" clause unknown to me. The solution was easy, either explicitly state "limit 1" in my SQL query OR use the CommandBehavior.SingleRow parameter - NOT BOTH :-) Thanks for the input, Rommel Edwards.