public static string GetStatistics() { string value = ""; SqlCommand command = DB.SPPrepare( "GetStatisticsAsString" ); command.Parameters.Add( new SqlParameter( "@catalog", "HYG" ) ); command.Parameters.Add( new SqlParameter( "@catalogDSO", "MYDSO" ) ); SqlParameter par = new SqlParameter( "@output", System.Data.SqlDbType.NVarChar, 2048 ); par.Direction = System.Data.ParameterDirection.Output; command.Parameters.Add( par ); command.ExecuteNonQuery(); value = (string)command.Parameters[ "@output" ].Value; return value; }
Microsoft AX 2012, X++, C#, SQL server, SSRS, Java, JavaFX, Oracle, PL/SQL, Delphi - codes examples, step-by-step tutorials, experiences.
Monday, March 9, 2020
C# - How call stored proc with output/return parameter ?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment