Re: SQL Query Help



Yes I need to loop through the rows
returned by the query and concatenate all of the returned ListNames
into a string. Well i need to loop through all and populate a combobox.
Thanks
Grant
"Bill Todd" <no@xxxxxx> wrote in message
news:45293a39$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Grant wrote:

Hi all I have a access database." mail.mdb".

I am trying to loop through all the records in a field. Field name is
"ListName". This is were I am.
ShowMessage(Query1.fieldbyname('ListName').AsString);
My Sql is. select * from ListNames where ListName = :param1.
So I want to show message of all info in the field ListName.
Thanks in advance for helping.

Your message is not clear. Unless ListName is the primary key your
SELECT may return more than one row. ShowMessage displays a dialog box
that contains a single string. Either you have to loop through the rows
returned by the query and concatenate all of the returned ListNames
into a string or you need to display the returned data in a DBGrid or
DBListBox.

--
Bill Todd (TeamB)


.



Relevant Pages

  • Re: Anything wrong with the way I use "break"s in my loops?
    ... The member, "AggregateLists", however, is an ArrayList with each ... ListName and OriginalWeight. ... If a match of Ticker, Side, and also ListName ... I'm afraid simply returning from inside a loop is not a clean way to ...
    (microsoft.public.dotnet.general)
  • Re: SQL Query Help
    ... I am trying to loop through all the records in a field. ... "ListName". ... My Sql is. ... that contains a single string. ...
    (borland.public.delphi.database.ado)
  • SQL Query Help
    ... Hi all I have a access database." ... I am trying to loop through all the records in a field. ... select * from ListNames where ListName =:param1. ... So I want to show message of all info in the field ListName. ...
    (borland.public.delphi.database.ado)
  • Re: Using strings to refer to form fields
    ... >If you are trying to concatenate the contents of a number ... >Dim intI as integer, strConCat as String ... >> use For count loop. ...
    (microsoft.public.access.modulesdaovba)
  • Re: I *JUST* would like to output the data in a PICK (UniVerse) database to a comma delimited file!
    ... loop ... through the attributes and concatenate them to a string, ... commas, write the file, and you're done. ...
    (comp.databases.pick)