Ejemplo n.º 1
0
        public static bool CreateFunction(string functionName, string sqlQuery)
        {
            DataTable dataTable = ADODatabase.GetDataTable("SELECT name FROM sysobjects WHERE name = '" + functionName + "' AND (type = 'FN' OR type = 'TF') ");

            if (dataTable.Rows.Count > 0)
            {
                ADODatabase.ExecuteNonQuery("DROP FUNCTION " + functionName);
            }

            ADODatabase.ExecuteNonQuery("CREATE FUNCTION " + functionName + char.ConvertFromUtf32(13) + sqlQuery);

            return(true);
        }
Ejemplo n.º 2
0
 public static int ExecuteNonQuery(string commandText, CommandType commandType)
 {
     return(ADODatabase.ExecuteNonQuery(commandText, commandType, GlobalMsADO.ConnectionString()));
 }
Ejemplo n.º 3
0
 public static int ExecuteNonQuery(string commandText, string connectionString)
 {
     return(ADODatabase.ExecuteNonQuery(commandText, CommandType.Text, connectionString));
 }
Ejemplo n.º 4
0
        //BELOW IS OK STATEMENT ----------------------------------------------

        public static int ExecuteNonQuery(string commandText)
        {
            return(ADODatabase.ExecuteNonQuery(commandText, CommandType.Text));
        }