Click here to Skip to main content
15,902,112 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: dynamically adding rows in gridview Pin
whatUrunning.com5-Nov-08 1:31
whatUrunning.com5-Nov-08 1:31 
GeneralRe: dynamically adding rows in gridview Pin
Mogaambo5-Nov-08 5:35
Mogaambo5-Nov-08 5:35 
QuestionJavascript String Matching problem! Pin
mr_muskurahat5-Nov-08 1:18
mr_muskurahat5-Nov-08 1:18 
AnswerRe: Javascript String Matching problem! Pin
N a v a n e e t h5-Nov-08 1:27
N a v a n e e t h5-Nov-08 1:27 
GeneralRe: Javascript String Matching problem! Pin
mr_muskurahat5-Nov-08 2:04
mr_muskurahat5-Nov-08 2:04 
QuestionDraggable Sorting in HTML Select Pin
Tiger4565-Nov-08 1:09
Tiger4565-Nov-08 1:09 
AnswerRe: Draggable Sorting in HTML Select Pin
whatUrunning.com5-Nov-08 1:36
whatUrunning.com5-Nov-08 1:36 
QuestionData type mismatch error in asp.net using ms access Pin
sanjay305-Nov-08 0:42
sanjay305-Nov-08 0:42 
plese any one help me ,

i doing work on asp.net ,ms access database but when doing programing for wieght and price wise dearch data then it gave error .data type mismatch ,

how it solve my code is

if (chkWeight.Checked == true)
{
if (strMetal != "" && strType != "" && FromWieght != 0 && ToWieght == 0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght >='" + FromWieght + "' and MetalID IN (select MetalID from MetalMaster where Name='" + strMetal + "') and TypeID IN (select TypeID from Type where Name='" + strType + "')", myAccessConnection);
}
else if (strMetal != "" && strType != "" && FromWieght == 0 && ToWieght != 0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght <='" + ToWieght + "' and MetalID IN (select MetalID from MetalMaster where Name='" + strMetal + "') and TypeID IN (select TypeID from Type where Name='" + strType + "')", myAccessConnection);
}
else if (strMetal != "" && strType == "" && FromWieght != 0 && ToWieght != 0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght beween '" + FromWieght + "' and '" + ToWieght + "' and MetalID IN (select MetalID from MetalMaster where Name='" + strMetal + "')", myAccessConnection);
}
else if (strMetal == "" && strType != "" && FromWieght != 0 && ToWieght != 0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght beween '" + FromWieght + "' and '" + ToWieght + "' and TypeID IN (select TypeID from Type where Name='" + strType + "')", myAccessConnection);
}
else if (strMetal!="" && strType!="" && FromWieght!=0 && ToWieght!=0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght beween '" + FromWieght + "' and '" + ToWieght + "' and TypeID IN (select TypeID from Type where Name='" + strType + "') and MetalID IN (select MetalID from MetalMaster where Name='" + strMetal + "')", myAccessConnection);
}
else if (FromWieght == 0 && ToWieght != 0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght <='" + ToWieght + "' ", myAccessConnection);
}
else if (FromWieght != 0 && ToWieght == 0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght >= '" + FromWieght + "'", myAccessConnection);
}
else if (FromWieght != 0 && ToWieght != 0)
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and Wieght between '" + FromWieght + "' and '" + ToWieght + "'", myAccessConnection);
//// cmd1.Parameters = CommandType.Text;
// OleDbParameter From_Wieght = new OleDbParameter("@FromWieght", OleDbType.Numeric);
// From_Wieght.Value = FromWieght;
// cmd1.Parameters.Add(From_Wieght);

// OleDbParameter To_Wight = new OleDbParameter("@ToWight", OleDbType.Numeric);
// To_Wight.Value =ToWieght ;
// cmd1.Parameters.Add(To_Wight);
}
}
else if (strMetal != "Select Item" && strType != "Select Item")
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and TypeID IN (select TypeID from Type where Name='" + strType + "') and MetalID IN (select MetalID from MetalMaster where Name='" + strMetal + "')", myAccessConnection);
}

else if (strMetal == "Select Item" && strType != "Select Item")
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and TypeID IN (select TypeID from Type where Name='" + strType + "')", myAccessConnection);
}
else if (strMetal != "Select Item" && strType == "Select Item")
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID and MetalID IN (select MetalID from MetalMaster where Name='" + strMetal + "')", myAccessConnection);
}
else
{
cmd1 = new OleDbCommand("select * from DtlItem where CategoryID=@CategoryID", myAccessConnection);
//OleDbParameter From_Wieght = new OleDbParameter("@FromWieght", OleDbType.Integer);
//From_Wieght.Value = 312434;
//cmd1.Parameters.Add(From_Wieght);
}
int CatID = Convert.ToInt16(ViewState["CatID"]);
// cmd1.Parameters = CommandType.Text;
OleDbParameter Cat_ID = new OleDbParameter("@CategoryID", OleDbType.Integer);
Cat_ID.Value = CatID;
cmd1.Parameters.Add(Cat_ID);
OleDbDataAdapter adp = new OleDbDataAdapter(cmd1);

DataSet ds = new DataSet();
myAccessConnection.Open();
Questionwhere is the problem of my code? Pin
strawberrysh5-Nov-08 0:41
strawberrysh5-Nov-08 0:41 
AnswerRe: where is the problem of my code? Pin
Sandeep Akhare5-Nov-08 19:23
Sandeep Akhare5-Nov-08 19:23 
Questionhow to retrive image from database Pin
raghvendrapanda5-Nov-08 0:30
raghvendrapanda5-Nov-08 0:30 
AnswerRe: how to retrive image from database Pin
eyeseetee5-Nov-08 1:24
eyeseetee5-Nov-08 1:24 
Questionsample project Pin
santhoshasokan5-Nov-08 0:20
santhoshasokan5-Nov-08 0:20 
GeneralRe: sample project PinPopular
cyber-drugs5-Nov-08 0:36
cyber-drugs5-Nov-08 0:36 
AnswerRe: sample project Pin
Ashfield5-Nov-08 1:53
Ashfield5-Nov-08 1:53 
Questionusing web user control in asp.net 2.0 Pin
vijaylumar5-Nov-08 0:06
vijaylumar5-Nov-08 0:06 
AnswerRe: using web user control in asp.net 2.0 Pin
Parwej Ahamad5-Nov-08 0:26
professionalParwej Ahamad5-Nov-08 0:26 
Questiondoes show update and cancel on a first click Pin
Mamphekgo Bahula5-Nov-08 0:01
Mamphekgo Bahula5-Nov-08 0:01 
QuestionProblem with order by in aspx page Pin
eyeseetee4-Nov-08 23:03
eyeseetee4-Nov-08 23:03 
AnswerRe: Problem with order by in aspx page Pin
Abhishek Sur4-Nov-08 23:09
professionalAbhishek Sur4-Nov-08 23:09 
GeneralRe: Problem with order by in aspx page Pin
eyeseetee4-Nov-08 23:11
eyeseetee4-Nov-08 23:11 
GeneralRe: Problem with order by in aspx page Pin
Abhishek Sur5-Nov-08 20:31
professionalAbhishek Sur5-Nov-08 20:31 
AnswerRe: Problem with order by in aspx page Pin
balaji.t5-Nov-08 0:36
balaji.t5-Nov-08 0:36 
QuestionHiding URL in IE 7.0 Pin
balaji.t4-Nov-08 23:02
balaji.t4-Nov-08 23:02 
AnswerRe: Hiding URL in IE 7.0 Pin
NeverHeardOfMe4-Nov-08 23:39
NeverHeardOfMe4-Nov-08 23:39 

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.