reading data from database into a string. lazarus / 16-Databases ---------------------------------------------------------------------- jshand2010 · 2013-01-28 05:33 i have included my code so far.  i am able to connect to a database, select information.  however, i am currently unable to take information from the database and put that information into a string for memory use. i would appreciate any help given. thanks heaps ---------------------------------------------------------------------- wjackson153 · 2013-01-28 06:05 var sData: String; being sData := 'SELECT * FROM example;'; // sData data pulled from database is now in memory end; Or you could just assign a query to sData sData := your dababase query string here ; ---------------------------------------------------------------------- BigChimp · 2013-01-28 10:08 Quote from: jshand2010 on January 28, 2013, 06:33:29 amhowever, i am currently unable to take information from the database and put that information into a string for memory use. Have you seen this tutorial that describes how to retrieve data from a db and put it into a variable: http://wiki.lazarus.freepascal.org/SQLdb_Tutorial3 I think that will help. ---------------------------------------------------------------------- jshand2010 · 2013-01-28 21:12 i have tried all that and now i am trying parambyname.  BigChimp, please take a look at my new code to see where the issue most likley is.  i'm now so lost, that i don't know what's wrong or right anymore. ---------------------------------------------------------------------- Nebula · 2013-01-28 22:07 After your q.open you should have data in  q.Fields[0].AsString    - your uname  q.Fields[1].AsString    - your pword but check for q.EOF in case no data came back ---------------------------------------------------------------------- BigChimp · 2013-01-29 10:04 @jshand2010: assuming Nebula give you the right answer; if not pls post again. Also, if you post db projects, please include the database DDL (or use a well known sample database)... Makes it much easier for us lazy helpers PS: Having looked at your first code, I know that brevity is a virtue, but naming variables with only 1 or 2 letters looks a bit cryptic to me. You could consider naming the variables something more descriptive...