Answer the question
In order to leave comments, you need to log in
How to display all data from a table in Unity?
How to display all data in a row from a table in Unity? I have this code, but it gives an error:
cmd_db = new SqliteCommand ("SELECT * from Users", con_db);
rdr = cmd_db.ExecuteReader();
while (rdr.Read())
{
txt = txt + rdr [0].ToString ()+" ," + rdr [1].ToString ()+", " + rdr [2].ToString ();
text.text = txt;
}
cmd_db = new SqliteCommand ("SELECT * from Users", con_db);
rdr = cmd_db.ExecuteReader();
while (rdr.Read ())
{
text.text = rdr[1].ToString ();
text1.text = rdr[2].ToString ();
text2.text = rdr[3].ToString ();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question