' there are diffferent methods. ExcecuteReader, LoadDataSet.. you have to
match yours to what you want it to do
-----------------------------------------------Reply-----------------------------------------------
Ahh, sorry, I gave you a 1.1 example:
Here is 2.0
private Microsoft.Practices.EnterpriseLibrary.Data.Database
GetDatabase()
{
// Create the Database object, using the default database
service. The
// default database service is determined through configuration.
Database db = DatabaseFactory.CreateDatabase();
return db;
}
private void UpdateEmployeeData(int empid )
{
Database db = this.GetDatabase();
DbCommand dbc = db.GetStoredProcCommand("dbo.uspSomeProcedure);
db.AddInParameter(dbc , "@EmpID", DbType.Int32, empid);
db.AddOutParameter(dbc , "@numberRowsAffected", DbType.Int32,
0);
db.ExecuteNonQuery(dbc )
}
"sloan" <s
@ipass.net> wrote in message
news:ep1ZIj5SHHA.4872@TK2MSFTNGP03.phx.gbl...
> From memory:
> Dim dbCommandWrapper As DatabaseCommandWrapper =
> db.GetStoredProcCommandWrapper("dbo.uspSomeProcedure")
> dbCommandWrapper.AddInParameter("@EmpID", DbType.Int,
> 12345 )
> ' Output parameters specify the size of the return data
> 'dbCommandWrapper.AddOutParameter("@numberRowsAffected",
> DbType.Int32, 0)
> Dim rowsAffected As Int32
> rowsAffected = db.ExecuteNonQuery(dbCommand)
> ' there are diffferent methods. ExcecuteReader, LoadDataSet.. you have to
> match yours to what you want it to do