QA@IT
«回答へ戻る

回答を投稿

C#側です

SqlCommand command = new SqlCommand( "Proce_GetID", this.connection );
command.CommandType = CommandType.StoredProcedure;

command.Parameters.AddWithValue( "@tempID", 100 );
command.Parameters.Add( "@RetID", SqlDbType.Int );
command.Parameters["@RetID"].Direction = ParameterDirection.Output;
reader = command.ExecuteReader();

Hashtable data = new Hashtable();
int i = 0;
while ( reader.Read() )
{
data[reader.GetName(i)] = reader.GetInt32( i );
i++
}

この様な感じで取得しています。

C#側です

SqlCommand command = new SqlCommand( "Proce_GetID", this.connection );
command.CommandType = CommandType.StoredProcedure;
 
command.Parameters.AddWithValue( "@tempID", 100 );
command.Parameters.Add( "@RetID", SqlDbType.Int );
command.Parameters["@RetID"].Direction = ParameterDirection.Output;
reader = command.ExecuteReader();
 
Hashtable data = new Hashtable();
int i = 0;
while ( reader.Read() )
{
    data[reader.GetName(i)] = reader.GetInt32( i );
    i++
}

 
この様な感じで取得しています。