Click here to Skip to main content
15,893,622 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionASP --> Access --> Excel & MsSQL(ODBC) Pin
p0o0q26-May-09 20:58
p0o0q26-May-09 20:58 
AnswerRe: ASP --> Access --> Excel & MsSQL(ODBC) Pin
adatapost26-May-09 21:13
adatapost26-May-09 21:13 
Questionfile download problem Pin
rajkumar.326-May-09 20:38
rajkumar.326-May-09 20:38 
AnswerRe: file download problem Pin
adatapost26-May-09 21:06
adatapost26-May-09 21:06 
QuestionExtract Data from Resume Word file Pin
Member 356741126-May-09 19:49
Member 356741126-May-09 19:49 
AnswerRe: Extract Data from Resume Word file Pin
padmanabhan N26-May-09 20:31
padmanabhan N26-May-09 20:31 
AnswerRe: Extract Data from Resume Word file Pin
adatapost26-May-09 21:19
adatapost26-May-09 21:19 
QuestionSqlParameter and Generic array list Pin
rahul.net1126-May-09 19:41
rahul.net1126-May-09 19:41 
Hi all,

For adding the data in database i m using SqlParameter array collection.
In this method i am declering hardcoded array decleration of sqlparameter.
Follwing the the example.

public int Checkadmin(string usernm, string pwd)
{


SqlParameter[] sqlParam = new SqlParameter[2];
SqlDataReader dr;
int count = 0;

sqlParam[0] = new SqlParameter("@Username", SqlDbType.VarChar);
sqlParam[0].Value = usernm;
sqlParam[0].Size = 50;

sqlParam[1] = new SqlParameter("@Password", SqlDbType.VarChar);
sqlParam[1].Value = pwd;
sqlParam[1].Size = 50;

initializeDBConnection();
try
{
dr = execSelectByKeyParams("select.admin_login", sqlParam);
while (dr.Read())
{
count = Convert.ToInt32(dr.GetValue(0));
}
}
catch (SqlException sqlEx)
{
string str;
str = sqlEx.Message + sqlEx.StackTrace;
}
catch (Exception ex)
{
string str;
str = ex.Message + ex.StackTrace;
}
dispose();
return count;
}

Now i want to replace the SqlParameter array by generic arraylist.I dont want
to user hardcoded array decleration. I have created sqlparameter generic arraylist
as follow.

List<SqlParameter[]> sqlParam=new List<SqlParameter[]>();

But can anybody guide me how can i proceed further.

Thanks

People Laugh on me Because i am Different but i Laugh on them
Because they all are same.

AnswerRe: SqlParameter and Generic array list Pin
Manas Bhardwaj26-May-09 20:53
professionalManas Bhardwaj26-May-09 20:53 
QuestionTool to assess asp.net 1.1 code changes due to database changes Pin
sthambir26-May-09 19:40
sthambir26-May-09 19:40 
QuestionRequest.QueryString problem.. Pin
RajpootRohan26-May-09 19:10
professionalRajpootRohan26-May-09 19:10 
AnswerRe: Request.QueryString problem.. Pin
padmanabhan N26-May-09 19:37
padmanabhan N26-May-09 19:37 
GeneralRe: Request.QueryString problem.. Pin
Baran M26-May-09 19:55
Baran M26-May-09 19:55 
QuestionGrid View Pin
rmaya26-May-09 18:40
rmaya26-May-09 18:40 
AnswerRe: Grid View Pin
Baran M26-May-09 20:00
Baran M26-May-09 20:00 
GeneralRe: Grid View Pin
rmaya26-May-09 20:12
rmaya26-May-09 20:12 
GeneralRe: Grid View Pin
Baran M26-May-09 20:34
Baran M26-May-09 20:34 
Questionsetting same Fonts for single line and multi line textbox Pin
sandhya1426-May-09 18:28
sandhya1426-May-09 18:28 
AnswerRe: setting same Fonts for single line and multi line textbox Pin
padmanabhan N26-May-09 19:27
padmanabhan N26-May-09 19:27 
GeneralRe: setting same Fonts for single line and multi line textbox Pin
sandhya1426-May-09 19:34
sandhya1426-May-09 19:34 
Questionpaly Flash Video Pin
jason_mf26-May-09 18:15
jason_mf26-May-09 18:15 
AnswerRe: paly Flash Video Pin
padmanabhan N26-May-09 18:42
padmanabhan N26-May-09 18:42 
GeneralRe: paly Flash Video Pin
jason_mf26-May-09 19:29
jason_mf26-May-09 19:29 
GeneralRe: paly Flash Video Pin
padmanabhan N26-May-09 19:41
padmanabhan N26-May-09 19:41 
GeneralRe: paly Flash Video Pin
Jain Vijay27-May-09 0:15
Jain Vijay27-May-09 0:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.