15,921,577 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 Tharaka MTR (Top 133 by date)
Tharaka MTR
28-Feb-14 0:52am
View
What is your system date format? you need to use the correct conversion depending on that.
Tharaka MTR
10-Dec-13 23:19pm
View
Any comments? :(
Tharaka MTR
2-Dec-13 9:41am
View
yes, I can. But I would like to check what you have done so far. Could you please update your code sample?
Tharaka MTR
1-Dec-13 21:39pm
View
Did you check the article how it works?
Tharaka MTR
30-Nov-13 11:32am
View
agreed with Mahesh, it is not clear enough
Tharaka MTR
23-Apr-13 8:46am
View
yes, you can have two primary keys. But can't have two identity columns
Tharaka MTR
11-Mar-13 5:21am
View
What is the error you got? Is it working on other browsers?
Tharaka MTR
7-Mar-13 7:25am
View
I have updated the answers with some links
Tharaka MTR
6-Mar-13 6:08am
View
if you can please provide the sample data script..
Tharaka MTR
6-Mar-13 6:06am
View
for the quick answer max(status):
you need to provide a aggregation function for the PIVOT query.. you can use MAX, MIN for this..
In your PIVOT query you want to use the STRING rows display as a column. so, the best aggregation function for this is MAX or MIN
Tharaka MTR
6-Mar-13 3:16am
View
I have updated my answer by modifying your query. please check.
Tharaka MTR
6-Mar-13 2:52am
View
What is your SQL express version? 2005? 2008? etc..
Tharaka MTR
5-Mar-13 12:38pm
View
have you tried anything?
Tharaka MTR
25-Feb-13 10:24am
View
please provide the complete code sample
Tharaka MTR
25-Feb-13 0:29am
View
yes, this is a one of easiest question. what did you try so far?
Tharaka MTR
24-Feb-13 12:08pm
View
what do you mean the injection code?
Tharaka MTR
23-Feb-13 21:31pm
View
your question is not clear? do you want to convert byte[] as string?
Tharaka MTR
23-Feb-13 9:44am
View
yes, please give us the error message
Tharaka MTR
23-Feb-13 9:42am
View
Can you please send us your html code?
Tharaka MTR
23-Feb-13 5:21am
View
I have updated my answer with all the needed resources. please check
Tharaka MTR
23-Feb-13 3:38am
View
this is wrong you can't use the server side variable with .html page.
Tharaka MTR
23-Feb-13 3:12am
View
to me also, this question doesn't make any sense.
Tharaka MTR
23-Feb-13 3:06am
View
could you please share the complete configuration file?
Tharaka MTR
20-Feb-13 12:22pm
View
with regarding your input 1,2,3,4,1,2
do you want to give the output once all the loop completed?
that's mean finally you want to give the alert saying "there are some duplicate value exists for 1 and 2?
Is that you want or please elaborate your question more
Tharaka MTR
18-Feb-13 9:05am
View
why you need "LIMIT 0,1" part?
Tharaka MTR
7-Feb-13 10:33am
View
please send me your code sample
Tharaka MTR
7-Feb-13 6:32am
View
Ok. plz let us know how do you resolve this
Tharaka MTR
7-Feb-13 5:04am
View
Sorry, I can't understand why is that as you said "In our database table one column is stored as an xml string".
Could you please let me know your table column details?
Tharaka MTR
7-Feb-13 4:06am
View
What do you mean can't specify the columns inside that?
you said you got the following XML
<documentelement>
<PartInfo>
<id>0
<name>
<PartNo>0</PartNo>
<serialno>1
<Parameter>0</Parameter>
<installeddate>2013-01-15T00:00:00+05:30
<installedtill>2013-01-25T00:00:00+05:30
</PartInfo>
what do you mean I can't specify the value directly in query?
is that you mean "WHERE [XmlDataColumn].value('(//parent::node()/InstalledDate)[1]', 'VARCHAR(MAX)') ='2013-01-15T00:00:00+05:30'" section?
Tharaka MTR
7-Feb-13 0:59am
View
I have update my answer, please check whether it is OK.
Tharaka MTR
31-Jan-13 0:26am
View
if it is solve, please mark as answer then.
Tharaka MTR
30-Jan-13 5:33am
View
was your problem fixed?
Tharaka MTR
29-Jan-13 8:12am
View
Yep, But As far as I know this is the best and easiest way. You have to use some other optimization mechanize to optimize this query. Some experts said that ISNULL is bit faster than COALESCE.
May be I'm wrong. :)
Tharaka MTR
28-Jan-13 11:57am
View
This is a repost
Tharaka MTR
28-Jan-13 8:15am
View
Your question is not clear. Please explain further
Tharaka MTR
28-Jan-13 1:46am
View
please send us code sample
Tharaka MTR
28-Jan-13 1:43am
View
please give us more details
Tharaka MTR
28-Jan-13 1:01am
View
Yes, provide the logic please
Tharaka MTR
26-Jan-13 12:49pm
View
Agreed. But my point is, I wrote the query for the inserted data and for the expected result set.
Tharaka MTR
26-Jan-13 12:24pm
View
Could you please bit explain me, what is the problem with my updated query? I think my output is exactly match to your output and fully compatible with SQL 2008.
Tharaka MTR
26-Jan-13 11:21am
View
ok. I have modified the query. Please check and let me know whether it is ok or not.
Tharaka MTR
26-Jan-13 10:56am
View
Agreed, I just realize that.
Tharaka MTR
26-Jan-13 8:33am
View
first validate the control count.
if (this.Controls.Find(string.Format("lbl{0}", i), false).Count()>0){
// then your code here
}
Tharaka MTR
24-Jan-13 22:01pm
View
Yes, please share your complete sql
Tharaka MTR
24-Jan-13 22:00pm
View
yes, please share the code
Tharaka MTR
24-Jan-13 12:43pm
View
I already replied your same request using SQL server, now you are asking that MS Access. what is your actual problem?
Tharaka MTR
24-Jan-13 3:05am
View
Is it? I tried this, it works fine for me. are you control in inside the master page or panel etc..
then it may generates the different ID for text fields.
Tharaka MTR
23-Jan-13 8:48am
View
ok. that is the best one I know. some one will reply to another solution.
Tharaka MTR
23-Jan-13 7:01am
View
your question is not clear for me. please give me more details
Tharaka MTR
23-Jan-13 6:56am
View
:) .. in each solution there is a button called "Mark As Answer". Please select the correct solution and click that button. then it will marked as answer.
Tharaka MTR
23-Jan-13 5:37am
View
here are some useful links
http://www.csharp-station.com/tutorial.aspx
http://www.c-sharpcorner.com/UploadFile/anandnarayanswamy/CSTutorial1AN11282005015140AM/CSTutorial1AN.aspx
and please confirmed your question is resolve by pressing "mark as answer".
Tharaka MTR
23-Jan-13 5:18am
View
oh.. false is for not to search all the children.
That's why I asked to check the definition of the Find() method first
public Control[] Find(
string key,
bool searchAllChildren
)
It asked two parameter, "key" and Boolean parameter for searchAllchildren
Tharaka MTR
23-Jan-13 5:03am
View
I have added the explanation by improving the solution. pls check
Tharaka MTR
23-Jan-13 4:33am
View
What I understood is you have set of label and text boxes
for ex: lbl1, lbl2 lbl3,lbl4 etc ..
txt1,txt2,txt3 etc..
and you want to get the value of those controls dynamically. please correct me if I'm wrong.
If I am right, you can use this.Controls.Find() method for this.
Tharaka MTR
23-Jan-13 3:43am
View
this seems re-post of following question
http://www.codeproject.com/Questions/532803/howplustoplususeplustowoplusqueryplusmakeplusinplu
Tharaka MTR
23-Jan-13 2:35am
View
what do you mean static and dynamic? give me more details how your steps work,
1-3, 3-5, 5-7 etc..??
without giving proper information how do we generate the sql?
Tharaka MTR
22-Jan-13 7:07am
View
Yes, Please specify more details.
Tharaka MTR
22-Jan-13 0:00am
View
Hi Mahesh, Please check the solution section, I have already added good URLs for your reference.
Tharaka MTR
21-Jan-13 23:57pm
View
I'm agreed
Tharaka MTR
21-Jan-13 3:51am
View
Sorry, my answer is wrong, there for I deleted that
Tharaka MTR
21-Jan-13 1:08am
View
Yep, I think first you should try.. this is more basic implementation ..
Tharaka MTR
20-Jan-13 12:13pm
View
agreed with you.
Tharaka MTR
20-Jan-13 11:30am
View
I'm clear about following rows
1001 A.1 1-Jan-12 25-Mar-13
1002 B.1 8-Sep-12 30-Apr-13
But not first row
1000 A 1-Jan-12 30-Apr-13
How do you took the start date and end date for wbs_id = 1000?
Tharaka MTR
20-Jan-13 8:13am
View
Ok. I am agreed. first I posted only SWITCH statement. But Within a minute of time I posted the extension method. If you downvoted just seen the SWITCH statement, I'm agreed with you. My bad. sorry...
Tharaka MTR
20-Jan-13 7:37am
View
yes, I know that. but could you please tell me if there is no record for person "C" in table 3, then how do you join these table?
with your current design you can't join Table1 and Table 2. It is based on Table3. without any records for the C in table 3, how do we join that?
Check your table data, and how we decide Employee 3 belongs to PayID 1? is it default condition?
Tharaka MTR
20-Jan-13 3:03am
View
My question is, how do you get the payamount and payid of the employee3?
How do you join them?
According to your question, we can only able to link 3 table using Table3.
how do you able to like the record without table3
Tharaka MTR
20-Jan-13 3:01am
View
please specify your output. What do you mean by combine?
Tharaka MTR
20-Jan-13 1:42am
View
y is this negative voting? is this answer not correct?
Tharaka MTR
20-Jan-13 0:50am
View
yes please
Tharaka MTR
20-Jan-13 0:42am
View
Seems re-post.
Tharaka MTR
19-Jan-13 21:36pm
View
again someone down-voted without checking the complete answer ... :p
Tharaka MTR
19-Jan-13 21:33pm
View
If you are using same account no for DEPOSITS and LOANS. then above answer is correct. you have to use ISNULL to validate the fields.
That's why we need some background information of the question before answering. In real world, banking application if you open the Deposit account and Loan account you will get the two different account numbers.
Tharaka MTR
19-Jan-13 8:21am
View
yep, that because I'm not much familiar with VB.NET. but I think you have an idea what I'm explaining here. so, I hope you can resolve this.
please add a debug point to string selectedCompany= cbCompany.SelectedValue; place. and check wheter selected value is correctly pass to the sql or not.
Tharaka MTR
19-Jan-13 7:02am
View
Please provide your code sample
Tharaka MTR
19-Jan-13 1:26am
View
well. add break point to insert() function in the Else part. when the it breaks, recheck the discount text box value and cell value.
Tharaka MTR
19-Jan-13 0:25am
View
when you using Rows(i).Cells("DiscountNormal").Value.ToString(), what is the error you got?
you can using Convert.ToDecimal()
http://msdn.microsoft.com/en-us/library/hf9z3s65(v=vs.90).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-2
Tharaka MTR
18-Jan-13 23:13pm
View
Could you please convert the Row value to string CAST both txtDiscount.Text and Rows(i).Cells("DiscountNormal").Value to discount type (integer/decimal) and check
Tharaka MTR
18-Jan-13 22:38pm
View
Orders can have multiple order items. you are asking average value for orders, and average value for order items. could you please let us know how is your expecting output look likes
Tharaka MTR
17-Jan-13 22:16pm
View
just for the verification, instead of using runat tag, can't you use set the data variable from the server side as in my example?
Tharaka MTR
16-Jan-13 4:09am
View
if you get the answer, it is best practice to mark as answer. then thread will be closed.
Tharaka MTR
16-Jan-13 3:16am
View
Yes, we can help you. but please provide more details with what is the exact output you want.
Tharaka MTR
16-Jan-13 3:14am
View
Yes, Question is not clear.
Tharaka MTR
16-Jan-13 2:55am
View
oh.. I think you want to create auto number like A100, B100? is it?
what is the starting number? what is the starting number and ending number for each series.
give us more sample series ..
Tharaka MTR
16-Jan-13 2:53am
View
yes, I agreed with Vani's comment. What is the problem here? or could you please give us more information.
Tharaka MTR
16-Jan-13 2:52am
View
Your question is not clear. give us more details
Tharaka MTR
16-Jan-13 2:38am
View
Yep.
Tharaka MTR
16-Jan-13 2:36am
View
your question is not clear. please give us more details.
Tharaka MTR
16-Jan-13 2:28am
View
I tried this, but it didn't work for me.
Tharaka MTR
15-Jan-13 12:25pm
View
he he ... if you found the answer, then mark it to close this thread.
Tharaka MTR
15-Jan-13 12:24pm
View
Deleted
he.. he ... if you found the answer, then mark it to close this thread.
Tharaka MTR
15-Jan-13 8:20am
View
Your question is not clear, please give us more details.
Tharaka MTR
15-Jan-13 6:48am
View
If you need the articles from PHP, It is good practice you add the "PHP" in tag section. then the supporters can easily give you correct information. Anyway, I have added the tag and try to help you.
Tharaka MTR
15-Jan-13 5:56am
View
Yes, that's what I said. you can't eliminate the popup blocking issue. it is a user privilege to enable or disable the popup blocker. either you display a message to them to enable popup blocker for your site, or you have to use DIV popup.
Tharaka MTR
14-Jan-13 23:13pm
View
I can fully agreed to "window.open works well without popup blocking if I use it in client side." this part.
But. you can try this way. First you create a JavaScript function like,
<script>
function openpopup(){
window.open('Default6.aspx','List','scrollbars=no,resizable=no,width=420,height=330');
}
And then you can call that function using the "RegisterClientScriptBlock" method.
But I'm not fully sure this will solve the popup blocking issue. plz try and let me know the results.
Tharaka MTR
14-Jan-13 11:16am
View
if you want you can display the .aspx page inside the DIV. no problem for that. but If you want to open it as window.open, then you should display some information or FAQ to client, to disable the popup blocker for your site. Otherwise, it will be blocked, if the user enable the popup blocker.
Tharaka MTR
14-Jan-13 9:14am
View
ok. great.
Tharaka MTR
14-Jan-13 7:35am
View
if you use window.open to open a popup window, it will blocked by popup blocker by default. If you want to open a popup without blocking, you have to use div popup. Please check improved solution
Tharaka MTR
13-Jan-13 4:03am
View
This question is a re-post.
Tharaka MTR
13-Jan-13 1:40am
View
Sorry, I didn't see your answer.
Tharaka MTR
12-Jan-13 21:10pm
View
All other. Mainly IE, Firefox and Safari
Tharaka MTR
12-Jan-13 8:39am
View
Could you please give us what are the columns in the table?
is it |Approver|Valid From|Txn Used| ?
and data in TxnUsed store as comma separated?
Tharaka MTR
12-Jan-13 8:27am
View
Please check the answer, I have added new URL which will help you
Tharaka MTR
12-Jan-13 8:22am
View
if you are able to check the above site, you may found the working sample there.
http://www.uploadify.com/documentation/uploadify/implementing-uploadify/
and also, you can find the documentation here
http://www.uploadify.com/documentation/
Tharaka MTR
12-Jan-13 6:31am
View
Ok, I have added another solution, if you can modify your grid view binding template, then please try that also
Tharaka MTR
12-Jan-13 6:17am
View
Deleted
ok. Then it should work. hmm.. let me create a sample project and check
Tharaka MTR
12-Jan-13 6:11am
View
did you add the debug points as I said and check? are you sure your column is 8? column starting index is 0, not 1. please debug the project and give me your results
Tharaka MTR
12-Jan-13 6:02am
View
And could you please send me your grid view layout html also?
Tharaka MTR
12-Jan-13 6:01am
View
well. Could you please add two debug point to "GridView1_RowDataBound" and "getMonthName" functions and check whether event is firing or not?
Tharaka MTR
12-Jan-13 5:38am
View
could you please show me your code behind file and grid view layout..
did you debug the project and check whether the event is firing or not?
Tharaka MTR
12-Jan-13 5:28am
View
ok. I have modified the code, you have to modify the switch statement with other condition such as "T" - Tuesday, "W" - Wednesday etc..
Please try and let me know if you need any more help
Tharaka MTR
12-Jan-13 5:20am
View
Are you want to convert the windows client project as web based project?
Tharaka MTR
11-Jan-13 8:15am
View
There should not be any problems in uploading large files if you input and output streams are correct. FTP uses TCP transport layer to send data and you can remain open it as you want. So the size and time will not be an issue.
Tharaka MTR
11-Jan-13 5:01am
View
try this
cmd.Parameters.Add(new SqlParameter("PO_Date", Convert.IsDBNull(mDT_PoHead.Rows[0]["PO_Date"]) ? null : (DateTime?)Convert.ToDateTime(mDT_PoHead.Rows[0]["PO_Date"])));
Tharaka MTR
9-Jan-13 21:47pm
View
Yep.. Thx Richard :)
Tharaka MTR
9-Jan-13 13:56pm
View
At least, if you can give me why you are down voting this? then I can provide the answers..
Tharaka MTR
9-Jan-13 12:38pm
View
I don't know who are the persons down voted my answer. I only know two person did that. But I'm pretty sure they haven't tested this or they haven't check the actual logic behind the solution. And also, I'm pretty sure they had some doubt with the following part
int? zz = string.IsNullOrWhiteSpace(Request.QueryString["buzzInfluence"]) ? (int?)null : buzzInfluence;
Logic behind here is, you can cast the null value to nullable type. Please googled and verified. or please try this in visual studio. even you can use as follows also
int? zzz = string.IsNullOrWhiteSpace(Request.QueryString["buzzInfluence"]) ? default(int?) : buzzInfluence;
int? zzzz = string.IsNullOrWhiteSpace(Request.QueryString["buzzInfluence"]) ? new int?() : buzzInfluence;
I'm just asking please check this and correct your voting.
Tharaka MTR
9-Jan-13 12:19pm
View
I can't agree your comments. try this, this works definitely.
Tharaka MTR
8-Jan-13 10:07am
View
Thank you. I didn't know about that.
Tharaka MTR
8-Jan-13 8:07am
View
see the Definition and Usage section of above URL
The onresize event occurs when the size of an element has changed.
and please checked the
"onresize is Supported by the Following HTML Tags" section "<table>" tag there
Tharaka MTR
7-Jan-13 14:03pm
View
please see my answer, I have updated with code sample
Tharaka MTR
7-Jan-13 12:08pm
View
please check my answer, I have added all the information you need
Tharaka MTR
7-Jan-13 10:37am
View
Could you please send me the error you got?
Tharaka MTR
7-Jan-13 5:47am
View
I have checked your code, it is working fine in chrome also. Could you please tell us what is your chrome version?
Tharaka MTR
7-Jan-13 5:29am
View
Please give us your complete code sample.
Tharaka MTR
6-Jan-13 8:28am
View
Could you please let me know why you guys are down voted my query? if this is not working I'm OK for that. But I'm pretty sure this is working well.
Tharaka MTR
6-Jan-13 7:55am
View
following links are very helpful for me also
http://msdn.microsoft.com/en-us/library/ff647793.aspx
http://msdn.microsoft.com/en-us/library/ms172984.aspx
Books
for biginers
http://www.amazon.com/Learning-SQL-Alan-Beaulieu/dp/0596520832
http://www.amazon.com/dp/0201752840
Advanced
http://www.amazon.com/dp/0596008945
http://www.amazon.com/dp/0201791692
if you are OK with my answer, please "Mark as Answer"
Tharaka MTR
4-Jan-13 10:27am
View
Just check this and see. this works definitely
Tharaka MTR
4-Jan-13 8:32am
View
do you want to hide the complete div?
Tharaka MTR
3-Jan-13 13:47pm
View
no you no need to add anything for this.
Tharaka MTR
3-Jan-13 11:17am
View
yes, that because the data type of the column is char(50) and char is a char data type is a fixed-length data type. (varchar is a variable length type)
try converting char to varchar as follows
select CAST(RTRIM(location_name) AS VARCHAR(50)) from dbo.Location
Tharaka MTR
3-Jan-13 10:28am
View
could you please modify your error function as follows and give us the output
function OnError(data, status, error) {
alert(data.responseText);
}
Tharaka MTR
2-Jan-13 8:55am
View
if you ordered by "year" and then "month" , I think that is not what he asking.
Tharaka MTR
2-Jan-13 8:26am
View
This query will not work. see following section
= 'A' ORDER BY Name
ORDER BY MONTH(Date_of_birth)
modify it as
= 'A' ORDER BY Name, MONTH(Date_of_birth)
Show More