Skip to content

Connecting to a DB server ​

After configuring the SqlCli object, connect to the database using the Connect() method. This method returns true if the connection is successful, or false if it fails.

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