2010-07-01 99 views

回答

2

我不確定爲什麼系統過程未記錄。但是,我相信它使用與sp_GetColumns相同的語法。例如,

execute procedure sp_getProcedureColumns(null, null, 'myAEP', null); 

而且基於另一個問題評論,您可能也有興趣AdsCommand.DeriveParameters。這裏是一個例子:

AdsCommand cmd = conn.CreateCommand(); 
cmd.CommandText = "SomeProcedure"; 
cmd.CommandType = CommandType.StoredProcedure; 
cmd.DeriveParameters(); 
foreach (AdsParameter p in cmd.Parameters) 
    Console.WriteLine("{0}, {1}, {2}", p.ParameterName, p.DbType.ToString(), 
         p.Direction.ToString());