Automatic SELECT * FROM ... without WHERE clause?

Hi everybody,

Using a TADOConnection -> TADODataSet combination to select data from a 
Sybase database.

(I made a simple test program to verify the follwing behaviour)

After connection to the database the application send a SELECT command with 
(!) a WHERE clause to the database. At first sight everything works perfect, 
but the customer reports the following problem:

Immediately before the defined SELECT command is executed a SELECT * on the 
same view WITHOUT a WHERE clause is executed. (BTW, I do not send this 
command)

This is a problem because it's a large database accessed over a slow 
internet connection.

Does anybody knows where the SELECT * without WHERE clause comes from and 
how I can avoid this?

Any hint is wellcome.
With kind regards,
Ruediger Kabbasch
0
Ruediger
9/22/2008 2:07:01 PM
embarcadero.delphi.ado 597 articles. 1 followers. Follow

5 Replies
521 Views

Similar Articles

[PageSpeed] 2

"Ruediger Kabbasch" <ruediger.kabbasch@thermofisher.com> wrote in message 
news:19370@forums.codegear.com...
>
> Using a TADOConnection -> TADODataSet combination to select data from a 
> Sybase database.
>
> After connection to the database the application send a SELECT command 
> with (!) a WHERE clause to the database. At first sight everything works 
> perfect, but the customer reports the following problem:
>
> Immediately before the defined SELECT command is executed a SELECT * on 
> the same view WITHOUT a WHERE clause is executed. (BTW, I do not send this 
> command)

It sounds like you have the Active property set to true at design time. Make 
sure all datasets are inactive at design/compile time and set then active as 
needed in code.

-- 
Wayne Niddery - TeamB (www.teamb.com)
Tips to Get Published: http://dn.codegear.com/article/38467
Winwright, Inc. (www.winwright.ca)
0
Wayne
9/22/2008 3:27:42 PM
Hello Ruediger

I am not sure, but many DBMS's to describe resultset
structure, as it is required for ADOExpress (dbGo),
may ask DBMS for another SELECT. Which returns the
same columns, just this query will be very easy to execute 
for DBMS - means no WHERE and optionally LIMIT=1.

Probably ...

-- 
With best regards,
Dmitry Arefiev
AnyDAC Team

RemObjects Software
The Infrastructure Company
http://www.remobjects.com
0
Dmitry
9/22/2008 4:04:09 PM
> It sounds like you have the Active property set to true at design time. 
> Make
> sure all datasets are inactive at design/compile time and set then active 
> as
> needed in code.

Thanks for the tip, but no, they are all set to false.
In the real application they are created dynamically at runtime, so the 
active property is set to false by default.

With kind regards,
Ruediger Kabbasch
0
Ruediger
9/22/2008 4:38:43 PM
Just for those who like to know the reason:

The reason for the SELECT * without WHERE clause was because the 
CursorLocation was set to cluseClient. After changing to cluseServer the 
additional select was not longer executed.
BTW: I tested the same with an Oracle database and there was never an 
additional SELECT * without a WHERE clause, so it seems that this behaviour 
depends on the used DB.

With kind regards,
Ruediger Kabbasch
0
Ruediger
9/24/2008 9:27:50 AM
"Ruediger Kabbasch" <ruediger.kabbasch@thermofisher.com> wrote in message 
news:20323@forums.codegear.com...
>
> The reason for the SELECT * without WHERE clause was because the 
> CursorLocation was set to cluseClient. After changing to cluseServer the 
> additional select was not longer executed.
> BTW: I tested the same with an Oracle database and there was never an 
> additional SELECT * without a WHERE clause, so it seems that this 
> behaviour depends on the used DB.


Thanks for the followup. Glad you figured it out.

-- 
Wayne Niddery - TeamB (www.teamb.com)
Tips to Get Published: http://dn.codegear.com/article/38467
Winwright, Inc. (www.winwright.ca)
0
Wayne
9/24/2008 3:13:33 PM
Reply:

Similar Artilces:

Select in the select clause
How to use another select clause within a select clause itself. Like; select col1,col2,(select colx from table b) from table a . The above statement is throwing syntax error Thanks, Anandkumar B CGVAK Software & Exports Ltd. ( 0422 2434491/92 http://www.cgvakindia.com "anand_group" <anand@cgvakindia.com> wrote: > How to use another select clause within a select clause itself. > Like; > select col1,col2,(select colx from table b) from table a . > The above statement is throwing syntax error Ensure that subquery returns only one row. And...

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

D2010 : How Delphi automatic fill the requires clause of a package?
Hi to everybody, I'm building a my own package with my new Delphi 2010. I can't understand how Delphi fills automatically the requires clause. I'm compiling the package and getting a lot of warnings about implicit unit import (W1033) for the indy units. I can't understand why Deplhi doesn't add automatically the right indy packages in the requires clause as it does with others packages. I've to add them manually. I've tried to remove all dcp from the requires clause but then I get the error F1026 File not fount: ToolsApi.dcu. To avoid this error I'...

How to select a row without select button
Hi. I am use one Dataview in My Web site Now i Have 2 boubts , 1.How to get a Datagrid item values(All row values)in pageLoad event 2.How to select a row without using Select Button, i want to select a row on mouse click event Please give me a soulation TO SELECT A ROW ONCLICK: Firstly, you will need to enable row selections for your datagrid. this will place the proper javascript in your page for what is to come.  This will place a select button on your page, but you can convert that column into a template and make the linkbutton visible=false. you need a OnRowCreated ev...

Selecting records in GRIDVIEW without SELECT button ??
Hi , i was wondering, how to make the SELECT link button that comes along with the GRIDVIEW when we enable SELECTION , disappear and make the records selectable ?, so that insted of CLICKING on the SELECT button for selecting the records , i could directly select the records !. Now i get somthing like this.. for selection.. Col 1   COL2Select nameSelect AgeSelect salary What i want is..this for selection... COL1nameagesalary Thanks in advance ! Convert your data column to a template field. Replace the label with a LinkButton, bind the text and set the commandname o...

Delphi 6 to Delphi 2010 upgrade and ADO
We have an application written in Delphi 6 Professional that uses ADO to access databases servers that may be on other PCs in our network. We want to move to Delphi 2010 but can't decide if we need Professional or Enterprise. 2010 Pro has dbGO - will this give us the same functionality as the ADO components we use in Delphi 6 Pro? Thanks, Keith > 2010 Pro has dbGO - will this give us the same functionality as the > ADO components we use in Delphi 6 Pro? Yes. > {quote:title=Joachim Uersfeld wrote:}{quote} > > 2010 Pro has dbGO - will this give us the same func...

Selectable Row in a DataGrid without the SELECT button
Does anyone know how to code the DataGrid so that when click on the data row, that row  must be selected just like a SELECT button does, but without the button?   Thanks, Check this out: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebteam/html/webteam11062001.asp (Section: The Works and Days of Hands)Remove "_no_spam" for sending email...

Select a gridview row without a select button
Hi Does anyone have a vb code sample of how to select a gridview row without having to click on a select button?   Thanks    ASPX <asp:label id="Label1" runat="server" /> <asp:gridview id="GridView1" runat="server" autogeneratecolumns="False" datakeynames="ProductID,ProductName" datasourceid="SqlDataSource1" style="margin-top: 12px;"> <columns> <asp:boundfield datafield="ProductID" headertext="ProductID" readonly="True" sort...

how can i select a row in a gridview without the select link
how can i select a row in a gridview without the select link, i mean, by click in the row no in the select link?i know that it is not a custom control but i couldnt do that yet. Hi, it is a custom control. ;-) Please see my blog post: Developing a row-clickable GridViewhttp://aspadvice.com/blogs/joteke/archive/2006/01/07/14576.aspxThanks,Teemu KeiskiFinland, EU...

Help selecting geridview row without select button.
I am trying to get a gridview row to be selected without havigna select button.  I have looked all over and come up with this notion.  In the Gridview I do the following.                  <asp:TemplateField HeaderText="ContactID" Visible="False">                    <ItemTemplate>                &n...

ASA7 ADO & Delphi ADO ?? Anyone is using it?
Any comments? Is it working? Any Problems? Thanks Hi, PR <noemail@no.com> schrieb in im Newsbeitrag: BoTThJaq$GA.89@forums.sybase.com... > Any comments? Is it working? Any Problems? I tried to connect to ASA7 via the new OLE DB - Provider and ADOExpress from Delphi 5.01. No chance. Only the error message 'Invalid Enum Value'. About the new provider I haven't heard anything good until now... Regards Frank Frank, I've experienced the same problem with the ASA 7 OLEDB Provider. I'm not sure if this is a bug in the AsaProvider or Delp...

How to Select all articles form a category without an article that is selected?
Hello, i want to Select all articles form a category without an article that is selected. Thanx a lot ! It's good what i'm thinkin? select * from articles where idCategory = 1 AND IdArticle <> 5 ??? :)...

SELECT from SELECT
Hi! I remember seeing an example where you can do a select from a nested select, but I cannot seem to make it work. So it would be something like this: select max( name ) from ( select name from customer union select name from vendor ) Was I dreaming I saw that? Thanks! D In article <4500243f@forums-2-dub>, daniel_AT_infrontsoftware_DOT_com@N0SPAM.com says... > Hi! > > I remember seeing an example where you can do a select from a nested > select, but I cannot seem to make it work. No, you weren't. Try (UNTESTED!) adding a...

Problem in GridView Row Selection without using Select button
Hi All, I want to Select a Gridview Row without using Select button, So i have used following Javascript in Row DataBound Event.... e.Row.Attributes["onmousedown"] = ClientScript.GetPostBackClientHyperlink(this.grdDocs, "Select$" + e.Row.RowIndex,false); It is working fine. But the page is refreshing every time when i select a row. how can i avoid that....? Using an UpdatePanel is one option, off the top of my head,C# <---> VB.Net Translator I am not using Ajax here. Can't i do with Javascript...? Row selection in a Grid is only handled server-side...

Web resources about - Automatic SELECT * FROM ... without WHERE clause? - embarcadero.delphi.ado

Electronic Delay Storage Automatic Calculator - Wikipedia, the free encyclopedia
Later the project was supported by J. Lyons & Co. Ltd. , a British firm, who were rewarded with the first commercially applied computer, LEO ...

Man found carrying fully automatic sub-machinegun in Marrickville: police
A man has been caught with a sub-machinegun in his bag in Sydney's inner west, police say.

You can now install popular automatic screen brightness app Flux on iPhone and iPad
... is now possible to install screen brightness app Flux (or f.lux). Flux adjusts screen brightness and color depending on the time of day automatically, ...

Facebook Testing Automatic Translation?
Facebook appears to be experimenting with automatic translation , including the extension of that functionality to calls to action . Reader ...

Every argument against automatic voter registration, debunked
... iVote, a project launched by a group of Democratic campaign veterans, announced that they plan to spend $10 million in order to pass automatic ...

A second look at Australia's ban on semi-automatic weapons - Videos - CBS News
After a 1996 massacre in Australia left 35 people dead, the government banned semi-automatic firearms. Holly Williams went to Australia to see ...

'Alexa, where's my car?' Automatic syncs your vehicle with Amazon Echo
The connected car adapter is the latest product to craft an integration with Amazon's smart home speaker.

Liberals Aren’t Going To Like How The Majority Of Americans Feel About Semi-Automatic Guns
Liberals Aren’t Going To Like How The Majority Of Americans Feel About Semi-Automatic Guns

This week in the war on voting: Chris Christie vetoes automatic registration bill
... have become the third state in the country to dramatically increase its voting base, and likely its voter participation, by adopting automatic ...

Sonos' automatic speaker tuning feature is available today
Sonos' new automatic tuning feature Trueplay is rolling out to the masses. The software addition adjusts the strength of various frequencies ...

Resources last updated: 1/6/2016 11:37:46 AM