createSqlServerConnection() public static method

public static createSqlServerConnection ( ) : void
return void
Ejemplo n.º 1
0
        public static SqlDataReader executeSQLCommand_returnSqldataReader(string sqlQueryToExecute)
        {
            Global.createSqlServerConnection();
            //SqlConnection Global.globalSqlServerConnection = new SqlConnection(ConfigurationSettings.AppSettings.Get("FoundStone_Connection"));
            string     text1    = sqlQueryToExecute;
            SqlCommand command1 = new SqlCommand(text1, Global.globalSqlServerConnection);

            Global.globalSqlServerConnection.Open();
            SqlDataReader executeReader_Result = command1.ExecuteReader();

            return(executeReader_Result);
        }
Ejemplo n.º 2
0
        public static int executeSQLCommand(string sqlQueryToExecute)
        {
            Global.createSqlServerConnection();
            //SqlConnection Global.globalSqlServerConnection = new SqlConnection(ConfigurationSettings.AppSettings.Get("FoundStone_Connection"));
            string     text1    = sqlQueryToExecute;
            SqlCommand command1 = new SqlCommand(text1, Global.globalSqlServerConnection);

            Global.globalSqlServerConnection.Open();
            int executeNonQuery_Result = command1.ExecuteNonQuery();

            Global.globalSqlServerConnection.Close();
            return(executeNonQuery_Result);
        }