Skip to content

Connecting to a DB server

The connection to a database (after having configured the SqlCli object) is performed via the Connect() method which returns true if the connection is successful, or false if the connection fails.

ts
{
  var cli = new SqlCli().Driver("sqlite").ConnString(":memory:");
  if (cli.Connect()) {
    // Perform SQL tasks....
    cli.Close();
  }
}