Re: Default Value for Where Clause in Datasource



Lee Stevens wrote:
Hi all,

I have a textbox and want to populate my datagrid using a LIKE clause
from what is in the textbox. This works fine, however, if the
textbox is empty, I would like it to return all rows. I was looking
into setting the default value to do this, but have had no luck so
far in finding an answer.

Does anyone have any advice for this?

I can't answer this without seeing your code. There are many ways you
could have accomplished your first task: dynamic sql, parameterized sql
statement, stored procedure ...
However:
There was no way for you to know it (except maybe by browsing through
some of the previous questions in this newsgroup before posting yours -
always a recommended practice) , but this is a classic ADO newsgroup.
ADO.Net bears very little resemblance to classic ADO so, while you may
be lucky enough to find a dotnet-knowledgeable person here who can
answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-knowledgeable people hang out. I
suggest microsoft.public.dotnet.framework.adonet.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • Re: User Form to Word Doc
    ... This message is posted to a newsgroup. ... >>> same ID names as the USerForm ones. ... >>> Private Sub QuoteNo_Change ... >>> {this is for the textbox in the user form} ...
    (microsoft.public.word.vba.userforms)
  • Re: how to save the textbox contents to sql server database
    ... try posting your message in the C# newsgroup ... I want to store all the contents of textbox in sql server database. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Admin abuse on this news group...
    ... With wordWrap and the Width of the textBox gives me ... There is obviously something with this newsgroup. ... I find it bolt from you to tell direct that Peter did that, ... answered correctly by pvdg42. ...
    (microsoft.public.dotnet.general)
  • =?ISO-8859-1?Q?Re:Bildschirm_positzionieren,_Aktives_Textbox_Zeigen?=
    ... der jeweiligen Textbox gelegene) Zelle zu selektieren, ... Private Sub TextBox2_GotFocus ... Jose Manuel schrieb in der newsgroup microsoft.public.de.excel: ... Next by Date: ...
    (microsoft.public.de.excel)
  • Re: Why the Control position changes on different computer?
    ... this newsgroup is for Visual Basic classic so you best ... bet is to ask DotNet questions in DotNet newsgroups. ... That case the form control like textbox or ... a textbox is at position ...
    (microsoft.public.vb.controls)