コード例 #1
0
        public static int ExecuteTraceSetEvent(OdbcConnection connection, int traceid, int eventId, int columnid, int on)
        {
            List <object> outParams = new List <object>();
            int           retcode   = SQLServerProcedureUtils.ExecuteProcedure(connection, "sp_trace_setevent",
                                                                               new string[] { "traceid", "eventid", "columnid", "on" },
                                                                               new OdbcType[] { OdbcType.Int, OdbcType.Int, OdbcType.Int, OdbcType.Bit },
                                                                               new object[] { traceid, eventId, columnid, on },
                                                                               outParams);

            return(retcode);
        }
コード例 #2
0
        public static int ExecuteTraceSetStatus(OdbcConnection connection, int traceid, int status)
        {
            List <object> outParams = new List <object>();
            int           retcode   = SQLServerProcedureUtils.ExecuteProcedure(connection, "sp_trace_setstatus",
                                                                               new string[] { "traceid", "status" },
                                                                               new OdbcType[] { OdbcType.Int, OdbcType.Int },
                                                                               new object[] { traceid, status },
                                                                               outParams);

            return(retcode);
        }
コード例 #3
0
        public static int ExecuteTraceCreate(OdbcConnection connection, out int traceid, int options, string traceFilename)
        {
            List <object> outParams = new List <object>();
            int           retcode   = SQLServerProcedureUtils.ExecuteProcedure(connection, "sp_trace_create",
                                                                               new string[] { "traceid", "options", "tracefile" },
                                                                               new OdbcType[] { OdbcType.Int, OdbcType.Int, OdbcType.NVarChar },
                                                                               new object[] { null, 2, traceFilename },
                                                                               outParams);

            traceid = (int)outParams[0];
            return(retcode);
        }