2009-04-06 26 views

答えて

0

このようなことができます。

using (OracleConnection connection = GetConnection) 
{ 
    OracleCommand command = new OracleCommand("insert_into_pop"); 
    command.Connection = connection; 
    command.CommandType = CommandType.StoredProcedure; 
    command.Parameters.AddWithValue("@Param", value); // 0 or more parameters passed in here 
    command.ExecuteNonQuery(); 
} 

しかし、これをコードの後ろに置いてはいけません。論理をカプセル化するサービスやビジネスレイヤーが必要です。

+0

Craig - 質問で要求されたパラメータを追加しました。うまくいけば、それは別のupvoteまたは2を得るでしょう... –

+0

ありがとう、私は 'not'のコードの後ろにも入れて言うように変更します。 – Craig

関連する問題