15,891,657 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 Python 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 Madhugundi (Top 87 by date)
Madhugundi
3-Sep-13 4:35am
View
please refer the below link
http://www.jquery4u.com/tutorials/thumbnail-image-upload-ajaxphp/
Madhugundi
3-Apr-13 3:12am
View
then how to get monthId to insert query
insert into HX_MonthInventory(MonthId,ItemId,StartingQty,NewShipmentQty,CreatedBy,CreatedOn ) values(@MonthId,@ItemId,@startingQty,@NewQty,@UserName,GETDATE())
Madhugundi
3-Apr-13 3:11am
View
i need to capture monthId in local variable to insert record in tblMonthInventory
Madhugundi
3-Apr-13 3:09am
View
after @MonthId=
Madhugundi
3-Apr-13 3:09am
View
thank you consider my post please check the following code i am getting errors
if exists( select @MonthId= Id from HX_Month where MonthName=@monthNm)
begin
insert into HX_MonthInventory(MonthId,ItemId,StartingQty,NewShipmentQty,CreatedBy,CreatedOn ) values(@MonthId,@ItemId,@startingQty,@NewQty,@UserName,GETDATE())
end
else
begin
insert into HX_MonthInventory(MonthId,ItemId,StartingQty,NewShipmentQty,CreatedBy,CreatedOn ) values(@MonthId,@ItemId,@startingQty,@NewQty,@UserName,GETDATE())
end
Msg 102, Level 15, State 1, Procedure Usp_UpdateItemInventory, Line 24
Incorrect syntax near '='.
Msg 156, Level 15, State 1, Procedure Usp_UpdateItemInventory, Line 28
Incorrect syntax near the keyword 'else'.
Madhugundi
3-Apr-13 3:06am
View
after @MonthId=
Madhugundi
3-Apr-13 3:05am
View
thank you consider my post please check the following code i am getting errors
if exists( select @MonthId= Id from HX_Month where MonthName=@monthNm)
begin
insert into HX_MonthInventory(MonthId,ItemId,StartingQty,NewShipmentQty,CreatedBy,CreatedOn ) values(@MonthId,@ItemId,@startingQty,@NewQty,@UserName,GETDATE())
end
else
begin
insert into HX_MonthInventory(MonthId,ItemId,StartingQty,NewShipmentQty,CreatedBy,CreatedOn ) values(@MonthId,@ItemId,@startingQty,@NewQty,@UserName,GETDATE())
end
Msg 102, Level 15, State 1, Procedure Usp_UpdateItemInventory, Line 24
Incorrect syntax near '='.
Msg 156, Level 15, State 1, Procedure Usp_UpdateItemInventory, Line 28
Incorrect syntax near the keyword 'else'.
Madhugundi
3-Apr-13 1:29am
View
means what
Madhugundi
26-Mar-13 7:02am
View
how please give me some sample code
Madhugundi
20-Mar-13 2:42am
View
Thanks amit its working fine by using the below code:
<asp:TextBox id="tb6" rows="5" CausesValidation="false" ValidationGroup="SearchBox" AutoPostBack="true" runat="server" />
Keep it up..
Madhugundi
20-Mar-13 2:33am
View
i have only textbox there is no button when i enter text on textbox it give the result for this i written code in textchanged event of textbox and also i set CausesValidation="false" property to textbox also child page validations are gets perform validation
Madhugundi
20-Mar-13 2:11am
View
Hi thanks to consider my post please read my post once again i have no validation on my master page i have only validations in my child page with validation group my problem is when i search from master page child page validations are gets executed so i want to stop validation on child page when i search in master page..
Madhugundi
20-Mar-13 2:09am
View
Hi Amit thanks to consider my post please read my post once again i have no validation on my master page i have only validations in my child page with validation group my problem is when i search from master page child page validations are gets executed so i want to stop validation on child page when i search in master page..
Madhugundi
20-Mar-13 2:06am
View
i done like but eventhough child page validations are performing
Madhugundi
15-Mar-13 5:23am
View
this is not suitable for my post i checked this code only one dropdownlist selected value only selected on editmode another one is not selected please look at code
Madhugundi
15-Mar-13 5:12am
View
<edititemtemplate>
<asp:Label ID="lblcomponentNameDrop" runat="server" Text='<%# Bind("ComponentName")%>' Visible = "false">
<asp:DropDownList ID="ddlEditComponentName" runat="server" DataTextField="ComponentName" Width="40%" DataValueField="ComponentId" >
<asp:RequiredFieldValidator ID="rfvEditComponenttName" runat="server" ErrorMessage="Please Select Component Name"
ControlToValidate="ddlEditComponentName" ValidationGroup="updateValidation">
Madhugundi
15-Mar-13 5:02am
View
thanks to consider my post please look at my post i am searching for multiple dropdownlists on gridview with editable
Madhugundi
15-Mar-13 4:59am
View
i am getting the value of label i.e (e.Row.FindControl("lblComponentNameDrop") as Label).Text but ddlcomponent is not able to find the label text where i am doing mistake please look at
Madhugundi
15-Mar-13 4:51am
View
if u find any link that contains multiple dropdownlist in gridview with editable please give me that link
Madhugundi
15-Mar-13 4:49am
View
i am also doing same in my code please look at
Madhugundi
15-Mar-13 4:48am
View
i am getting error on ddlcomponent dropdown like
Object reference not set to an instance of an object.
Madhugundi
15-Mar-13 4:45am
View
this is my code please look at
if (projectName != null)
{
projectName.DataTextField = MasterData.HXMasterData.HXProject.ProjectNameColumn.ColumnName;
projectName.DataValueField = MasterData.HXMasterData.HXProject.ProjectIdColumn.ColumnName;
projectName.DataSource = MasterData.HXMasterData.HXProject;
projectName.DataBind();
projectName.Items.FindByText((e.Row.FindControl("lblProjectNameDrop") as Label).Text).Selected = true;
}
DropDownList ddlcomponent = (DropDownList)e.Row.FindControl("ddlEditComponentName");
if (ddlcomponent != null)
{
ddlcomponent.Items.FindByText((e.Row.FindControl("lblComponentNameDrop") as Label).Text).Selected = true;
}
Madhugundi
15-Mar-13 4:43am
View
database
Madhugundi
15-Mar-13 4:42am
View
please give sample code i tried hard but not getting
Madhugundi
15-Mar-13 4:37am
View
its working fine for one dropdown list but i need this to multiple dropdowns
Madhugundi
5-Mar-13 23:50pm
View
let me know the status
Madhugundi
5-Mar-13 1:20am
View
ya exactly i typed wrong urls but i dont know how to access pages from one website to another website page from database please consider my reply....
Madhugundi
31-Jan-13 5:26am
View
Thanks
Madhugundi
31-Jan-13 2:17am
View
Thanks to consider my comment and i need it as every month if January is no issues then it should give 0 like for each month.
Thanks
Madhugundi
30-Jan-13 23:05pm
View
Thanks for reply i want to one more requirement here is that result set should be month report that i want to show in a Bar Chart;
Month OpenIssues closed
Jan 12 10
Feb 30 25
Madhugundi
28-Nov-12 3:27am
View
gridview should be converted into div and table into browser but in my webpage this is not done
Madhugundi
22-Nov-12 1:40am
View
still not getting the exact solution please give some more samples
Madhugundi
21-Nov-12 5:43am
View
thanks
Madhugundi
16-Nov-12 0:57am
View
thanks
Madhugundi
16-Nov-12 0:35am
View
Thanks how to change color of placeholder text
Madhugundi
18-Sep-12 3:47am
View
Thank you i got solution from ur code.
Madhugundi
17-Sep-12 2:37am
View
is there any free PDF componet for .net?
Madhugundi
27-Aug-12 1:38am
View
i am not able to get u please view my query this should return monthwise data where i have done mistake please find out.
SELECT
DATEPART(MONTH, convert(DATETIME,CreatedDateTime,13)) AS [Month of Year]
, Id AS [TotalShipOrders]
FROM ShipmentDetail
WHERE CONVERT(VARCHAR(7),CreatedDateTime,111)= convert(varchar(7),@CurrentDate,111)
UNION ALL
SELECT Month, NULL
FROM @Months
Madhugundi
22-Aug-12 7:14am
View
Thanks consider my post.
Madhugundi
22-Aug-12 7:14am
View
Thanks consider my post.
Madhugundi
22-Aug-12 0:06am
View
Thank you for consider my post.
Madhugundi
15-Aug-12 6:34am
View
yes i got the solution with some modification,that is as follows:
int Count = 0;
while (dr.Read())
{
Count = Count + dr.GetInt32(1);
}
dayChart.Titles.Add("Shipped Orders Per Day " +Count);
but i am not able to use dr object to next statement i.e the code as follows:
int Count = 0;
while (dr.Read())
{
Count = Count + dr.GetInt32(1);
}
dayChart.Titles.Add("Shipped Orders Per Day " +Count);
// here datareader vlues are not assigning why dr is gets closed?
dayChart.Series["DaySeries"].Points.DataBind(dr, "Hour Of Day", "Total", "Tooltip=Hour Of Day, Label=Total");
Madhugundi
15-Aug-12 6:08am
View
Thank you consider my post i tried with your code but i am not getting. it is giving an error like System.IndexOutOfRangeException: TotalCount
Madhugundi
9-Aug-12 5:22am
View
i tried it but not it retuns zero count for every hour
Madhugundi
9-Aug-12 4:05am
View
ya its working but instead of static date i want pass date as a variable like
Declare @CurrentDate varchar;
Set @CurrentDate=(select REPLACE('2012-07-26','-','/'));
in where condition how to concatinate % to C.
I am trying in where clause like '@CurrentDate%' i know it will be wrong.
so please help me i am new for sqlserver.
Madhugundi
9-Aug-12 3:37am
View
Thank You.
Madhugundi
9-Aug-12 3:14am
View
Based on 2012-07-25 this date i want get records from CreatedDateTime is like 2012-07-25 15:54:32.843 i am grouping by hour
Madhugundi
9-Aug-12 3:13am
View
Declare @Hours Table (Hour int);
Declare @i as int;
Set @i = 5
While @i < 24
Begin
Insert into @Hours
Values(@i);
Set @i = @i + 1;
End;
Select
[Hour of Day],
Count([TotalShipOrders]) as Total
From
(
SELECT
DATEPART(HOUR, convert(Datetime,CreatedDateTime,13)) AS [Hour of Day]
, Id AS [TotalShipOrders]
FROM ShipmentDetail where CONVERT(VARCHAR(10),CreatedDateTime,111) LIKE +2012-07-25 + '%'
Union ALL
SELECT Hour, NULL
From @Hours
) as Data
GROUP BY [Hour of Day]
ORDER BY [Hour of Day]
i want the where condition is like
where CONVERT(VARCHAR(10),CreatedDateTime,111) LIKE '2012-07-25 %'
2012-07-25 it is passed by user from Application.
CreatedDateTime is like 2012-07-25 15:54:32.843
Plese help how to place single quotes.
Madhugundi
9-Aug-12 3:12am
View
sorry i cant send script
Madhugundi
9-Aug-12 3:02am
View
i tried like ur post but i am getting Zero count for every hour
Madhugundi
9-Aug-12 3:02am
View
i tried like ur post but i am getting Zero count for every hour
Madhugundi
9-Aug-12 3:01am
View
it returns zero rows for every hour
ok in your post what is ordertm i have not any column like.
Madhugundi
9-Aug-12 2:23am
View
sorry i am new for this database someone as worked on shipdate instead of CreatedDateTime. So I didn't see that column.
Lastly i got solution by using one of proffessional post but i am not able write where condition on that post please check this:
Declare @Hours Table (Hour int);
Declare @i as int;
Set @i = 5
While @i < 24
Begin
Insert into @Hours
Values(@i);
Set @i = @i + 1;
End;
Select
[Hour of Day],
Count([TotalShipOrders]) as Total
From
(
SELECT
DATEPART(HOUR, convert(Datetime,CreatedDateTime,13)) AS [Hour of Day]
, Id AS [TotalShipOrders]
FROM ShipmentDetail where CONVERT(VARCHAR(10),CreatedDateTime,111) LIKE +2012-07-25 + '%'
Union ALL
SELECT Hour, NULL
From @Hours
) as Data
GROUP BY [Hour of Day]
ORDER BY [Hour of Day]
i want the where condition is like
where CONVERT(VARCHAR(10),CreatedDateTime,111) LIKE '2012-07-25 %'
2012-07-25 it is passed by user from Application.
CreatedDateTime is like 2012-07-25 15:54:32.843
Plese help how to place single quotes.
Madhugundi
9-Aug-12 1:54am
View
Hi i got the solution but i am not able get on a perticular date i.e
query like:
where CONVERT(VARCHAR(10),CreatedDateTime,111) LIKE ''' +2012-07-25 + '%''
plese check my where condition did i place single quptes are correct i am getting error is
The data types varchar and varchar are incompatible in the modulo operator.
Why i written like is i want to check on a perticular date from user on CreatedDateTime contains 2012-07-25.
I think is little bit configue to you but try to understand my problem and please place the single quotes in correct,
Thanking you.
Madhugundi
8-Aug-12 7:20am
View
yes i have data like:
2012-07-25 08:22:48.643(PST)
How is it possible just modify my code.
Madhugundi
8-Aug-12 6:06am
View
How to parse varchar to datetime in sql
Madhugundi
8-Aug-12 6:03am
View
while executing
select convert(datetime, (substring(ShipDate,1,5)+ substring(ShipDate,6,2) + substring(ShipDate,8,3) + substring(ShipDate,11,9)),105) as shipdate from ShipmentDetail this i am getting an error is like:
The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.
Madhugundi
8-Aug-12 5:35am
View
if i use substring it am getting result but i am getting problem where 0,1,2,3,4,5,6,7,8,9 because i am extracting hours like,01,02,03,04,05,06,07,08,09
Madhugundi
8-Aug-12 5:32am
View
Hi,
Is it possible by using DatePart() method to get hours from datetime where date is in nvarchar.
I am trying to get that but getting an error like:
Msg 241, Level 16, State 1, Line 14
Conversion failed when converting date and/or time from character string.
the sample query is:
Declare @Hours Table (Hour int);
Declare @i as int;
Set @i = 0
While @i < 24
Begin
Insert into @Hours
Values(@i);
Set @i = @i + 1;
End;
Select
[Hour of Day],
Count([Total Calls]) as total
From
(
SELECT
DATEPART(HOUR, convert(Datetime,ShipDate,13)) AS [Hour of Day]
, Id AS [Total Calls]
FROM ShipmentDetail
Union ALL
SELECT Hour, NULL
From @Hours
) as Data
GROUP BY [Hour of Day]
ORDER BY [Hour of Day]
please modify the query.
Thanks&Regards,
Raghu.
Madhugundi
8-Aug-12 5:32am
View
No
Madhugundi
8-Aug-12 5:23am
View
Thank you
Madhugundi
8-Aug-12 4:23am
View
Plese help me how to replace '2012-07-25 15:54:32' to
'2012-25-07 15:54:32' using substring ?
Thanks for you spent your valuable time.
Madhugundi
8-Aug-12 4:01am
View
without changing the shipdate type nvarchar to datetime is not possible?
Madhugundi
8-Aug-12 3:51am
View
ShipDate Column Value is like: 2012-07-25 15:54:32 PDT
Madhugundi
8-Aug-12 3:45am
View
HI,
If u don't mind give me more clarity on this
in my table shipdate is in nvarchar type does here datepart() will work if it is how to convert nvarchart to date to get hour and also your query will written for each hour or only the orders existing hours.i am trying to get orders for every hour if orders are not there on a paticular hour it will return 0 on result.
please help me,
Thanks&Regards,
Raghu.
Madhugundi
8-Aug-12 2:55am
View
hi,
i executed my query based on your query but i am getting zero rows.
my query look like is
DECLARE @Sql NVARCHAR(300);
SET @Sql ='select case when cast(SUBSTRING(ShipDate,11, 3)as varchar)>12 then cast(SUBSTRING(ShipDate,11, 3)as varchar)-12 else cast(SUBSTRING(ShipDate,11, 3)as varchar) end as hours,
count(Id) as Total_orders from ShipmentDetail where (ShipDate)=''2012-07-26''group by cast(SUBSTRING(ShipDate,11, 3)as varchar)' ;
EXEC(@Sql);
print @Sql;
Madhugundi
8-Aug-12 1:13am
View
Thanks
Madhugundi
8-Aug-12 1:13am
View
Thanks
Madhugundi
8-Aug-12 1:11am
View
Thanks
Madhugundi
14-Jun-12 23:48pm
View
Thanks
Madhugundi
14-Jun-12 5:49am
View
Thanks
Madhugundi
31-Mar-12 5:08am
View
give me one example
Madhugundi
29-Mar-12 8:11am
View
plz give me one example
Madhugundi
14-Mar-12 6:08am
View
thanks
Madhugundi
14-Mar-12 6:07am
View
Thanks
Madhugundi
5-Mar-12 16:46pm
View
Thank you
Madhugundi
5-Mar-12 16:46pm
View
Thank you
Madhugundi
5-Mar-12 14:00pm
View
Thank u and give me code for how check whether the row deleted or not please
Madhugundi
3-Mar-12 6:31am
View
Thank you
Madhugundi
1-Mar-12 4:54am
View
Thank you
Madhugundi
1-Mar-12 4:54am
View
Thank you
Madhugundi
22-Feb-12 4:07am
View
Thanx
Madhugundi
21-Feb-12 6:08am
View
Thank you very much
Madhugundi
17-Feb-12 6:55am
View
Thank you very much
Madhugundi
14-Feb-12 7:15am
View
i am very sorry for incomplete question, thank you for your effort for my doutt but you given the solution for cross page submission i need postback submmission i.e in my webpage i have four textboxes, one gridview and one button(name=save) when i click the save button 1)textboxes data should be save into database abd also display into the gridview.
2) when i click any row into the gridview the row data should be bind to textboxes with in the page. please help me
Madhugundi
18-Nov-11 10:51am
View
Thnq
Madhugundi
18-Nov-11 10:44am
View
table name = Products
useid =101
start date = 10/11/2011
End date = 15/11/2011
i want retrieve data between these two dates
Show More