15,894,182 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 Jamie888 (Top 200 by date)
Jamie888
29-Apr-22 4:55am
View
4. I tried to put alert('trigger here'); inside the if (e.sender.items().length == 1){}. It prompted but not executing the this.select(0);
Jamie888
4-Aug-21 4:50am
View
The error happened at the .Select()
Jamie888
4-Aug-21 4:49am
View
The error is "IGrouping<string> does not contain a definition for "ID" and no accessible extension method "ID" accepting a first argument of type...."
Jamie888
2-Jul-21 2:07am
View
.Cells[1] is the column I want to have as the main column for users to concentrate on. Thus .Cells[1] is used.
Jamie888
2-Jul-21 2:06am
View
Hello @OriginalGriff, thank you for the explanation. I have looked into other articles too and after I have added/modify the codes:
1. dgvRow.ReadOnly = true;
2. Font f = new Font(dgvRow.Cells[1].InheritedStyle.Font.Name, dgvRow.Cells[1].InheritedStyle.Font.Size, FontStyle.Italic);
dgvRow.DefaultCellStyle.Font = f;
It is working. The rows' style did not get overwritten anymore. I am still studying on why these 2 lines would do the tricks.
I would definitely look into your suggestion too. They might be a more complete solution than what I have.
Thank you.
Jamie888
25-Oct-18 2:26am
View
3. Tried F12 developer tools but there is no error.
Jamie888
16-Oct-18 22:51pm
View
hello gentlemen, thanks for providing the explanation above. They give me a good hint and more understanding on the .then nature. I have modified my script by adding another .then after the function end part and wrapped the alert into the new .then. I am able to get the updated date objects now.
Jamie888
11-Jul-18 20:35pm
View
Sir, thanks for your suggestion. To answer your question above, originally the column ScheduleDate in datagridview has formatting done in "dd MMM yyyy" format. But users found out that if they change their system clock region(e.g. from English(US) into English(UK)), the supposed "dd MMM yyyy" value will get haywire into "01/01/0001". I have troubleshoot the issue by removing the formatting and move the formatting into codes level as the above question posted but to no avail as i keep on getting the "07/11/2018" instead of "11 Jul 2018" format. I suspect there is some setting in DataGridView that will default any formatting into the system clock format if there is no explicit formatting done in DataGridView itself.
Jamie888
15-May-18 5:56am
View
Yes, i am able to read as well. I did another testing. This time i copy the exact data and set it into protected mode and save it as .xls but i am able to read also. Only i am not able to read/establish connection to the ori file.
Jamie888
15-May-18 5:31am
View
I have created a new .xlsx file with all the records in it.
Jamie888
15-May-18 5:23am
View
Sir, I have done a further testing by creating another .xls file and indeed it can be read. I doubt whether is it due to the original .xls file is in protected mode?
Jamie888
15-May-18 5:18am
View
Really appreciate your input sir but i doubt it because i have double check the data.xls(right-click properties) and indeed it is in .xls format.
Jamie888
15-May-18 5:02am
View
Sir, it did not say which table but i believe it is referring to excel sheet. The error will prompt every time i click Preview button in the Excel Source component in SSIS.
Jamie888
4-May-18 2:16am
View
i am not really sure sir. From F12 inspection of element, the background image is one of the attribute in my div. In fact, the url shown in the div is not even the path(e.g. from my desktop) but something like "%tyfhri123*(eys)?<><...." counting until 200k characters.
Jamie888
2-May-18 23:28pm
View
Thank you sir. I will give it a try and feedback accordingly.
Jamie888
2-May-18 22:40pm
View
Thank you sir for your suggestion. Turns out my issue to be missing anti-forgery token in my ajax script.
Jamie888
2-May-18 22:40pm
View
Thank you sir for your help. Turns out to be missing anti-forgery token in my ajax call.
Jamie888
2-May-18 22:39pm
View
Yes sir, seems like this is the case here. I have modified my ajax script and everything works fine now. Thank you.
Jamie888
30-Apr-18 2:04am
View
I have found the solution via the link below:
http://jsfiddle.net/UW38e/
Jamie888
26-Apr-18 2:04am
View
Sorry, turns out to be my Windows OS not supported for SQL Server 2017 Express LocalDB. Although it is installed, but due to my laptop have only Windows 7, it is insufficient to actually execute the component inside. Please do correct me if i got the understanding wrong.
Jamie888
25-Apr-18 23:26pm
View
Sir, i have execute the command line using cmd but to no avail. I tried sqllocaldb create "SampleInstance" v14.0 -s. But i get and error straight after hitting enter saying i do not have version 14 component installed. Checked control panel and indeed it is there.
Jamie888
25-Apr-18 22:01pm
View
Sir, i still not quite understand about this localDB. I checked my control panal and an instance of Microsoft SQL Server 2017 LocalDB is there but when i try to connect to it using SSMS 2017 by entering Server name as (LocalDB)\. or (LocalDB)\MSSQLLOCALDB, it fails with the above error.
Jamie888
24-Apr-18 4:17am
View
Thank you sir. I have just found out too after reading some articles. This problem can be solved by changing the src from "~/images/paddlewheel.png" into "/images/paddlewheel.png"
Jamie888
20-Mar-18 21:34pm
View
Yes sir, i believe this is the case. I have setup 3 different jobs pointing to the same package with same scheduled time and let it run. Just the requirement limitation that is preventing me from run the job in a sequential basis.
Jamie888
19-Mar-18 4:55am
View
i removed the CarId in OPENXML as suggested and i got rows of records. But i still don't quite get the picture, how the removal of CarId can yield the result?
Jamie888
19-Mar-18 3:53am
View
Hi sir, thank you for your explanation. Due to some circumstances, i can't debug my codes on the actual input parameter. But based on your suggestion, i have altered my question and tried to execute it and the error is gone now albeit with no results returned. Could you please have a look on my updated question?
Jamie888
28-Dec-17 1:13am
View
My bad. Thank you sir for your explanation and for the help. Really appreciate it.
Jamie888
26-Dec-17 21:21pm
View
Thank you sir, it works! I have tried this method too previously but it prompted me "gettime() is not a function" error. Maybe i missed out a bracket. Anyhow, may i know the details on why does my original method don't work? I have tried online for some explanation but could not quite get the answer i was looking for.
Jamie888
1-Nov-17 3:43am
View
How to say it is expected? Is it the common issue for RDLC?
Jamie888
1-Nov-17 3:36am
View
How to say sir?
Jamie888
12-Oct-17 5:13am
View
It is in this format sir:
10/11/2017 7:42:16 AM DataType is DateTime
Jamie888
12-Oct-17 5:03am
View
Sir, I have checked my controller. The value is indeed in datetime format without "T"
Jamie888
12-Oct-17 5:02am
View
I have updated the question to better reflect the scenario here.
Jamie888
12-Oct-17 4:57am
View
Sir, the data type I am using in database is DATETIME2. I have put a break point at the last line before it is entering javascript and the datetime value is still without "T". Only when it getting display it is showing the "T".
Jamie888
5-Oct-17 4:13am
View
Sir, I have updated my question to better reflect the problem. I am actually using a custom select element(e.g. customSelect) in my application. I have no problem initialize it but the drop down is not working whenever I click on it. I have tried to change the custom select into normal select element and it works fine. But not with my custom select.
Jamie888
26-Sep-17 4:02am
View
Sir, do you mean getting those 3 different durations and set a single timer to check against each of them every second and trigger the required logic once the times up for any of them?
Jamie888
25-Sep-17 5:25am
View
Sure sir. The program is working now. Thank you for your advise and help. Appreciate it a lot.
Jamie888
25-Sep-17 5:11am
View
Ohh is it the displayTimer.Interval = 1000 that is causing the blinking for one second interval?
Jamie888
25-Sep-17 5:08am
View
Sir, I have updated my question based on your suggestion. After I have tried it but still the result keep on blinking with each at one second interval. Does the for loop is still necessary?
Jamie888
25-Sep-17 4:20am
View
Sorry sir, I dont really get it. If I move the displaying codes into the timer handler as above, would not be the text would only display after the timer has ended?
Jamie888
27-Apr-17 9:55am
View
Ok sir, I will give it a try and will keep this post updated. Thank you.
Jamie888
27-Apr-17 5:17am
View
Sir, I found one from Microsoft website:
https://www.microsoft.com/en-us/download/details.aspx?id=13255
Is this what you mean?
Jamie888
27-Apr-17 5:14am
View
Sir, the ACE driver is Access Runtime 2010 mentioned above?
Jamie888
18-Apr-17 22:40pm
View
Thank you for the clarification sir. I have installed Access Runtime 2010 and is using .Microsoft.ACE.OLEDB.12.0. Now the application is working without any error anymore. Thank you for both of your time and help.
Jamie888
18-Apr-17 3:45am
View
One more question sir, do you mean Access Runtime 2010/2013 only support ACE engine? Or does it is backward compatible(support JET engine also)?
Jamie888
18-Apr-17 3:30am
View
Sorry for the confusing explanation above. The reason I was trying on IIS was due to I just wanna give it a try(though it is near to zero chances of success as IIS is for Web project). I have changed into using ACE.12.0 but the server still returns me the similar error. I will try to install the "Microsoft Access Database Engine 2010 Redistributable" package to see whether it will solve the issue.
Jamie888
18-Apr-17 1:57am
View
Thank you for your respond sir. I have changed to Microsoft.ACE.OLEDB.12.0 as I found no solution for Microsoft.Jet.OLEDB.4.0. This application was developed around 10 years ago so I think it is time to give it a fresh change and update. I am trying on it right now and I will keep this post updated on any updates. Thanks again for the info.
Jamie888
1-Mar-17 0:49am
View
nope, I am using DataTable.
https://datatables.net/
Jamie888
12-Feb-17 21:27pm
View
Yes sir, I have installed that but seems like the targeted PC is missing other components too plus the targeted PC is running on Windows XP(at least Windows 7 is needed for Report Viewer 2012 Runtime). Anyhow, thank you for your help and I will mark this as answer. Thank you.
Jamie888
23-Dec-16 3:02am
View
Sir, thank you for your reply. It has worked as expected although with some performance issue. Anyway, thank you for your help. Really appreciate it.
Jamie888
29-Nov-16 2:14am
View
It has red error line below the codes that you suggested.
Jamie888
29-Nov-16 2:02am
View
Sir, I have tried both of your methods but unfortunately, they did not work.
Jamie888
8-Nov-16 20:15pm
View
Thank you sir for your information. I have done it according to your suggestion and it is working fine now. Thank you again.
Jamie888
8-Nov-16 20:14pm
View
Yes sir. Thank you for your explanation. It had clear my confusion. I have studied Mr. Meier(solution 2) solution and modified according to my need. It is working now.
Jamie888
8-Nov-16 1:14am
View
Yes sir, I have debugged my codes before. It indeed flow into the IF part. The value is GETDATE() which is in 11/8/2016 1.52 PM format. Then it comes to woStartDate.ToString("yyyy-MM-dd HH:mm:ss") part for conversion but nothing happen.
Jamie888
27-Sep-16 7:16am
View
Thank you very much sir. Really appreciate it. Thank you.
Jamie888
27-Sep-16 7:13am
View
Sorry sir, its my own mistake. It was due to typo that caused this problem. Sorry for any inconvenience caused.
Jamie888
27-Sep-16 7:08am
View
I have a value which is in double data type in controller(for example 0.5) but when it is being displayed in HTML, it changed to "undefined". I have tried to debug it but I cant find any clue on it as on the final line of codes in controller(C#), it is still 0.5 but changed to "undefined" when it arrive in HTML.
Jamie888
27-Sep-16 7:00am
View
Sir, does this affect other data type also. For example double or integer? This is due to I have value returned from controller(double data type) with value 0.5 but displayed as "undefined" in HTML.
Jamie888
27-Sep-16 6:49am
View
I have modified your script into:
return [month, day, year].join('/') + " " + [hour, minute, seconds].join(':');
How can I add "AM" or "PM" into it?
Jamie888
27-Sep-16 6:40am
View
I have check online, does javascript would display any datetime as /Date(123456789)/ if we do not change its value as suggested by sir on above?
Jamie888
27-Sep-16 6:24am
View
Sir, may I know what is the substr(6) for?
Jamie888
8-Sep-16 22:46pm
View
Yes sir, thank you for your advice, it is indeed tha "shipping_start_date" that caused the error. Thank you.
Jamie888
8-Sep-16 22:45pm
View
Yes sir! Absolutely! How can I missed that, thank you for your advice, the issue is solved now. Thank you.
Jamie888
4-Aug-16 1:31am
View
Found out to be missing conversion for the _arrGlobal.
var param1 = _arrGlobal.toString();
var param = param1.substring(param1.lastIndexOf(' ') + 1);
alert(param);
Jamie888
4-Aug-16 1:23am
View
Thank you sir for your info. I have found the root cause error on the above question. It is due to I must convert the _arrGlobal into string(e.g. _arrGlobal.toString()) before substring it. Then the error message would disappear. Anyway, I will mark your answer as solution here. Thank you again.
Jamie888
3-Aug-16 22:24pm
View
I have tried to inspect. Error saying substring is not a method.
Jamie888
27-Jul-16 21:41pm
View
Thank you for your help sir and sorry for the late reply as I was occupied with other tasks on hand. Thanks again.
Jamie888
13-Jul-16 21:48pm
View
Sir, I have checked through the web.config in Views folder and the namespace indeed is there. Besides, I have compared both the versions of System.Web.Webpages and both are in 3.0.0.0
Jamie888
12-Jul-16 22:58pm
View
Sir, I have tried your suggestion above but I am getting an error stating 'System.Web.Webpages.....does not contain a definition for Partial.....'. I have checked my web.config but found that I did not miss out any namespace as suggest by Internet solution like:
add namespace="System.Web.Mvc.Html"
Could I have missed out other namespace or configuration?
Jamie888
12-Jul-16 22:57pm
View
Deleted
Sir, I have tried your suggestion above but I am getting an error stating 'System.Web.Webpages.....does not contain a definition for Partial.....'. I have checked my web.config but found that I did not miss out any namespace as suggest by Internet solution like:
<add namespace="System.Web.Mvc.Html">
Could I have missed out other namespace or configuration?
Jamie888
12-Jul-16 5:01am
View
How can I put like myDiv1 is John and myDiv2 is Sarah?
Jamie888
12-Jul-16 4:59am
View
Sir, I have only one partial view in my html(e.g. myPartialView) in main html. Then by using javascript, I will return the whole data from controller using the code:
$("#myPartialView").html(data);
The tricky part is where inside the partial view html, I will loop the Model.Data1.Dtolist using foreach loop to plot all the data to their respective div(myDiv1 and myDiv2 in our case here). Therefore, during display in screen, my myPartialView would have 2 separate field(e.g. FirstName -> John and Sarah).
The myDiv1 and myDiv2 are coming from the same div tag. With only 1 and 2 are the unique id I am using to separate both like:
<div id="myDiv" + 1></div> and also <div id="myDiv" + 2></div>.
Jamie888
12-Jul-16 4:34am
View
Thank you. Another question is for example I have 2 div(myDiv1 and myDiv2) where the "1" and "2" are the unique id that I assigned to each of the myDiv in order to differentiate them. The controller will return 2 data of course, one for myDiv1 and one for myDiv2(both are coming from the same field in database, e.g. FirstName). Would I need to put the above codes @Html.Partial..... inside the foreach loop in my html page?
Jamie888
12-Jul-16 2:32am
View
Sir, for the @Html.Partial("_myPartialView", new TestModel{ID=1, Name="John"}),
does the ID and also the Name is the output from the function call? If yes, can I put the ID and Name dynamically like ID = model.ID?
Jamie888
11-Jul-16 21:59pm
View
Sir, if I have multiple boxes with their own unique ID, how should I place the data correctly for each of them? Should I use a for loop?
Jamie888
11-Jul-16 8:40am
View
Sir, I have few things I dont understand here and have searched online for some explantion. Please correct me if I am wrong, could I assume that the ShowPartial is the function name in my controller while the Home is the name of my controller file?
Besides, does the empty object {} will automatically recognize my previously used parameters and use it every time is refresh? As all of the codes above would be used for refreshing purposes. Thank you.
Jamie888
11-Jul-16 5:07am
View
Sir, I have looked into the link and the closest is the .load(). I have checked online again for the .load() and one thing I am not sure is can the .load() accept a function inside the JavaScript and take it as parameter? For example:
I have a function MyFunction(). Can I write like:
$( "#myDiv" ).load( "MyFunction() #myDiv" ); ?
As MyFunction() will returns many data from database, is it possible to do it?
Jamie888
1-Jul-16 2:42am
View
I have change the codes as without the 'states:':
chart.series[0].data[i].graphic.attr({ fill: 'RED' });
hover: { fillColor: 'RED' };
chart.redraw();
But the result is the same.
Jamie888
1-Jul-16 2:16am
View
But one thing though, is it a highchart bug that when i hover the point/column with RED, it will get change back to its original color and would not revert back to RED even I hover out the point?
Jamie888
1-Jul-16 2:14am
View
Sir, I have found the solution for this. I have removed the:
chart.series[0].data[0].update({
marker: {
fillColor: 'RED'
}
});
into:
chart.series[0].data[i].graphic.attr({ fill: 'RED' });
chart.redraw();
Jamie888
1-Jul-16 2:10am
View
Sir, script updated.
Jamie888
1-Jul-16 2:06am
View
Sir, I have changed the codes into:
chart.series[0].data[i].update({
marker: {
fillColor: 'RED'
}
});
But the color still have not change.
Jamie888
28-Jun-16 3:58am
View
Sir, I have tried your suggestion but it did not work out.
Jamie888
27-Jun-16 22:28pm
View
columnA, B and C are array var
Jamie888
27-Jun-16 21:22pm
View
Sir, I have updated my codes.
Jamie888
9-Jun-16 21:33pm
View
So I have found a aolution to it, may not be orthodox but can give it a shot. Just add a line of codes "_clearTimer = 0;" right after the clearInterval() in order to make the IF statement true and run the logic in it. That way will reset the setInterval() value and thus return the result that we want.
Jamie888
5-Jun-16 8:14am
View
Ok sir, I have found out the root cause. It was my misunderstanding on the setInterval logic. Basically we got to declare a local variable instead of global one(var date in this case). If it is a local, then every interval there would be one new var date being created and each time the getMinutes() would have different value. If it is global, then it would have the same getMinutes() value for every interval and hence the if statement would not stand as it will be always the same. Please correct me if I have explained it wrong here.
And thousands thanks for your help nd effort. It really saved my day sir.
Jamie888
5-Jun-16 7:29am
View
Is there any logic break at the modulus part? As if for the first time the result of modulus is not zero, then the setInterval will run nothing inside it and subsequently nothing will run at 5 minutes interval mark. I have tried to change the modulus to 1 and it works, but 5 id did not work.
Jamie888
5-Jun-16 7:20am
View
Sir, I have tried your method but with some modification on the script. It seems did not refresh on what I have expected. Below are my codes, is there anything wrong with it?
if (_clearTimer == 0) {
_clearTimer = setInterval(function () {
if ((_date.getMinutes() % 5) == 0) {
MyMethod();
}
}, 60000);
}
Jamie888
3-Jun-16 7:34am
View
Sir, how do you mean by run the timer for every 1 minute?
Jamie888
21-Apr-16 5:55am
View
Sir, I have moved my value in web config file into app config file and it works now. But one thing that I am not sure, why does value in web config file doe snot work?
Jamie888
21-Apr-16 5:39am
View
Sir, my setting is exactly the same as your answer above.
Jamie888
19-Apr-16 4:34am
View
Thank you sir. After some thought, I have decided to part way with the async programming. I will write my answer in below.
Jamie888
18-Apr-16 7:04am
View
So sir, does it means I have no choice but to use a newer version of .NET framework in order to use async programming?
Jamie888
18-Apr-16 6:23am
View
Hi sir, I have tried to modify my codes as below:
Task<httpresponsemessage> response = client.GetAsync("api/servertime"));
if (response.Result.IsSuccessStatusCode)
{
//error here
string result = await response.Result.Content.ReadAsStringAsync();
Jamie888
18-Apr-16 6:09am
View
Deleted
Hi sir, I have tried the link above and modified my codes. But the IF statement returns some error(...does not contains definition for IsSuccessStatusCode...), is there any way that I can remain that?
Jamie888
17-Apr-16 23:11pm
View
Yes sir, I have found it after I posted the question. I have changes it to .NET 4.5.1 and the error message is gone now. But another problem occurs in which when I tried to debug/run the solution, it has some runtime error in which the cs file I used to put the codes above is in .NET 4.5.1 whereas the other cs files are in .NET 4. Anyway to solve it without changing the .NET framework for other cs files?
Jamie888
29-Mar-16 21:54pm
View
Thank you sir for your explanation, but unfortunately the developer is not around anymore. Anyway I will have a more detailed study on the transactionscope.
Jamie888
28-Mar-16 22:26pm
View
Sir, I have found something in my codes which is TransactionScopeRequired is set to TRUE. Does this setting will make the whole method to be within a transaction scope and isolation level defaulted to SERIALIZABLE?
Jamie888
28-Mar-16 21:46pm
View
Sir, thank you for your explanation. If there is no transaction scope defined in codes, does it mean that the isolation level would be taken from the SQL database(isolation level generated through SQL)?
Jamie888
24-Mar-16 7:21am
View
Thank you for the guidance. I have updated my question.
Jamie888
24-Mar-16 7:20am
View
As there is some performance issue with my codes, I need to tune it to become more flexible by doing batch in order to reduce time taken instead of doing looping for each row of records. Batch would only do a few connection to db compared to for each which will connect to db every time for every rows.
Jamie888
24-Mar-16 7:13am
View
Sir, I have noticed it by now. Could I change it into value = value + "," + dr_top["ixkit"].ToString(); instead?
Jamie888
24-Mar-16 7:08am
View
No sir, I have not try out my codes, there is server issue which is used for testing purpose at my place now and it takes time to recover. I can only codes based on logic for now. Is there anything that I can improve on my codes as stated above?
Jamie888
24-Mar-16 6:55am
View
Sir, as I am getting the rows 50 by 50, if I have reached 100th, how can i continue for the remaining 2(101 and 102)?
Jamie888
21-Mar-16 22:07pm
View
My DBA has a SQL script that is used to check for isolation level each time the stored procedure is called.
Jamie888
21-Mar-16 3:44am
View
Yes sir, I would love to but my DBA would not allow me to get a hand onto those codes for isolation checking. It has make my troubleshooting harder :(
Jamie888
1-Mar-16 21:48pm
View
Its ok sir. My job can run smoothly also but something weird is the error will just prompt out intermittently. Then the next time it runs, all is ok without any error again.
Jamie888
23-Feb-16 21:01pm
View
Yes sir. Thank you for your suggestion. I have tried it by using Regex. The final output now is "CREATE PROCEDURE "procedure name"".
Jamie888
22-Feb-16 4:11am
View
Sir, I have modified my comment above. Its ok to have CREATE PROCEDURE syntax in front of my stored procedure name.
Jamie888
22-Feb-16 3:40am
View
Sir, I have tried to modify my codes for Regex part and it works fine now. Below are my codes:
string pattern = @"CREATE PROCEDURE\S*(?:\s\S+)?";
Regex rgx = new Regex(pattern);
foreach (Match match in rgx.Matches(content))
{
using (StreamWriter sw = new StreamWriter(@"C:\Users\Desktop\" + DateTime.Now.ToString("yyyyMMdd") + "_Extra.txt", true))
{
//sw.WriteLine(Environment.NewLine);
sw.WriteLine(match.Value);
sw.Close();
}
}
Jamie888
22-Feb-16 3:27am
View
Sir, i have tried your suggestion and used Regex to achieve my purpose. But unfortunately, I cant get the result. The content of text file created will be always "System.Text.RegularExpressions.MatchCollection" instead of stored procedure name.
Below are my codes:
var matches = Regex.Matches(content, @"PROCEDURE\S*(?:\s\S+)?");
using (StreamWriter sw = new StreamWriter(@"C:\Users\Desktop\" + DateTime.Now.ToString("yyyyMMdd") + "_Extra.txt", true))
{
//sw.WriteLine(Environment.NewLine);
sw.WriteLine(matches);
sw.Close();
}
Jamie888
22-Feb-16 2:37am
View
Yes sir, in the text file I have two complete stored procedure. After execution, I want to retrieve only their stored procedure name(e.g. usp_StoredProcedureOne) and save it into a new text file.
Jamie888
15-Feb-16 1:56am
View
yes Mr.Kumar. Thank you for your effort and suggestion. I have found the root cause. It was due to access permission to the database for different account. The account with .dev did not have permission to access the database. After granting permission for the account with .dev, all is ok now. Thanks a lot.
Jamie888
4-Feb-16 20:26pm
View
Yes sir, fortune sure has come. I have use another table to join with CustomerDetail table before ProductRelation table. Then only I will use the value in the other table to continue to join back the ProductRelation table and subsequently ProductDetail table. :)
Jamie888
4-Feb-16 2:50am
View
Thank you for your suggestion sir. But unfortunately, in the CustomerDetail table do not have RelationId.
Jamie888
8-Jan-16 1:08am
View
I did not design any button on my form but I will have the above codes fire when I run the program which is why I put my codes in form load event. I have tried the below codes by "cheating" the system though, but any method that is more appropriate is welcomed:
this.WindowState = FormWindowState.Minimized;
this.ShowInTaskbar = false;
Jamie888
8-Jan-16 1:06am
View
Yes, this is during my form load event. I have tried a method by "cheating" the system with:
this.WindowState = FormWindowState.Minimized;
this.ShowInTaskbar = false;
Jamie888
7-Jan-16 22:05pm
View
Is it due to I am writing my codes in Load event? Therefore it will display the form after it has run all the codes?
Jamie888
25-Nov-15 19:35pm
View
I have give it a try by changing it to your suggestion sir but unfortunately, it still has error at it. Furthermore in data flow it does not support debugging which is a pain.
Jamie888
27-Oct-15 21:40pm
View
hi Member, thank you for your suggestion. I have found the root cause for this. It appears that List is needed to be placed under the tablix to make it works. The list control can be found in toolbox. But anyway thanks again for your effort and it may comes in handy in the future. Thank you.
Jamie888
20-Sep-15 9:02am
View
Hi, after I tried your suggestion, when I run my package, it returns me the following message:
there is no current row in the buffer. a row may need to be added using the addrow method
Any idea on that cause I have checked my script and setting. All seems to be correct.
Jamie888
9-Aug-15 23:24pm
View
Sir, does it means that it is merely telling me where the exception occurred last time? This is the link for explanation that I found.
https://msdn.microsoft.com/en-us/library/system.exception.stacktrace(v=vs.110).aspx
Jamie888
2-Jul-15 1:59am
View
Yes sir. Thank you for your effort.
Jamie888
2-Jul-15 1:59am
View
Yes sir. Thank you for your response. It clears my clouds now. Thank you.
Jamie888
1-Jul-15 2:04am
View
Yes sir, thanks for your help. It clear my question now. Thank you.
Jamie888
10-Jun-15 21:26pm
View
Yes sir, you are right. After I install the font into OS, it has been found in Visual Studio also. Thank you for your tips.
Jamie888
10-Jun-15 4:42am
View
Sir, do you know any link that have the tutorial of installing the new fonts into Visual Studio?
Jamie888
28-May-15 1:38am
View
Yes sir I will. Thank you again for your effort in helping me.
Jamie888
27-May-15 6:49am
View
Yes sir. I will give it a try on your suggested method. Thank you. :)
Jamie888
27-May-15 6:48am
View
Thank you sir, you really help me a lot!! Really appreciate it. Thank you.
Jamie888
22-May-15 1:58am
View
Sir, I have one(1) data/result(let say it is "Hello"). But when the codes is being executed, it will display the same result("Hello" in this case) TWICE. How can I check if the tvQuestionList has contain the "Hello" and then the second "Hello" would not be displayed anymore?
Jamie888
21-May-15 23:39pm
View
Sir, I have tried your method but it return an error message "Cannot convert lambda expression to type "System.Windows.Forms.TreeNode" because it is not a delegate type".
Jamie888
20-May-15 2:21am
View
thank you all for your effort and help. I have now able to get the value I want. Thank you.
Jamie888
19-May-15 23:37pm
View
I have done some research on internet and found a method by using Math.Truncate but it seems to return the part which is in front of the decimal not behind of it.
Jamie888
19-May-15 5:14am
View
Sir, FYI, the sequence for the results are "Hello", "Hello", "HelloWorld", "HelloWorld". Could I add a if(i%2 == 0){tvQuestionList.Nodes.Insert(i, CreateTreeNode(questionList.DtoList[i], i));} ?
Jamie888
19-May-15 5:09am
View
yup, it is 4. I feel weird though. Is it because of the "questionList.DtoList = _customDataCollectionQuestionList.DtoList.Where(q =>
q.TrackingState != BaseDto.TrackingInfo.Deleted).OrderBy(q => q.Sequence).ToList();" ?
Jamie888
19-May-15 4:58am
View
FYI, I have checked through the SQL database. The records indeed are correct. Only one "Hello" and one "HelloWorld".
Jamie888
27-Apr-15 22:42pm
View
Sir, for your information, the above codes are written on DTO layer. My senior told me that I cant access/call database from DTO layer. I could run it on local server(my PC) but not on the remote server as according to my senior. I have run through for online resources but none of the articles can answer my question. Any other inputs are appreciated. Thank you.
Jamie888
27-Apr-15 2:20am
View
Both transaction will use the System.DateTime.UtcNow
Jamie888
27-Apr-15 2:16am
View
Can I assume that if I have 2 servers, then I have 2 transaction running at the same time. Each transaction would only ping a server to get the datetime at one time. If first transaction ping the server 1 and get the datetime follow by second transaction ping the server 2 to get the datetime. If both servers is sync. then by right datetime for second transaction should be slower than first trasaction. If the servers are out of sync., let say server 2 is slower than server 1 by 5 minutes, then would the datetime returned from server 2(for second transaction) is slower than first transaction(which datetime is get from server 1)?
Jamie888
26-Apr-15 23:54pm
View
Hi Sir, based on your explanation, could I assume that the datetime we get using System.DateTime.Now or System.DateTime.UtcNow is generated from where the application is hosted on the server?
Jamie888
22-Apr-15 3:16am
View
Yes sir, thank you for your tips and suggestions. I have tried them. I must remove the \\ in front of the server name and ping would be successful.
Jamie888
21-Apr-15 4:13am
View
yup I have remove the "\\" and it works now. But after it reach the "socket.Receive(ntpData);", it was dead again with the following error message:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
And may I ask what is public NTP service? Is it like those which can be used by anyone/codes that call it?
Jamie888
21-Apr-15 4:07am
View
FYI, this time the error message was:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Jamie888
21-Apr-15 4:03am
View
yup I have tried it but it is the same. Instead I tried pena-b-902.ap.testing.com and it works. But after the codes reach "socket.Receive(ntpData);", it was dead again.
Jamie888
21-Apr-15 4:02am
View
the error message is SocketException was unhandled by user code [No such host is known].
Jamie888
21-Apr-15 3:45am
View
I am confirm that the "ntpServer" is valid. I have tried adding another pair of "\\" in front of the \\pena-db-902.ap.testing.com but it prompt me the same error message. Any help is appreciated.
Jamie888
21-Apr-15 1:47am
View
Yes sir. Sorry for my mistake. Originally I meant return error.
Jamie888
20-Apr-15 2:35am
View
Hi Sir, I have tried using NTP. All is working now but I will keep you updated for any results that I found in the near future. Thank you for your suggestion.
Jamie888
19-Apr-15 6:28am
View
may I know is there any other command that I can use besides echo %time% to get the time with milliseconds? I need to get server time instead of local PC time(which is the result of echo %time%).
Jamie888
18-Apr-15 2:15am
View
Hi Sir, I have some codes written in C# that will get the value being passed from NET TIME into my program. I shall update the question with the C# codes attached so that you may have a clearer picture of it.
Jamie888
17-Apr-15 3:30am
View
Yes, I have tried using echo %time%. But what I get is local PC time instead of server time(which I get using NET TIME).
Jamie888
17-Apr-15 3:29am
View
Hi Sir, I am using Windows command prompt.
Jamie888
16-Apr-15 5:49am
View
Sir, the "DateTime.Now.MilliSeconds" is retrieved from my local PC if I am not mistaken. Is there any possibility that I can get milliseconds from server time?
Jamie888
8-Apr-15 5:32am
View
thank you Peter. I have done a simple testing on SQL Studio also and it indeed return the result as you have posted.
Jamie888
8-Mar-15 22:39pm
View
I have tried execute it using different ways. First would be only one condition whereas it returns the result I want. After that I add in the second condition whereas it returns the result I do not want. So I would prefer the MeasurementGroupId is returned as 0 when first condition is met.
Jamie888
23-Feb-15 20:53pm
View
Yes thank you. I have add on some SQL codes to return the result I desired. Please have a look and feel free to comment on any improvement that is needed thank you.
Jamie888
13-Feb-15 2:22am
View
I have checked it. It is at the top.
Jamie888
2-Feb-15 0:29am
View
Yes. I have tried both methods. The second answer on the first tab "dummyMeasurementDto.ProcessType = cmbProcessType.Text;" seems to solve the problem. Thank you sir.
Jamie888
30-Jan-15 2:50am
View
I am trying to convert the selected item from combobox into a string so that I can display it. The "dummyMeasurementDto.ProcessType" is a DTO. I can get the item, just I cannot convert the selected item properly.
Jamie888
28-Jan-15 21:16pm
View
Thank you. It has given me some hints on how to do it. I will update the solution once I have done it.
Jamie888
28-Jan-15 6:28am
View
if I have a column which is EventId, then should I write like:
measurementDetailDtoList.Where(a=>a.EventId).ToList(); ?
FYI, I have passed a value which is EventId, then how should I code it?
Jamie888
12-Jan-15 2:08am
View
the ) is behind (your query here)
Jamie888
12-Jan-15 2:08am
View
I have tried your suggestion but it prompt me an error message:
Incorrect syntax near ')'
Jamie888
12-Jan-15 1:52am
View
how can I return all the values including the count(WorkOrderNumber)? Means like adding a count(WorkOrderNumber) into the current query?
Jamie888
1-Jan-15 20:16pm
View
Thanks sir, it helps me a lot.
Jamie888
1-Jan-15 20:16pm
View
Thanks sir, it helps me a lot.
Jamie888
1-Jan-15 20:16pm
View
Thanks sir, it helps me a lot.
Jamie888
19-Dec-14 5:29am
View
Thank you George, it is indeed one of the field that many will missed out. But for may case, I have added the _QUANTITY into the XML file using code behind. But I have found the solution, it is due to my label file in which I did not configure the path of a image inside the label correctly. It cant detect the correct path, that is why my label cant printed out. Anyway thanks for your effort. :)
Jamie888
8-Dec-14 20:51pm
View
how can I install CHESS and how can I use it? I do not understand on how the software run. Thank you.
Jamie888
8-Dec-14 2:31am
View
Hi, may I know where can I download the CHESS? I have found no download link from the above links. Thank you.
Jamie888
28-Nov-14 3:39am
View
Yes. Thank you, I will look into it sir.
Jamie888
28-Nov-14 0:42am
View
Yes indeed, how can I forget about the SubString method. Thank you for your suggestion.
Jamie888
26-Nov-14 22:59pm
View
Hi Mr Nadkar, thank you for your suggeestion, but my script above is written in Loftware, can I apply the same script of the above suggestion(which is written in Visual Studio) in Loftware?
Jamie888
25-Nov-14 1:25am
View
FIY, I hav checked the properties of the text field also and the name for the text field is indeed Text0025.
Jamie888
12-Nov-14 20:30pm
View
Sorry for late reply, the above codes are inside SQL Management Studio 2008 R2. I want to display the result after the "END". Because after each time I execute the codes, it will only prompt me Command Executed Successfully.
Jamie888
13-Oct-14 7:44am
View
thank you for your suggestion. I have found out the problem. The URL given by the vendor is incorrect. After some alteration on the URL given. I am able to go to the URL I want. Thank you.
Jamie888
13-Oct-14 7:40am
View
I am not sure who owns that address of ww34.abc.com, but how can I do so?
Jamie888
22-Jul-14 2:49am
View
yes indeed, i am too careless, thank you for your solution.
Jamie888
22-Jul-14 2:26am
View
yes thank you for your suggestion, it is indeed a spelling mistake there. But the original error message is like this:
Procedure or function 'GetTescoRecords' expects parameter '@EventType', which was not supplied.
Jamie888
20-Jul-14 22:36pm
View
yes Mr Kryukov you are right. But no offense to you personally, but not everyone is a professional programmer or IT professional like you sir. You may have good knowledge in IT related field but your temper may bring you down one day. You may want to be like the late Steve Jobs but you will never be one if you cant convince others you are their leader. No offense to you but this is only my personal view.
Jamie888
20-Jul-14 22:09pm
View
a folder which is located above the .sln and .suo
Jamie888
20-Jul-14 22:05pm
View
i have renamed the solution name but the folder name remained the same
Jamie888
20-Jul-14 22:03pm
View
i can rename the solution which is successful but the folder name remained the same
Jamie888
13-Jul-14 22:37pm
View
my mistake, i forgot to remove the ExcelDt.Rows[] at the front. Thank you for your effort.
Jamie888
13-Jul-14 22:37pm
View
my mistake, i forgot to remove the ExcelDt.Rows[] at the front.
Jamie888
11-Jul-14 3:50am
View
where should i put this line in?
Jamie888
11-Jul-14 2:46am
View
a thousand thanks, it works fine after i have add another pair of ' inside the WHERE clause.
Jamie888
11-Jul-14 2:15am
View
sir, i have tried your suggestion and change the @STARTDATE VARCHAR(MAX) INTO @STARTDATE DATETIME and remove the conversion part but it give me this error when i execute the stored procedure:
Msg 8152, Level 16, State 10, Procedure CZ_InsertIntoProjectManagementOutstandingExcel, Line 106
String or binary data would be truncated.
Jamie888
11-Jul-14 1:43am
View
it is at command.ExecuteNonQuery();
Jamie888
11-Jul-14 0:06am
View
in c# it is in string but before they are passed into stored procedure i have convert them into date data type
Jamie888
11-Jul-14 0:05am
View
VARCHAR(MAX), i have tried to change them into DATETIME but it give me error instead say "Cannot convert nvarchar into date format"
Jamie888
10-Jul-14 23:33pm
View
StartDate is 01/06/2014
EndDate is 11/07/2014
Jamie888
10-Jul-14 23:32pm
View
FIY, stored procedure works fine and display the correct result. Just the C# codes has error in it.
Jamie888
10-Jul-14 22:26pm
View
thank you for your solution. It works well. FIY, I have change the fromExcelDT into ExcelDT as i am calling the function in lastRow().
Jamie888
10-Jul-14 21:57pm
View
FIY, all the records can be retrieved successfully.
Jamie888
4-Jul-14 0:00am
View
i dont quite get it. Do you mean that i have to create a table #TargetDateTblx and then only i create the stored procedure?
Jamie888
3-Jul-14 23:08pm
View
it is still the same
Show More