Click here to Skip to main content

Comments by PIEBALDconsult (Top 200 by date)

PIEBALDconsult at 6 hrs ago View
Sounds like homework.
PIEBALDconsult at 13 hrs ago View
"continue with displaying the main form"
But I could write my own application that adds his EXE as a reference and simply bypasses the Login form and Runs the main form. :D
PIEBALDconsult at 17 hrs ago View
I suppose that depends on how you handle whitespace characters -- you didn't specify. Your question seems like homework, so I don't want to say too much. Give it some thought.
PIEBALDconsult at 18 hrs ago View
Then step through with a debugger to see what actual values are being used.
PIEBALDconsult at 18 hrs ago View
:cough: Order of operations :cough:
And please don't use Convert, use Int32.TryParse instead. Better yet, use a NumericUpDown rather than a TextBox.
PIEBALDconsult at yesterday View
In the debug routine, I suspect you need another way to exit the inner while loop.
PIEBALDconsult at yesterday View
Well, a circular linked list would have one loop containing all the elements. :shrug:
PIEBALDconsult at yesterday View
I don't see why you would want a class to use Reflection to get its own members.
Have you looked into writing a copy constructor?
PIEBALDconsult at yesterday View
You will likely need to execute the method many times (millions) to get a usable result.
Also, you need to ensure that the result of the execution is used or the compiler may optimize away the whole thing leaving you with a very short execution time.
PIEBALDconsult at 4 days ago View
If SQL Server, look into using a Table Valued Parameter.
PIEBALDconsult at 4 days ago View
I assume the DataGridView is bound to a DataTable. (It should actually be bound to the DefaultView of the DataTable.) You should be able to set the RowFilter property of the DefaultView.
sometable.DefaultView.RowFilter = "somedate BETWEEN '2014-08-01' AND '2014-08-31'"
Some experimentation may be required.
PIEBALDconsult at 16-Sep-14 14:20pm View
Remember that NULLs won't pass any test but IS NULL.
Another concern is testing VARCHARs that contain trailing SPACEs.
Check your values. Post examples if necessary (use Improve Question).
PIEBALDconsult at 15-Sep-14 18:36pm View
What about "aBmNcDxYeF" ? If not, then you probably don't want to use \G at least try removing them.
I also notice that although it "matches", it doesn't capture anything, so it's really only matching a empty string.
What about: @"(aB)+(cD)+(eF)+"
PIEBALDconsult at 15-Sep-14 15:14pm View
"so it can be sent to my server"
As you said in your post "it wouldn't be connected to any networks" so how do you propose to do that? Even if so, the last known location of it is of little use after ten seconds or so as the thief is executing "get somewhere safe where they can't get caught". A thief of any intelligence will have powered it off (even removed the battery if possible) and probably removed the drive before arriving at his lair.
I think you are assuming a very stupid thief.
PIEBALDconsult at 15-Sep-14 14:46pm View
If I stole your computer, the first thing I'd do is wipe the drive and/or install a new one.
If someone trying to get your data stole it, I assume they'd pull the drive and attach it to some other system.
In neither case will your software run at all.
PIEBALDconsult at 15-Sep-14 14:04pm View
It looks like they're being sorted as strings rather than as numbers. Ensure that the table contains numeric data.
PIEBALDconsult at 13-Sep-14 11:42am View
So go do it. One step at a time. And as SA says, don't put all the code in one class -- use a layered approach.
PIEBALDconsult at 12-Sep-14 20:35pm View
He didn't encode the angles. Fixed.
PIEBALDconsult at 12-Sep-14 13:27pm View
Could you at least provide some context and links to whatever resources you have tried so far?
(Use the "Improve Question" button.)
PIEBALDconsult at 12-Sep-14 12:01pm View
I would try apostrophes, but this shows another option.
Also be aware that System.Data.OracleCilent is not recommended. "This types in System.Data.OracleClient are deprecated and will be removed in a future version of the .NET Framework"
Try Oracle's provider --
DEVART's provider --
PIEBALDconsult at 12-Sep-14 11:15am View
Do you expect different answers from your similar question the other day?

Please explain why you want to know such things.
PIEBALDconsult at 12-Sep-14 0:38am View
You don't indicate where the ExcelPackage class comes from -- which DLL do you reference? This could be a limitation of that library.
When I write Excel I use the OleDb provider and I have no trouble. Other people have had good results with EPPLUS --
PIEBALDconsult at 12-Sep-14 0:22am View
If you want to use a string, might I suggest you use an ISO 8601-compliant "Duration" format?
PIEBALDconsult at 10-Sep-14 12:31pm View
Without asking for confirmation? Might not be a good idea.
PIEBALDconsult at 10-Sep-14 12:15pm View
Do you mean add an entry to the ContextMenu that comes up when the user right-clicks?
PIEBALDconsult at 9-Sep-14 10:43am View
That mainly depends on how flexible you allow the connection string to be. But Access isn't a very good choice; you will likely find that another database system, particularly one that is not file-based, works better across a network.
PIEBALDconsult at 3-Sep-14 15:40pm View
Which it is unlikely to encounter in a DataTable/Row/Cell.
PIEBALDconsult at 3-Sep-14 9:32am View
And the code you show will handle DBNull.Value properly?
PIEBALDconsult at 2-Sep-14 23:43pm View
That's the best one so far.
PIEBALDconsult at 2-Sep-14 23:42pm View
Get the Convert out of there; just cast it.
PIEBALDconsult at 2-Sep-14 10:37am View
Because they're trigger-happy.
PIEBALDconsult at 1-Sep-14 21:42pm View
Showing us the code might help. (Use "Improve Question".)
PIEBALDconsult at 28-Aug-14 19:59pm View
Never occured to me until now. But I often use Join after spawning off a bunch of threads.
PIEBALDconsult at 28-Aug-14 16:07pm View
It's simple enough. Where are you stuck?
PIEBALDconsult at 27-Aug-14 1:21am View
Use Improve Question to include the code you have so far. Some sample data might help as well.
PIEBALDconsult at 27-Aug-14 1:06am View
Sounds like homework. What have you tried?
PIEBALDconsult at 27-Aug-14 1:06am View
What's the point of the Convert.ToInt32 ? 5 + 2 is already an Int32.
PIEBALDconsult at 26-Aug-14 13:23pm View
Have you considered using DateTimePicker rather than a TextBox?
PIEBALDconsult at 24-Aug-14 14:54pm View
"how would I do so?" Apparently you wouldn't.
PIEBALDconsult at 22-Aug-14 15:21pm View
Other than swallowing the original Exception (which might help you to figure out what's going wrong), that looks OK.
What problem are you having?
PIEBALDconsult at 22-Aug-14 15:01pm View
Of course you can, but we don't know what a CommonMethods is -- as far as I can tell it's a class you created and it may be causing you trouble.
Can you share the relevent code?
PIEBALDconsult at 22-Aug-14 12:42pm View
If you trying to write malware, a key logger, etc., no.
PIEBALDconsult at 22-Aug-14 10:50am View
PIEBALDconsult at 22-Aug-14 10:41am View
Maybe you should use SSIS.
PIEBALDconsult at 22-Aug-14 10:23am View
With the use of DHCP, IP addresses aren't very useful for identification purposes.
What code do you have now?
Is this a business situation with a DNS server?
PIEBALDconsult at 22-Aug-14 9:30am View
If the server is on another box, the port may not be open.
PIEBALDconsult at 19-Aug-14 19:50pm View
The debugger is your friend.
PIEBALDconsult at 15-Aug-14 17:39pm View
Are you saying that you need to modify the behavior of server/service but that you don't have the source code?
PIEBALDconsult at 15-Aug-14 10:51am View
Yes, many ways to reach the goal. I think this way yields a better separation of concerns.
PIEBALDconsult at 14-Aug-14 19:06pm View
He asked about encrypting some values in an XML file; that came readily to hand.
As with a similar post recently, it won't stop others from reading, but it may stop them from understanding what they read.
PIEBALDconsult at 14-Aug-14 16:16pm View
I'm in Phoenix; I never chill. :D
PIEBALDconsult at 14-Aug-14 15:40pm View
I think they're more newbie-friendly, of the type that stunts their growth (like BASIC does :D ), but that's how I view all of Linq anyway.
When using an XmlNode, and its ilk, SelectNodes(String) does the heavy lifting, you don't really need anything else.
I suppose there may be people out there who take the same view of XPath as some do of Regular Expressions -- "now you have two problems".
PIEBALDconsult at 14-Aug-14 15:18pm View
The point is that XPath support requires an extension when they went to all the trouble of implementing the others in the class.

It seems to me that all or most of {DescendantNodes, Descendants(), Descendants(XName), Element, Elements(), Elements(XName), ElementsAfterSelf(), ElementsAfterSelf(XName), ElementsBeforeSelf(), ElementsBeforeSelf(XName), Nodes, NodesAfterSelf, NodesBeforeSelf } can be implemented with XPath (and probably are) -- why not put the XPath method in the class and implement the others as Extensions?

I don't expect you to have the answer, of course, unless the answer is tequila.
PIEBALD goes off to look at the privates of an XContainer...
PIEBALDconsult at 14-Aug-14 15:02pm View
That is such a basic function of XML, why would it not be built-in? The mind boggles. I always use XmlDocument.
PIEBALDconsult at 14-Aug-14 14:53pm View
Alas, it doesn't support XPath; more reason not to use XElement.
I'm sure this came up here recently.
PIEBALDconsult at 13-Aug-14 18:40pm View
I'm thinking you'll need to open a socket to the scale.
I expect you'll need an
PIEBALDconsult at 13-Aug-14 16:05pm View
We don't acknowledge that site.
PIEBALDconsult at 13-Aug-14 15:46pm View
Does it need to support only Excel 2007 and newer?
There are many articles here on CP that deal with reading and writing Excel files. Seek and you shall find.
PIEBALDconsult at 13-Aug-14 15:42pm View
When it's turned off?
And let's think about it a little bit. You say "when there is enough charge" --
So if you turn it off while it has "enough charge" it will just turn right back on?
The only way for the charge to increase is when it's plugged in to power -- why not turn it on as soon as you plug it in?
And are we talking about your own phone? Or someone else's? I doubt someone wants your app to turn their phone on unexpectedly, unless that's the whole purpose of the app, in which it's too bad it won't work.
PIEBALDconsult at 13-Aug-14 15:11pm View
I suspect you already have, but just don't know where it is.
PIEBALDconsult at 13-Aug-14 13:50pm View
I haven't used a DataAdapter (ptui) in many years. If I recall correctly...
The commands will be set if you pass the query to the constructor, so you don't need to do it again.
You may need to use AcceptChanges before calling Update.
You don't actually need to open the connection when using a DataAdapter.
But what may be happening is if there is no dataSet.Tables[0].Rows[1].ItemArray[2] then you may be getting an index out of range exception and the Update won't be called.
Try using the debugger to step through the code.
PIEBALDconsult at 13-Aug-14 13:28pm View
Try SQL Server Express.
PIEBALDconsult at 13-Aug-14 13:28pm View
"needs to has on his pc" -- Not necessarily "on", but "available to".
PIEBALDconsult at 13-Aug-14 13:16pm View
Speaking in the broader sense.
PIEBALDconsult at 13-Aug-14 13:01pm View
Hear! Hear! This question comes up here frequently, and this is the correct answer.
5) The customer may want or already have SQL Server running on a different system (server) and not want it installed on the client system.
PIEBALDconsult at 13-Aug-14 12:55pm View
Sounds like homework.
PIEBALDconsult at 13-Aug-14 10:31am View
Glad to be of service.
PIEBALDconsult at 12-Aug-14 20:28pm View
"I'm comparing table contents from 2 different databases and sync them."
You may need to check whether or not the difference between the values is within some threshold -- like two values that differ by two seconds or less are considered equal.
PIEBALDconsult at 12-Aug-14 18:49pm View
"change format to include milliseconds" won't help you if the data is already lost; the DateTime has no format.
Determine the datatypes of the columns in the databases, both should be able to hold partial seconds. And which database systems? SQL Server?
If only one can hold partial seconds then you'll have to ignore partial seconds on the other if you want to be able to compare.
Once precision is lost, you can't get it back -- it's not a simple matter of "formatting".
PIEBALDconsult at 12-Aug-14 18:41pm View
"outrageously pointless"
That's my conclusion. Chasing the wrong bug.
PIEBALDconsult at 12-Aug-14 18:39pm View
element[i] = ((DateTime)element[i]).ToString("MM/dd/yyyy HH:mm:ss.fff");
That should work if you want the data to be a string, but I see no reason to do so.
If you are inserting to a database, ensure that the datatype can hold the milliseconds
If you are using SQL Server use the DATETIME (or DATETIME2) datatype.
SMALLDATETIME in particular does not store partial seconds.
PIEBALDconsult at 12-Aug-14 18:31pm View
No you didn't.
PIEBALDconsult at 12-Aug-14 18:28pm View
"the string content" -- His code determines that the content is a DateTime, not a string. Then it tries to ToString and Parse it back to a DateTime -- which, at best, leaves the content unchanged. I can only assume that he is doing it to try to format the DateTime differently, but that's impossible.
PIEBALDconsult at 12-Aug-14 17:59pm View
Learn XPath.
PIEBALDconsult at 12-Aug-14 12:36pm View
I hope you're not trying to spy on someone.
PIEBALDconsult at 12-Aug-14 12:30pm View
We won't do your homework for you.
PIEBALDconsult at 12-Aug-14 11:37am View
It is a string already; you don't need to convert it.
In fact, please avoid using Convert entirely; most beginners use Convert because they don't understand what they're doing.
PIEBALDconsult at 11-Aug-14 21:16pm View
That might require parentheses.
PIEBALDconsult at 11-Aug-14 16:16pm View
Plus, an attacker will know to only try eight-character passwords, making his job easier. :D
PIEBALDconsult at 8-Aug-14 12:52pm View
What makes you think it hasn't stopped already?
PIEBALDconsult at 8-Aug-14 12:23pm View
A service might work, but, no, you can't just convert an app to a service.
Might a Windows Scheduled Task work for you?
PIEBALDconsult at 7-Aug-14 12:58pm View
Generally, that's not a very reasonable thing to do. The thing is, you can check, and maybe the check succeeds. Then the connection dies. Then you try sending and the send fails -- you have to handle that, so the check was a waste of time.
Or you check and the check fails, but then the connection recovers.
Whether you're checking for network or database or a file or disk, it's better just to try it and see whether or not it fails. Doing otherwise is just a waste of effort, in time, in development, in testing, in maintenance.
In the case you mention, what if the connection is live, but the SMTP server isn't or refuses the connection? There are a lot more things that can go wrong than just "no connection to the Internet".
Try it, and handle any Exception that results -- you have to anyway.
PIEBALDconsult at 7-Aug-14 11:25am View
Yes, the for statements themselves are OK; it's the indexing into an empty array that is the issue.
PIEBALDconsult at 7-Aug-14 10:39am View
PIEBALDconsult at 7-Aug-14 10:37am View
I don't think that will even compile anyway.
PIEBALDconsult at 6-Aug-14 17:38pm View
The loops are not the problem.
PIEBALDconsult at 6-Aug-14 15:15pm View
You can't without knowing how many you need. You might want a List instead.
But as with the question yesterday, this doesn't appear to be the best technique to achieve your goal.
PIEBALDconsult at 6-Aug-14 15:12pm View
This appears to be a follow-on to this:
PIEBALDconsult at 6-Aug-14 0:38am View
You don't want parentheses inside the brackets.
Unrecognized escape sequence \_.
That site doesn't appear to have a .net setting.
PIEBALDconsult at 5-Aug-14 23:47pm View
Let's see it now.
PIEBALDconsult at 5-Aug-14 23:07pm View
The connection you are using has no connection string.
PIEBALDconsult at 5-Aug-14 22:57pm View
OK, so what's wrong now? Have you steppef through it with the debugger?
PIEBALDconsult at 5-Aug-14 22:55pm View
You still need to add parentheses after new MySqlCommand
PIEBALDconsult at 5-Aug-14 22:29pm View
You'll also want a semi-colon. Can you update/improve the question with what you have now?
PIEBALDconsult at 5-Aug-14 22:23pm View
Add the parentheses where they belong.
PIEBALDconsult at 5-Aug-14 16:11pm View
Well then at least give the user the option.
PIEBALDconsult at 5-Aug-14 14:58pm View
With an antivirus there is usually the background part that the user doesn't interact with (and can't close) and the UI part which he can -- these two parts should not be in the same process.
PIEBALDconsult at 5-Aug-14 14:12pm View
"they do not know the importance of program"
You don't get to decide that for the users. The users know how important it is for them.
PIEBALDconsult at 5-Aug-14 13:39pm View
"read the profile picture"
From where? Active Directory? Registry?
PIEBALDconsult at 5-Aug-14 13:37pm View
Is that supposed to be a Regular Expression? An SQL LIKE pattern? Or What? We need more context.
PIEBALDconsult at 5-Aug-14 13:19pm View
I've only been using SSIS for a couple of years so far, and only writing to Excel a few times, and I can't think of a way to do that.
I would write a console utility or, at most, a Script Task in SSIS to do it.
Perhaps you should more clearly specify what you are trying to do and why you are trying to do it.
Bear in mind that an SSIS package, once written, is very rigid.
PIEBALDconsult at 5-Aug-14 11:35am View
Then don't bother starting. Find something within your abilities, eventually (years from now perhaps) you should have necessary skills.
PIEBALDconsult at 5-Aug-14 11:29am View
OK, I'll let you off easy this time. I keep the links I posted in a bookmark because I have to post them so frequently. :(
PIEBALDconsult at 5-Aug-14 11:18am View
Ooooh, sorry, that links to another site. Naughty naughty.
PIEBALDconsult at 5-Aug-14 10:41am View
Is that what your users want? I don't like applications that do that (e.g. Lync). When I say "close", just frackin' _close_ already! If I want you to minimize, I'll _tell_ you to minimize.
PIEBALDconsult at 5-Aug-14 10:18am View
Unclear. Do you just want to see a list of columns? Or do you want to see the rows as well?
PIEBALDconsult at 5-Aug-14 10:17am View
In QA? No. But many articles are of the "tutorial" type.
If you have something to teach, write an article.
PIEBALDconsult at 4-Aug-14 19:30pm View
Sure if you have a specific question, generally pertaining to some code you are working on.
PIEBALDconsult at 4-Aug-14 19:29pm View
I don't see a question.
PIEBALDconsult at 4-Aug-14 18:40pm View
He'll be back. They always come back.
PIEBALDconsult at 4-Aug-14 17:16pm View
I don't yet know whether or not it's the answer. :D
PIEBALDconsult at 4-Aug-14 17:13pm View
That syntax looks very strange to me.
Why isn't the function using its parameters?
Why have a class?
Note to others; this appears to be a follow-on to this:
PIEBALDconsult at 4-Aug-14 16:54pm View
In my experience, CASEs are unable to result in a boolean.
So try having them produce a 0 or 1 and test for it.
WHERE CASE something THEN 1 ELSE 0 END = 1
PIEBALDconsult at 4-Aug-14 15:26pm View
Oh, come on, how am I supposed to remember something I wrote thirty years ago? Well, OK, I have it written down in my BASICplus book from high school. :D
Except mine was to display the content of a matrix on a VT100 screen and I wanted to do something more interesting than left-to-right, top-to-bottom.
As I recall I had a number of for/next loops -- one to go across the top, one to go down the right, one to go across the bottom, one to go up the left, and repeat.
PIEBALDconsult at 4-Aug-14 15:11pm View
How is it used by the SQL procedure?
PIEBALDconsult at 4-Aug-14 14:44pm View
"a bit different"
You mean worse?
Has anyone asked you to do this? Why do you think people would want this?
PIEBALDconsult at 4-Aug-14 11:57am View
I considered adding an "at most" qualifier.
PIEBALDconsult at 4-Aug-14 11:41am View
Please tell me you aren't trying to override the settings that the user has set. An application that modifies such settings is, by definition, malware.
PIEBALDconsult at 4-Aug-14 11:29am View
By "after the 'while' loop" do you mean the if statement? Or do you mean the contents of the while loop?

Personally, I would iterate the digits in the string rather than use the loop you have.
I also see opportunities to short-circuit the process.
I'll also point out that that code will only work for three-digit base-10 values.
PIEBALDconsult at 4-Aug-14 10:31am View
You got luck this time. :D
PIEBALDconsult at 3-Aug-14 21:51pm View
Ah, then yes, a Timer may not be enough, but I can't see a way to get what you want.
Please update/improve your question by adding this detail to it.
PIEBALDconsult at 3-Aug-14 21:48pm View
"leaves the change undetected"
Sure, but I don't think that matters to the OP in this case. I read it as he wants to know the current state, regardless of how many changes are made.
If he wants to know every change, then I see no way to accomplish that without support from the class.
PIEBALDconsult at 3-Aug-14 17:22pm View
PIEBALDconsult at 1-Aug-14 18:06pm View
Spam/ad filter? QA post decipherer?
PIEBALDconsult at 1-Aug-14 13:41pm View
I seem to recall seeing this question yesterday. Did you delete it and repost it?
PIEBALDconsult at 1-Aug-14 13:26pm View
Please update/improve the question with the current state of the code.
I hope you are storing the date as a date and not as a string.
PIEBALDconsult at 1-Aug-14 13:00pm View
Try the ternary operator.
PIEBALDconsult at 31-Jul-14 23:53pm View
Then you need to Read from the reader.
PIEBALDconsult at 31-Jul-14 16:51pm View
But, but, it's Python. It's easy, he'll be an expert in next to no time at all.
_I_ felt forced to learn C# (and therefore .net) when I could no longer get a C job on OpenVMS. It was either that or Linux. :ptui:
Seriously, _why_ he's learning it doesn't matter, as long as he learns it and has something worthwhile* to share.
* E.g. Not a number-to-word converter.
PIEBALDconsult at 31-Jul-14 15:42pm View
Yes. And also check out this recent thread:
PIEBALDconsult at 31-Jul-14 0:34am View
So far so good, now call Move.
PIEBALDconsult at 30-Jul-14 11:30am View
Is there a trigger involved?
PIEBALDconsult at 30-Jul-14 10:47am View
That depends on the application.
PIEBALDconsult at 29-Jul-14 10:35am View
I sure hope that "in your datatable" it is a DateTime and not a string.
PIEBALDconsult at 29-Jul-14 10:34am View
Two-digit hour?
PIEBALDconsult at 29-Jul-14 1:17am View
"stops working" doesn't tell us much.
PIEBALDconsult at 29-Jul-14 1:00am View
I assume it's some convoluted security-through-obscurity scheme that some other developer on his project devised. It looks very very bad.
PIEBALDconsult at 29-Jul-14 0:54am View
It looks like he got this in C/C++ and wants it translated, but doesn't know either language.
Translating the code to C# is simple. Translating to English is pretty much impossible.
PIEBALDconsult at 29-Jul-14 0:21am View
I don't think that's a proper CRC algorithm. Where did you get it?
Rewriting it in C# should be fairly trivial because only the array access parts should need to be changed.
PIEBALDconsult at 28-Jul-14 23:23pm View
PIEBALDconsult at 28-Jul-14 22:31pm View
Seems easy enough. So what problem do you have?
PIEBALDconsult at 28-Jul-14 19:59pm View
Because that's what you asked for?
PIEBALDconsult at 28-Jul-14 10:58am View
What would that have to do with WPF or C#? It's simply an algorithm issue, it can be implemented many ways.
PIEBALDconsult at 28-Jul-14 9:00am View
Write two procedures?
PIEBALDconsult at 27-Jul-14 16:54pm View
You mean other than using a better language? :D
PIEBALDconsult at 27-Jul-14 16:52pm View
I don't like the two ifs and two checks of IsAvailable, but at least you eliminated a while.
PIEBALDconsult at 27-Jul-14 11:36am View
If it's on the client's system, then he should have full access to it.
I would never install an app with a database without having the ability to maintain it.
At most, put some restrictions in the licence about what they can and can't do.
PIEBALDconsult at 27-Jul-14 11:33am View
Whatever you use to display/process rows from the DataTable, get in the habit of using the DefaultView property of the DataTable rather than the DataTable itself.
Then set the RowFilter.
And I hope you're not storing date/time data as strings.
PIEBALDconsult at 27-Jul-14 11:29am View
A DataTable also has a DefaultView property, so you don't absolutely need to create a new one.
PIEBALDconsult at 26-Jul-14 2:15am View
"i have to convert it into 12 hour format"
PIEBALDconsult at 26-Jul-14 1:57am View
"I configured the source editor to my DB and selected the table I had just created"
It sounds like you are copying from an empty table.
Unfortunately SSIS and BIDS don't really lend themselves to this kind of forum, so I'm not sure how much we'll be able to help.
PIEBALDconsult at 26-Jul-14 1:51am View
Sounds like homework. We don't do that here.
And it doesn't include how many of each type.
PIEBALDconsult at 25-Jul-14 18:53pm View
Some indication of the expected result and actual result would help. And I don't think you should need to include so much of the XML.
PIEBALDconsult at 25-Jul-14 18:49pm View
PIEBALDconsult at 25-Jul-14 12:15pm View
You might want to move Double soamt = 0;
inside the first foreach.
PIEBALDconsult at 25-Jul-14 11:33am View
"I would still have to attach to the database"
In the application, yes.
"Right now I use LINQ"
If that works for you, then stick with it. (I don't use Linq.)
You can also read this:

But none of that requires "accessing the database from VS".
PIEBALDconsult at 25-Jul-14 11:23am View
If it's a file access issue you should be able to correct it in Explorer. I've had to do that with Sql Server database files.
PIEBALDconsult at 25-Jul-14 10:09am View
"This is an application that needs access to a db through Visual Studio"
No it doesn't. You can develop the application in VS, but that doesn't mean it needs to use VS when running, so I really don't understand what problem you think you have.
PIEBALDconsult at 25-Jul-14 9:52am View
You don't even need to use VS at all; I generally don't.
PIEBALDconsult at 24-Jul-14 19:41pm View
The debugger is more likely to help you.
PIEBALDconsult at 24-Jul-14 18:15pm View
"a function parts()"
That's not a function; that's indexing.
PIEBALDconsult at 24-Jul-14 18:13pm View
You'll need to show the code. Where are you opening the file? I expect that you will need to hold the file in a field to get it to work.
PIEBALDconsult at 24-Jul-14 18:09pm View
Try stepping through it with the debugger.
PIEBALDconsult at 24-Jul-14 12:26pm View
I see no point in accessing a database directly from Visual Studio so I don't do it. Use VS for code work and SSMS for database work.
PIEBALDconsult at 23-Jul-14 19:16pm View
PIEBALDconsult at 23-Jul-14 17:57pm View
Who is this directed at? If it's just a general rant, then maybe "Weird and Wonderful" would be a good spot for it. If you are having trouble with this site, then Bugs and Suggestions would be the proper forum.
PIEBALDconsult at 23-Jul-14 16:05pm View
So, what's the "unresolved external symbol"?
PIEBALDconsult at 23-Jul-14 14:50pm View
"based on triggers"
Not a good idea, and I don't see why it would be related to C++ .
PIEBALDconsult at 23-Jul-14 13:46pm View
What's an "nfc"? More information is required.
PIEBALDconsult at 23-Jul-14 13:44pm View
Why do you have
[PluginID] [int] IDENTITY(1,1) NOT NULL
? That seems wrong.
PIEBALDconsult at 23-Jul-14 1:04am View
I'd use a Script Task. But why use SSIS at all?
PIEBALDconsult at 22-Jul-14 16:07pm View
All email addresses are unique.
return true
PIEBALDconsult at 22-Jul-14 15:20pm View
Is it really one byte per property? Have you tried writing only one property? Have you examined the contents of the file?
PIEBALDconsult at 22-Jul-14 12:15pm View
Try storing the XML in a local variable so you can examine it before passing it to Send.
PIEBALDconsult at 22-Jul-14 12:11pm View
Ah, my eyes aren't awake yet. Thanks.
PIEBALDconsult at 22-Jul-14 11:36am View
You still show mal-formed XML.
PIEBALDconsult at 22-Jul-14 11:21am View
The problem I pointed out still exists.
PIEBALDconsult at 22-Jul-14 11:16am View
So what do you have now?
PIEBALDconsult at 21-Jul-14 11:00am View
PIEBALDconsult at 20-Jul-14 11:08am View
Don't cross-post:
PIEBALDconsult at 19-Jul-14 17:18pm View
Pick one. In fact, just use "improve question" to ask it here.
PIEBALDconsult at 19-Jul-14 14:01pm View
Be sure to store the salt or you're stuck.
PIEBALDconsult at 18-Jul-14 22:03pm View
Turn it off and turn it back on again?
PIEBALDconsult at 18-Jul-14 19:36pm View
"They are not music, more like lectures."

Wink wink, nudge nudge, say no more.
PIEBALDconsult at 17-Jul-14 18:15pm View
What language? What error do you get?
PIEBALDconsult at 17-Jul-14 14:41pm View
I think Solution 3 is correct.
I'll also point out that you don't need to specify the datatype for the parameters. You could use AddWithValue.
PIEBALDconsult at 16-Jul-14 20:10pm View
I'm not about to click on those links.
PIEBALDconsult at 16-Jul-14 18:21pm View
"a very different concept" Ummm, no... he said "Excel".
PIEBALDconsult at 16-Jul-14 18:20pm View
No; do your own homework.
“© Copyright" -- use one or the other, not both.
PIEBALDconsult at 16-Jul-14 12:49pm View
I don't think you understand Windows Services.
PIEBALDconsult at 16-Jul-14 11:39am View
Please don't store dates as text; use a proper date/time datatype.
What database system? If it doesn't have a date/time datatype, then please look for a better solution.
If you absolutely positively must store dates as text at least use an ISO 8601 format -- YYYY-MM-DD.
PIEBALDconsult at 16-Jul-14 10:49am View
Well then humor me and try it anyway.
PIEBALDconsult at 15-Jul-14 17:29pm View
Please don't cross-post
PIEBALDconsult at 15-Jul-14 14:51pm View
They have to be in plain text when provided to the driver, but they can be encrypted whereever you store it.
PIEBALDconsult at 15-Jul-14 11:17am View
Seems like there should be an Interface involved.
PIEBALDconsult at 14-Jul-14 15:21pm View
The problem is likely in Where TransactionDate = @TransDate
Check the values.
You may want to use a BETWEEN.
PIEBALDconsult at 14-Jul-14 11:26am View
"Do you think this is fine?"
I don't; it sounds like a maintenance nightmare. If you are using Sql Server, have you considered using XML to hold the "attributes"?
What more information can you provide? Any examples of a Category or SubCategory table?
PIEBALDconsult at 14-Jul-14 11:11am View
Yeah, BIT = 1 , but maybe you'd be better served by storing a timestamp of _when_ it processed.
Or a status that indicates something like { New , Processing , Success , Fail ... }
PIEBALDconsult at 14-Jul-14 11:02am View
Yeah, a Windows Scheduled Task is the simplest. A Windows Service could possibly be used if you allow it to interact with the UI.
Otherwise, the user has to have the application running all the time.
PIEBALDconsult at 13-Jul-14 22:26pm View
That sounds like an SQL question; not a C# or question.
Look into the JOIN/ON syntax of your database.

Advertise | Privacy | Mobile
Web01 | 2.8.140922.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid