How to pull a table from SQLITE?

  • Query SELECT 1; returns something? If yes and there is data on the target database, then there may be an error in the paths and it creates some clean database in another place. - Alex Krass
  • No Exceptions too? - Alex Krass
  • Are you walking under the debager? What position does he reach? At a minimum, if you substitute new SQLiteCommand("SELECT 1", connection); without everything superfluous to the source code, it should have fallen on the string host = reader["origin_url"].ToString(); . - Alex Krass

1 answer 1

In terms of syntax and logic, the code is correct.

As an option, it is possible that the joint in the condition:

  if (!String.IsNullOrEmpty(host) && !String.IsNullOrEmpty(user) && !String.IsNullOrEmpty(pass)) { Console.WriteLine("{0},{1},{2}",host,user,pass); } 

Perhaps in your database there are no such lines that immediately satisfy the 3rd conditions?

Or for example, you decrypt the password and get NULL .

Try to remove the condition and see what happens.

Or maybe there are no errors due to the fact that you have some kind of global try/catch .