wojtek327

Untitled

Jun 12th, 2018
67
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class sqlCon
  2. {
  3.    protected static SqlConnection sqlCon;
  4.  
  5.    public static bool connectWithSqlDb()
  6.    {
  7.        sql.sqlConectionInfo.readConData();
  8.  
  9.        string conString = sql.sqlConectionInfo.prepareConString();
  10.        sqlCon= new SqlConnection(conString);
  11.        try
  12.        {
  13.            sqlCon.Open();
  14.            sqlCon.Close();
  15.            return true;
  16.        }
  17.        catch
  18.        {
  19.            return false;
  20.        }
  21.    }
  22. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×