Hi,
Currently I am developing ASP.Net 2.0 application using SQL Server 2005
I need to create a stored procedure that upadates 10 Tables with parameters around 500. I use Microsoft Data Application Block for DAL.
Database db = DatabaseFactory.CreateDatabase("Con");
DbCommand cmd = db.GetStoredProcCommand("spI_SiteDetails");
db.AddInParameter(cmd,"@SiteId",DbType.String,Prop erties.SiteId);
db.AddInParameter(cmd,"@Client",DbType.Int16,Prope rties.Client);
db.AddInParameter(cmd,"@Country",DbType.Int16,Prop erties.Country);
db.AddInParameter(cmd,"@Circle",DbType.Int16,Prope rties.Circle);
db.AddInParameter(cmd,"@Region",DbType.String,Prop erties.Region);
db.AddInParameter(cmd,"@SiteName",DbType.String,Pr operties.SiteName);
if (Properties.SiteType == "0")
{
db.AddInParameter(cmd, "@SiteType", DbType.String, null);
}
else
{
db.AddInParameter(cmd, "@SiteType", DbType.Int16, Convert.ToInt16(Properties.SiteType));
}
db.AddInParameter(cmd, "@SiteAddress", DbType.String, Properties.SiteAddress);
db.AddInParameter(cmd,"@TowerHeight",DbType.Int16, Properties.TowerHeight);
if (Properties.EquipType == "0")
{
db.AddInParameter(cmd, "@EquipType", DbType.String, null);
}
else
{
db.AddInParameter(cmd, "@EquipType", DbType.Int16, Convert.ToInt16(Properties.EquipType));
}
db.AddInParameter(cmd,"@Latitude1",DbType.Int16,Pr operties.Lat1);
db.AddInParameter(cmd,"@Latitude2",DbType.Int16,Pr operties.Lat2);
db.AddInParameter(cmd,"@Latitude3",DbType.Decimal, Properties.Lat3);
db.AddInParameter(cmd,"@Longitude1",DbType.Int16,P roperties.Long1);
db.AddInParameter(cmd,"@Longitude2",DbType.Int16,P roperties.Long2);
db.AddInParameter(cmd,"@Longitude3",DbType.Decimal ,Properties.Long3);
db.AddInParameter(cmd,"@IntimGivenPln",DbType.Date Time,Properties.IntimPln);
......
db.ExecuteNonQuery(cmd);
errormsg = db.GetParameterValue(cmd, "ErrorMsg").ToString();
Please help me to increase the perfomanace of this DAL.
Thanks,
Uma Ramiya