SQL - Query lazarus / 16-Databases ---------------------------------------------------------------------- nico88desmo · 2007-04-17 16:42 Hello! I need to catch a field of a table; after to have made this: SQLQuery1.SQL.Add('SELECT email FROM connessi'); i need 'email' field; how can I catch it? In Borland Delphi i wrote: - edit1.text := sqlquery1['email']: and it worked... Thank to All! ---------------------------------------------------------------------- RudieD · 2007-04-17 17:13 Don't you mean SQLQuery1.Fields[1].AsString or SQLQuery1.FieldByName('email').AsString ? ---------------------------------------------------------------------- RudieD · 2007-04-17 17:16 Sorry, I mean Code: [Select]SQLQuery1.Fields[0].AsString or Code: [Select]SQLQuery1.FieldByName('email').AsString ? ---------------------------------------------------------------------- nico88desmo · 2007-04-19 17:45 Quote from: "RudieD"Sorry, I mean Code: [Select]SQLQuery1.Fields[0].AsString or Code: [Select]SQLQuery1.FieldByName('email').AsString ? i've done and it functions! Great! ---------------------------------------------------------------------- MayaMcCarthy · 2020-11-02 09:51 You need to get the full content of the table. That will allow you to find the emails columns heading. Now you can use that field in your SQL Query to get the emails. Example. First Query "Select * From Users" Now you will get all the information of users. Here check for the email column and obtain the header of that column. Second Query "Select * From Users Where User_Email abc@gmail.com" That's all!