16,012,468 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Harshit Wadhera (Top 65 by date)
Harshit Wadhera
18-Apr-15 17:06pm
View
dude 1 thing i will tell you You will not understand how complicated it is...
i had already applied having group by and count... just understand the question then answer......
Harshit Wadhera
18-Apr-15 16:55pm
View
i had done this.. but its giving me wrong ans
Harshit Wadhera
18-Apr-15 16:54pm
View
select m.customer_id,customer_name,
cast(concat('+91-',substring(contact_no,1,3),'-',substring(contact_no,4,3),'-',
substring(contact_no,7) ) as char)as contact_no,
count(i.movie_id) as no_of_movies,movie_category
from customer_master m
join customer_issue_details i
on m.customer_id = i.customer_id
join movies_master mv
on i.movie_id = mv.movie_id
group by m.customer_id
having count(m.customer_id) >1;
Harshit Wadhera
16-Apr-15 8:35am
View
can you tell me query for mysql
Harshit Wadhera
16-Apr-15 8:02am
View
it's giving me error
Harshit Wadhera
16-Apr-15 7:56am
View
it's giving me error
Harshit Wadhera
16-Apr-15 7:54am
View
This my query
<pre lang="sql">select u.name,Count(distinct ex.company_name)
from user u
inner join role r on (r.id = u.role_id)
inner join experience ex on (ex.profile_id = u.profile_id)
where r.name ='Alumni'
group by u.name
--having Count(distinct ex.company_name) in (select max(ex.company_name) from experience ex where ex.profile_id = u.profile_id)
order by u.name,max(ex.company_name)</pre>
Harshit Wadhera
16-Apr-15 7:53am
View
i am getting this error
Check the manual that corresponds to your MySQL server version for the right syntax
Harshit Wadhera
16-Apr-15 7:49am
View
i know to count the distinct name but how find max that i don"t know.
Harshit Wadhera
16-Apr-15 7:48am
View
yupp but that i will know that r.name='Alumni'
Harshit Wadhera
10-Apr-15 6:41am
View
I am getting error
check the manual that corresponds to your MySQL server version for the right syntax to use near '[date] as time) between '01:00:00' AND '05:00:00'' at line 1
Harshit Wadhera
10-Apr-15 6:10am
View
only 2 data should be fetch 1 and 3
Harshit Wadhera
10-Apr-15 6:10am
View
i had entered the data
Harshit Wadhera
10-Apr-15 6:03am
View
i will explain you there is only 1 table in which there are 5 rows and i only had to fetch the data from that table. It only consists 3 rows which are between that time.
The problem is that date can be any date.
Harshit Wadhera
26-Jan-15 20:12pm
View
yeah i have written like
string date1 = Request.Form[txtdate1.UniqueID];
string.Format("dd/MM/yyyy", date1);
but
it is giving me error that "Conversion failed when converting date and/or time from character string."
may you help me
thanx in advance
Harshit Wadhera
26-Jan-15 20:11pm
View
i had just write the where clause at wrong place and now its working but i have another problem that is
i had write
string date1 = Request.Form[txtdate1.UniqueID];
string.Format("dd/MM/yyyy", date1);
and it is giving me error that "Conversion failed when converting date and/or time from character string."
may you help me
Harshit Wadhera
25-Jan-15 19:44pm
View
yeah i have use that but it giving me an error "Incorrect syntax near h' is too long. Maximum length is 128."
Harshit Wadhera
25-Jan-15 19:23pm
View
yeah thanx
Harshit Wadhera
25-Jan-15 13:38pm
View
I have to display 4 data Column on 4 label.
Harshit Wadhera
16-Oct-14 14:27pm
View
Great!!! dude i had done it is simple....
thanx sir
Harshit Wadhera
16-Oct-14 8:41am
View
private HtmlGenericControl LIList(string innerHtml, string rel, string url)
{
HtmlGenericControl li = new HtmlGenericControl("li");
li.Attributes.Add("rel", rel);
li.InnerHtml = "
" + innerHtml + "
";
return li;
}
i had write the whole code of inner html that was define in link that you provide..
thanx
Harshit Wadhera
16-Oct-14 8:32am
View
the error shows [Firefox can't find the server at ~.]...
error is in this line could you find anything
i am writing the code below because the comment is unable to write properly.
Harshit Wadhera
16-Oct-14 5:51am
View
Hi Sir
ok i will explain you with more details..
i have a site in my d folder (D:\site\test) and there is 2 pages in my website first is default.aspx(D:\site\test\Default.aspx) and second is Result.aspx (D:\site\test\Result.aspx)...
and i just have to save the result.aspx url in the database so that if i click then it redirect me to Result.aspx....
i had tried this...
1. test/Result.aspx
2. ~/test/Result.aspx
3. d/site/test/result.aspx
if you have more question please ask
Harshit Wadhera
15-Oct-14 18:33pm
View
hi i have question
i have to store the link of a page in database. The page is in my website.
like an example
i have to store the link of Result.aspx page in database so how could i do this. i know that google.com can easily be store and its working with google.com but i want to know how to do this with result.aspx..
Harshit Wadhera
14-Oct-14 11:39am
View
i have to create it dynamically. which i don't know how to do.
i had create it statically
Harshit Wadhera
22-Apr-14 20:01pm
View
thank you sir. Its pleasure to talk to you.
I will not forget your help.....
Sir i am beginner in C# now i able to see what i am doing wrong..
Harshit Wadhera
22-Apr-14 19:47pm
View
Sir may you tell me how i am executing the query of SELLER_DETAILS twice
Harshit Wadhera
22-Apr-14 19:29pm
View
yes i am executing the query twice because there are two tables in which i have to insert the data.
Harshit Wadhera
22-Apr-14 19:13pm
View
sir i have update the code.. when i insert values in second table (SELLER_DETAILS)it adds the same data twice.
Harshit Wadhera
22-Apr-14 19:12pm
View
Deleted
sir i have update the code..
when i insert values in second table (SELLER_DETAILS)it adds the same data twice.
Harshit Wadhera
22-Apr-14 19:10pm
View
i have tried this but still not working.
Harshit Wadhera
16-Sep-13 12:57pm
View
thanku sir i got the Solution thank you very much
Harshit Wadhera
16-Sep-13 12:43pm
View
sir i got the answer i.e iCatID.ToString() and iSubCatID.ToString() are written in wrong place in cmd
so i have changed one error occur when i just http://localhost:50476/SamsungClassifieds/Results.aspx
error - Object reference not set to an instance of an object.
not
http://localhost:50476/SamsungClassifieds/Results.aspx?Cat_Id=4&Sub_Cat_Id=1
and working properly...
Harshit Wadhera
16-Sep-13 12:26pm
View
sir did you got any answer??
Harshit Wadhera
16-Sep-13 11:35am
View
Sir your answer is working but for some result. i.e when i directly run the page in browser than it will show me a error i.e. Object reference not set to an instance of an object.
Harshit Wadhera
16-Sep-13 11:22am
View
sir the error is
The name 'iCatID' does not exist in the current context
The name iSubCatID does not exist in the current context
Harshit Wadhera
16-Sep-13 11:14am
View
//int j = Convert.ToInt32(Request.QueryString["Cat_Id"]);
//int i = Convert.ToInt32(Request.QueryString["Sub_Cat_Id"]);
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\site\SamsungClassifieds\App_Data\Dorknozzle.mdf;Integrated Security=True;User Instance=True");
con.Open();
if((int.TryParse(i.ToString(), out iCatID)&&(int.TryParse(j.ToString(), out iSubCatID))
{
//Do your DB retrieval here .....
SqlDataAdapter cmd = new SqlDataAdapter("SELECT AD_ID,AD_TITLE, AD_DESC, AD_IMG, AD_PRICE, AD_NO, SUB_CAT_DESC, CAT_DESC, SELLER_NAME, SELLER_MOB_NO, SELLER_EMAIL_ID, SELLER_DEP, SELLER_FLOOR,DATE FROM AD_DETAIL_V WHERE (DATE >= { fn CURDATE() }) and BUY_SELL_ID='1' and DELETED_AD = '0' AND SUB_CAT_ID= " + iSubCatID.ToString() + "AND CAT_ID =" + iCatID.ToString(), con);
DataSet ds = new DataSet();
cmd.Fill(ds);
int count = ds.Tables[0].Rows.Count;
if (count == 0) Response.Redirect("HomePage.aspx");
gvImages.DataSource = ds; gvImages.DataBind();
}
else
{ //Handle the parameter type error (i.e. - display a message or redirect user)
Response.Redirect("HomePage.aspx");
}
}
sir its giving me an error on i,iCatID,j,iSubCatID
same error i.e the name doesn't exists in context
Harshit Wadhera
16-Sep-13 11:06am
View
Is there any Solution Sir??
Harshit Wadhera
16-Sep-13 11:04am
View
ya but if there is any solution
??
Harshit Wadhera
16-Sep-13 10:59am
View
sir i want to ask you one more thing i.e when i write some alphabet in cat_id or Sub_cat_ID then it give me a error i.e "Input string was not in a correct format."
Harshit Wadhera
16-Sep-13 10:59am
View
sir i want to ask you one more thing i.e when i write some alphabet in cat_id or Sub_cat_ID then it give me a error i.e "Input string was not in a correct format."
Harshit Wadhera
16-Sep-13 10:53am
View
sir change your ans i will accept it as ANSWER
Harshit Wadhera
16-Sep-13 10:46am
View
sir i have found where we are wrong hypermellow is right..
Harshit Wadhera
16-Sep-13 10:45am
View
you are Right sir Thanx sir
Harshit Wadhera
16-Sep-13 10:44am
View
cmd.Fill(ds); int count = ds.Tables.Count; if (count == 0) Response.Redirect("HomePage.aspx"); gvImages.DataSource = ds; gvImages.DataBind(); } } Sir i have write the the code but it is not redirecting to HomePage. it remain on the result page.
Harshit Wadhera
16-Sep-13 10:40am
View
cmd.Fill(ds);
int count = ds.Tables.Count;
if (count == 0)
Response.Redirect("HomePage.aspx");
gvImages.DataSource = ds;
gvImages.DataBind();
}
}
Sir i have write the the code but it is not redirecting to HomePage.
it remain on the result page.
Harshit Wadhera
16-Sep-13 10:32am
View
yes sir you understood but its not working
Harshit Wadhera
16-Sep-13 10:31am
View
cmd.Fill(ds);
gvImages.DataSource = ds;
gvImages.DataBind();
int count = ds.Tables.Count;
if (count == 0)
{
Response.Redirect("HomePage.aspx");
}
}
}
Sir i have write this code but its not working
Harshit Wadhera
16-Sep-13 10:23am
View
sir this an example i want all that Category id and Sub Category ID to be redirect to home page if it is not exists..
Example - http://localhost:50476/SamsungClassifieds/Results.aspx?Cat_Id=4&Sub_Cat_Id=1
it will redirect to Result page - Because this cat and sub_cat id exists.
but http://localhost:50476/SamsungClassifieds/Results.aspx?Cat_Id=4&Sub_Cat_Id=1222 doesn't exists . therefore it will redirect to result page.
Harshit Wadhera
15-Sep-13 16:06pm
View
solution 2 is has an error i.e if I select the one the it show the respective data in 2 dropdown and a the same time if i select the 2 option from 1 dropdown then it show both the data that i select first time and 2 time.
Harshit Wadhera
15-Sep-13 16:04pm
View
solution 2 is has an error i.e if I select the one the it show the respective data in 2 dropdown and a the same time if i select the 2 option from 1 dropdown then it show both the data that i select first time and 2 time.
can you give me link from which i can go through to perform this problem.
Harshit Wadhera
15-Sep-13 14:50pm
View
how it can be done??
Harshit Wadhera
15-Sep-13 14:32pm
View
sir how to write this code can you please explain me i am new in jquery....
Harshit Wadhera
12-Aug-13 4:41am
View
thanx for the answer.....
Harshit Wadhera
9-Aug-13 6:52am
View
Thanx dude it works.....
Harshit Wadhera
9-Aug-13 6:51am
View
Deleted
Thanx dude it works.....
Harshit Wadhera
9-Aug-13 6:34am
View
the code display an error of " The best overloaded method match for 'string.ToString(System.IFormatProvider)' has some invalid arguments"
Harshit Wadhera
9-Aug-13 6:34am
View
Deleted
the code display an error of " The best overloaded method match for 'string.ToString(System.IFormatProvider)' has some invalid arguments"
Harshit Wadhera
9-Aug-13 4:07am
View
it's not right but thanx for reply.
Harshit Wadhera
9-Aug-13 4:06am
View
your ans is right but i have to save dd/MM/yyyy like this but it is showing like mm/dd/yyyy this
Harshit Wadhera
8-Aug-13 14:21pm
View
the problem is date is stored but it is always 01/01/1900. date is not change according to user selected date.
Harshit Wadhera
5-Aug-13 1:51am
View
how can i store an expiry date in my sql database.
please provide me the code.
Harshit Wadhera
5-Aug-13 1:21am
View
not delete but it should not display after 1 or 2 month
Harshit Wadhera
5-Aug-13 1:16am
View
i just want to save the date which should expire after 1 month or 2 month according to the user which post the data. And data should not display after expire.
Harshit Wadhera
5-Aug-13 0:35am
View
Deleted
above me C# code
and below is my page source
Show More