16,006,442 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 B. Clay Shannon (Top 93 by date)
B. Clay Shannon
18-Feb-16 17:25pm
View
All down but nine, pard; set 'em up on the other alley.
B. Clay Shannon
18-Feb-16 17:18pm
View
I did have a firstborn.
B. Clay Shannon
25-Jan-16 11:10am
View
I changed JOIN to INNER JOIN and it seemed to solve the problem; I don't know why. I will continue testing to verify it has really been fixed, but so far it looks that way (that was the only change).
B. Clay Shannon
24-Jan-16 18:35pm
View
I don't know what a CTE is.
B. Clay Shannon
24-Jan-16 18:16pm
View
Thanks, I'll czech it out tomorrow.
B. Clay Shannon
24-Jan-16 16:21pm
View
That's probably possible, yes; I'm not really clear on the data and how it relates (no pun intended) to itself, but I think that is a distinct (again, no pun intended) possibility.
B. Clay Shannon
23-Jan-16 19:40pm
View
Which reminds me of the classic James Brown song: "I got ANSI in my PANTSI and I need to DANSI"
B. Clay Shannon
22-Jan-16 19:37pm
View
I agree; but how could it overflow - it doesn't seem possible, based on the code. Are you suggesting that I change the VarChars in my Stored Proc to NVarChars?
B. Clay Shannon
22-Jan-16 19:16pm
View
I'll look; the only tables I created are the temp ones in the Stored Proc, and I thought I mirrored the existing ones they are based on as to data types. Still, though, if that's the problem why would it work at all/ever?
B. Clay Shannon
22-Jan-16 19:07pm
View
Quite possible.
B. Clay Shannon
15-Jan-16 15:06pm
View
Yeah, my bad again; it's the WVItemCode column that should be updated.
B. Clay Shannon
15-Jan-16 14:53pm
View
Sorry, there shouldn't be a "PA" in there; I fixed it.
B. Clay Shannon
15-Jan-16 12:46pm
View
Looks very promising; I'll try that, too.
I looked at it a little closer, and see that it doesn't populate Week2Usage and Week2Price, so that won't work.
B. Clay Shannon
15-Jan-16 12:01pm
View
That helps, thanks.
B. Clay Shannon
15-Jan-16 11:19am
View
Thanks, but that won't work, because the Week2 values are never populated. It's not a simple "OR" situation, otherwise I could make the conditional part "(INVOICEDATE BETWEEN @BegDate AND @EndDate)"
B. Clay Shannon
14-Jan-16 18:47pm
View
I had to prepend "Select" in LINQPad (in the "real" SP, it's an "Update #temp1 Set" that is there.
B. Clay Shannon
1-Jan-16 0:19am
View
It's the same path I used to save the file in the first place, and is there, and has content, so...
B. Clay Shannon
31-Dec-15 15:55pm
View
Is what an array? The .json file?
B. Clay Shannon
12-Nov-15 18:41pm
View
At first I thought this was Welch, but I now realize it's actually Finnish. You should have the perspicacity to translate it into English before posting, you Reindeer musher! Google translate is your friend.
B. Clay Shannon
4-Nov-15 17:50pm
View
Good point. I'll change it and check what happens, although probably nothing yet.
B. Clay Shannon
4-Nov-15 14:48pm
View
I don't know; I'll czech it out - thanks for the link!
B. Clay Shannon
4-Nov-15 12:10pm
View
Windows Forms; I found a solution, thanks (below).
B. Clay Shannon
3-Nov-15 19:13pm
View
There is no "clean" option under Build in VS 2005; I don't know which "Intermediate/output" files to 86.
B. Clay Shannon
3-Nov-15 19:00pm
View
It seems to be only one project, but containing multiple (many dozens) of Reports (*.rdl files); you specify which one is the "Start Item"; so conceptually similar to a multi-project solution. Perhaps that *is* what it is, yes (each report / .rdl corresponds to a "project").
B. Clay Shannon
3-Nov-15 17:58pm
View
I normally run apps from VS by mashing F5. That builds and runs the app (normally).
B. Clay Shannon
3-Nov-15 17:56pm
View
Before; I can also get it to work on a simple app, without the other manipulation as shown above.
B. Clay Shannon
3-Nov-15 13:43pm
View
Yep, that's all it needed, thanks Jochen!
So this works:
var firstMonthCellRng = (MSExcel.Excel.Range)_xlSheet.Cells[7, 3];
firstMonthCellRng.NumberFormat = "@";
_xlSheet.Cells["7", "C"] = monthsTruncatedYears[0];
B. Clay Shannon
3-Nov-15 13:00pm
View
Thanks for your help, Andy; "Tools" is not recognized in my environment. There's no rush on this; it's just a cosmetic issue.
B. Clay Shannon
3-Nov-15 12:24pm
View
I tried this:
var firstMonthCellRng = (MSExcel.Excel.Range)_xlSheet.Cells[7, 3];
firstMonthCellRng.NumberFormat = "0";
_xlSheet.Cells["7", "C"] = monthsTruncatedYears[0];
(I don't want the whole column formatted, these are column headers that only need several cells on one row formatted).
Now, instead of displaying "14-Apr" when it should be "Apr 14" it displays "42108" Was zum Teufel ist hier los?!?
B. Clay Shannon
3-Nov-15 12:08pm
View
I temporarily convert to int to do the math (subtract 1).
B. Clay Shannon
3-Nov-15 12:00pm
View
Thanks, Andy, but "NumberFormat" is not available; the only thing Intellisense offers after "_xlSheet.Cells["7", "C"]." are: ToString, Equals, GetHashCode, and GetType. And if append ".ToString()" to the assignment, it greys out, so is apparently redundant...
B. Clay Shannon
3-Nov-15 11:52am
View
I am adding as a string:
_xlSheet.Cells["7", "C"] = monthsTruncatedYears[0];
What else do I need to do - how do I "format the cell as text"? I would think it would do that by default...
I am using Microsoft.Office.Interop.Excel, v2.0.50727
B. Clay Shannon
29-Oct-15 19:19pm
View
Maybe it's just that I don't know MonthCalendar controls; this is what I did: I dropped a new MonthCalendar on the form. I can see it there "dropped down" - just like the ones that were already there/copied over. And so when I run the app, there it is opened from the git-go (which is not what I want). To set them the same as the exisitng controls, I set AllowDrop to True and Visible to False; however, now I see nothing when I run the app (I can see the icons of the other/original ones; they are glyphs that represent a calendar. I'm wondering now that this is not the norm, and that some magic is going on to display the invisible calendars in this way...?
Aha! That *is* what it is - those glyphs are not the MonthCalendar in "hibernation" (scrolled-up) mode, as I assumed, but Buttons.
So that was it - my unfamiliarity with the MonthCalendar controls, coupled with the calendar-glyphed buttons being hidden behind the MonthCalendar controls at design-time, caused me to misinterpret the situation. Once I realized the buttons were indeed that, and copied over the corresponding Click event handlers for them, it now works - thanks for the nudge in the right direction!
B. Clay Shannon
29-Oct-15 19:00pm
View
Thanks, but the only event is DateSelected, and that has been added, too. It is very odd; the code seems just the same, yet the two projects behave differently in that respect.
B. Clay Shannon
29-Oct-15 14:59pm
View
Yes, I checked both the *.cs and the *.designer.cs, with nothing different (even the name is the same). Both are VS 2013, and I copy-pasted the controls from one form to the other. The MonthCalendars *will* drop down when the associated TextBox is clicked (due to code that does that: monthCalendarBegin.Visible = true;), but there is no "click" event for the MonthCalendar controls themselves.
B. Clay Shannon
1-Oct-15 9:09am
View
Awesome, thanks; I'll try it out.
B. Clay Shannon
30-Sep-15 14:29pm
View
Okay, first step (Meteor) successfully accomplished. I got rid of the jQuery altogether, and am just using this CSS:
#imgPostTravelTop:hover, #imgPostTravelTopRight:hover, #imgPostTravelCenter:hover, #imgPostTravelBottom:hover {
z-index: 4;
-moz-box-shadow: 0 0 7px #000;
-webkit-box-shadow: 0 0 7px #000;
box-shadow: 0 0 7px #000;
border: 1px solid gold;
}
Now on to the Sharepointiness of things.
B. Clay Shannon
30-Sep-15 14:03pm
View
That is applied to several individual images (I searched through the "View Source" for the page), but it doesn't seem to be globally applied...
B. Clay Shannon
30-Sep-15 13:59pm
View
Since IE doesn't support box-shadow, is there a workaround for these delapidated old browsers (which, unfortunately, are still used by a high percentage of users here)?
B. Clay Shannon
30-Sep-15 13:58pm
View
I'm deeming this as a good likelihood, although I don't see it at the immediate level of CSS. There is so much of it in master page CSS files, though, that I can't say for sure.
B. Clay Shannon
30-Sep-15 13:57pm
View
I wonder if the cats behind old versions of IE went on to work for Volkswagen?
B. Clay Shannon
30-Sep-15 13:54pm
View
Good answestion (combination answer and question); I assume you mean something like:
img:hover {
// with the CSS chicanery in here
}
?
I'll try it...
B. Clay Shannon
17-Sep-15 11:55am
View
I have been able to do that - I have a button on the page created in html. Getting it to respond server-side is the problem. I've also tried the opposite - creating the button dynamically in C# - in neither case have I been able yet to get the handler to fire.
As for "There are two ways to resolve this. One is to create it in page load and immediately after adding it to the page, add click handler to it." - I tried what you seem to be suggesting by changing my code above to hook up the event handler AFTER adding the control to the page in the Page_Load() event, but it still does not get fired - the breakpoint in the click event does not get reached.
B. Clay Shannon
16-Sep-15 14:40pm
View
I made the button visible from the git-go, and the click handler still is not reached. Is creating teh control in Page_Load too late?
B. Clay Shannon
16-Sep-15 10:56am
View
It is the button I expect to see, based on its text. So: is there a way to hide the button until I want it visible, and still have it work?
B. Clay Shannon
11-Sep-15 17:44pm
View
No, I don't want everything to center by itself. I want everything to be aligned left, but the whole "box" in which it all fits should be cented. IOW, not like this:
Bla
Bla Bla
...but like this:
Bla
Bla Bla
Well, it doesn't seem to let me show what I mean, but I simply want the left edge to be straight vertically.
B. Clay Shannon
11-Sep-15 13:14pm
View
Yes, I admit it's 9X uglier than a bag of butts. I will have to either learn CSS a lot better, or partner with a CSS wizard.
B. Clay Shannon
10-Sep-15 17:21pm
View
Because changing the values did nothing (good).
B. Clay Shannon
10-Sep-15 16:49pm
View
Which element? As mentioned, I tried this and that on the Nav. The question is: which element, subelement, or class needs which rule[s]?
B. Clay Shannon
26-Aug-15 12:05pm
View
That's not working for me. I tried this HTML:
<td class="skybluebackground centertext"><label class="wrappable">
Total Expenses
</label></td>
(label is wrappable)
With this CSS:
wrappable {
width: 5em;
}
...then, based on your idea, this:
<td class="skybluebackground centertext wrappable"><label>
Total Expenses
</label></td>
With this CSS:
td.wrappable {
width: 5em;
}
...but neither works - the column remains too wide for my purposes, and thus the text doesn't wrap.
I tried this on the table, too:
<COLGROUP WIDTH="48"></COLGROUP>
<COLGROUP WIDTH="32"></COLGROUP>
<COLGROUP WIDTH="32"></COLGROUP>
<COLGROUP WIDTH="32"></COLGROUP>
<COLGROUP WIDTH="32"></COLGROUP>
...but it has no effect.
B. Clay Shannon
11-Aug-15 12:25pm
View
I don't need to style it, I need to assign it a CSS class, so that the jQuery will act on it in certain circumstances. The link you provided showed how to set up styles, but styles != classes.
B. Clay Shannon
11-Aug-15 12:16pm
View
I can set CSS Styles, but setting a CSS Class is a different animal, methinks.
B. Clay Shannon
15-Apr-15 13:42pm
View
I tried that, and the checkbox doesn't appear at all, then. I will probably just add an ancillary "label" (a collection of Chunks added to a Paragraph) aligned to the right of the checkbox.
B. Clay Shannon
5-Jan-15 20:54pm
View
Unfortunately, no go: When I follow these steps, I see no "Create New Release" for my app (which is in the Store). There is a "Create" button, but that is for putting the app on sale for a specified period of time.
B. Clay Shannon
5-Jan-15 15:03pm
View
It certainly should; I'll give it a go tonight. Thanks!
B. Clay Shannon
18-Dec-14 11:41am
View
There are lots of "Kornfeld"s in Iowa.
B. Clay Shannon
17-Dec-14 18:23pm
View
Thanks, that (ReadToEnd) seems to have helped - I've gotten further along (even got some responses back from the server). BTW, based on your name, I perceive you must live in Iowa. I probably drove by your house on my way from Wisconsin to California.
B. Clay Shannon
17-Dec-14 17:33pm
View
As I said, the server's response is fine; I know this, because it works with the legacy client. I'll try to post a scream shot of what Wireshark shows above - there is a long conversation between the client (handheld) and server (PC) (how long depends on how many files are being transferred).
I wasn't able to add the scream shot above, but the conversation that takes place with the legacy client and the existing server can be seen in Update 2 here:
http://stackoverflow.com/questions/27513186/why-am-i-getting-an-endless-until-warmbooted-loop-with-this-code
[
^
]
B. Clay Shannon
17-Dec-14 15:17pm
View
Well, that's just what its display says; it probably does add a newline on its end. At least, whatever it does works in the legacy app, which I'm refactoring. I may have to "bite the bullet" and look at that side of the code (VB - yick!).
B. Clay Shannon
17-Dec-14 13:56pm
View
It "hourglasses" until I warmboot the device.
B. Clay Shannon
17-Dec-14 13:53pm
View
What do you mean, in the "PING|ACKNOWLEDGED|--12/17/2014--9:42:15 AM"?
B. Clay Shannon
17-Dec-14 13:42pm
View
Okay; coffee coming up. Actually, I'm just going to get some hot water, and use it as a handwarmer (it's cold in here!). But, now that I see that those tiny "s"s, I'll edit my question.
B. Clay Shannon
20-Nov-14 18:47pm
View
Odd that "(TextBox)" is grayed out, as if it's redundant, but "(ComboBox)" is not.
B. Clay Shannon
17-Nov-14 9:35am
View
I tried that; when I add "Opened=""" the "Opened" is red (unrecognized). IOW, with this:
<Page.BottomAppBar Opened="">
...Visual Studio tells me, "Opened! What are you talking about?!?" (silently, but sometimes inaction speaks louder than words).
I tried giving it a name, too:
<Page.BottomAppBar x:Name="bottomAppBar" Opened="bottomAppBar_Opened" >
...and trying to navigate to the method, but it tells me that it can't go there.
B. Clay Shannon
13-Nov-14 18:24pm
View
Yep, that works:
Packers pickedAPeckOfPickledPeppers = Packers.Julius_Peppers;
String s = Enum.ToObject(typeof(Packers), pickedAPeckOfPickledPeppers).ToString();
MessageBox.Show(String.Format("Packer passed is {0}", s));
B. Clay Shannon
13-Nov-14 17:52pm
View
Strange...it won't compile, not does it afford me a "Resolve" with the context menu...maybe because the target platform is Windows CE; I should have mentioned that, I reckon.
B. Clay Shannon
4-Nov-14 9:32am
View
On second thought, this:
SELECT * FROM PhotraxBaseData WHERE dateTimeTaken BETWEEN CONVERT(DATETIME,'2009-11-11') AND CONVERT(DATETIME,'2014-11-11');
...doesn't even run in LINQPad. It gives me, "SQLite error
no such column: DATETIME"
B. Clay Shannon
4-Nov-14 9:27am
View
Thanks; a side question: was the ending semicolon deliberate? I've never used that in SQL statements, but I've seen people use it. What is the benefit?
B. Clay Shannon
3-Nov-14 0:55am
View
That also returns no records in LINQPad; I'll try it later on the actual SQLite data.
B. Clay Shannon
2-Nov-14 19:27pm
View
I tried this:
internal static DateTimeOffset GetLatestDate()
{
object dto;
using (var db = new SQLite.SQLiteConnection(App.DBPath))
{
string sql = "SELECT MAX(dateTimeTaken) FROM PhotraxBaseData";
dto = db.ExecuteScalar<object>(sql);
}
return (DateTimeOffset)dto;
}
...but it fails with, "System.NotSupportedException was unhandled by user code
. . . Message=Don't know how to read System.Object"
This works without crashing:
internal static DateTimeOffset GetLatestDate()
{
object dto;
using (var db = new SQLite.SQLiteConnection(App.DBPath))
{
string sql = "SELECT MAX(dateTimeTaken) FROM PhotraxBaseData";
dto = db.ExecuteScalar<datetimeoffset>(sql);
}
return (DateTimeOffset)dto;
}
...but I still end up with "1/1/0001" as the value in dto.
All of the records in photraxbasedata contain date values, no nulls, no empty strings; the oldest date is 2008 and the newest 2014.
I then tried to make this code more like other working code, and changed it to this:
internal static DateTimeOffset GetLatestDate()
{
DateTime dto;
List<PhotraxBaseData> psets = new List<PhotraxBaseData>();
using (var db = new SQLite.SQLiteConnection(App.DBPath))
{
string sql = "SELECT MAX(dateTimeTaken) FROM PhotraxBaseData";
psets = db.Query<PhotraxBaseData>(sql);
}
dto = from a in psets select a.dateTimeTaken;
return dto;
}
...but get, "Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<system.datetime>' to 'System.DateTime'"
What? Why convert to itself. Or is there a difference between the pithy DateTime and the loquacius DateTime?
B. Clay Shannon
31-Oct-14 16:41pm
View
This works just dandy:
internal static List<string> GetPhotosets()
{
List<PhotraxBaseData> psets = new List<PhotraxBaseData>();
using (var db = new SQLite.SQLiteConnection(App.DBPath))
{
string sql = "SELECT photosetName FROM PhotraxNames ORDER BY PhotosetName";
psets = db.Query<PhotraxBaseData>(sql);
}
List<string> setnames = (from a in psets select a.photosetName).ToList();
return setnames;
}
Thanks!
B. Clay Shannon
31-Oct-14 10:46am
View
Thanks; I'm on the case.
B. Clay Shannon
30-Oct-14 19:56pm
View
Yeah, I should have mentioned that I right-clicked "SqliteConnection" and there was no "Resolve" available.
B. Clay Shannon
30-Oct-14 13:35pm
View
They both use a list; one a list of PhotraxBaseData, and the other a list of String.
B. Clay Shannon
30-Oct-14 13:19pm
View
Thanks, I'll check that (can't know; I'm at work).
But wouldn't I still have the "'string' must be a non-abstract type with a public parameterless constructor in order to use it as parameter 'T' in the generic type or method 'SQLite.SQLiteConnection.Query(string, params object[])'" compile-time err msg?
B. Clay Shannon
29-Oct-14 16:47pm
View
I'm glad your response was not tepid.
B. Clay Shannon
29-Oct-14 15:21pm
View
5ed.?
B. Clay Shannon
29-Oct-14 14:53pm
View
Too bad it's not available on WinRT - that does look like an excellent solution! Thanks, anyway - maybe somebody else will find your answer and be able to use it.
B. Clay Shannon
29-Oct-14 14:21pm
View
So I'm thinking maybe an OnCreated() (or similar) method of the flyout. I can't check now (not at a Windows 8 machine), but I hope there is some event like that where I can call the query. That would be the easiest way, I reckon. It doesn't need to be "two-way" - I'm only getting a List of String and displaying them, that's all.
B. Clay Shannon
29-Oct-14 13:44pm
View
Odd that (based on Richard Deeming's link) it doesn't show you a value; greyed out is one thing, but veiling the value is another.
B. Clay Shannon
29-Oct-14 8:40am
View
My understanding is that it is preferable to use binding where possible. If "real code" is the preferred method, how about an example?
B. Clay Shannon
27-Oct-14 18:52pm
View
Sounds handy, but I doubt it will work on my project (Visual Studio 2003, running in XP Mode).
B. Clay Shannon
12-Mar-14 19:48pm
View
I don't know - that exception is not being thrown.
B. Clay Shannon
12-Mar-14 19:28pm
View
"Greyed out" means that, in Visual Studio, the text in question is grey, indicating that it's superfluous (it compiles, but it's unnecessary/redundant/a no-op).
B. Clay Shannon
1-Aug-13 12:16pm
View
That shows me: "There is a file sharing violation. A different process might be using the file [,,,,,]"
B. Clay Shannon
1-Aug-13 12:11pm
View
Good idea; I'll try that.
B. Clay Shannon
1-Aug-13 10:06am
View
Yep, that worked. This:
string s = "JOHN WAYNE";
s = s.ToLower();
s = rightCase(s);
MessageBox.Show(s);
...showed "John Wayne"
B. Clay Shannon
1-Aug-13 4:58am
View
Nope, this:
private string rightCase(string goofyStr)
{
TextInfo textInfo = new CultureInfo("en-US",false).TextInfo;
return textInfo.ToTitleCase(goofyStr);
}
...didn't work; they remain uppercase.
Nor did this:
string s = CultureInfo.CurrentCulture.TextInfo.ToTitleCase("ARGO");
MessageBox.Show(s);
(Message box showed "ARGO")
B. Clay Shannon
31-Jul-13 17:18pm
View
I changed the exception code in the TableExists() method to:
catch (Exception ex)
{
MessageBox.Show("TableExists ex.Message == " + ex.Message);
MessageBox.Show("TableExists ex.ToString() == " + ex.ToString());
MessageBox.Show("TableExists ex.GetBaseException() == " + ex.GetBaseException());
return false;
}
...and now see:
TableExists ex.Message ==
TableExists ex.ToString() == System.Data.SqlServerCe.SqlCeException at System.Data.SqlServerCe.SqlConnection.ProcessResults(Int32 hr) at ...at Open(boolean silent) ...
TableExists ex.GetBaseException() == [same as ex.ToString() above]
Int32 hr ... ???
B. Clay Shannon
31-Jul-13 16:50pm
View
It fails prior to the Create code, though; it fails with TableExists() first.
B. Clay Shannon
31-Jul-13 16:49pm
View
I assume SMS is "SQL Management Studio"* or something like that, but I don't think I have that in my setup (XP Mode, .NET1.1, Visual Studio 2003). * Binging it gave me "Short Message Service"
B. Clay Shannon
31-Jul-13 16:43pm
View
Because it's a Windows CE project using archaic technology. I must build, copy, install on the handheld, and run it to test.
B. Clay Shannon
31-Jul-13 16:42pm
View
Read the end of the post.
Show More