16,004,529 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 PIEBALDconsult (Top 200 by date)
PIEBALDconsult
28-Aug-24 21:18pm
View
Read it into a DataTable, update it, then rewrite the file.
PIEBALDconsult
21-Aug-24 16:44pm
View
Wait, IMEX=2 ? Is that correct?
PIEBALDconsult
21-Aug-24 16:43pm
View
Or open a UDL file and check the list of providers. Or ask the OleDb system to list them.
PIEBALDconsult
21-Aug-24 16:37pm
View
You can search for the other million times that's been asked.
PIEBALDconsult
21-Aug-24 12:19pm
View
Absolutely. You (as opposed to me) need to know the size. And different architectures.
But ... back in the 90s, when I was being paid to write C to run on Alpha chips, the same code had to run the same on VAX chips, and other systems (running DOS or QNX). The gurus had long before decided to use defines for TRUE and FALSE. Something like #define TRUE (0==0) and #define FALSE (!TRUE)
arguing that it was device independent, etc.
They also had an odd view that using define saved bytes, so we used them for pretty much anything constant.
And yoda-coding, : shudder :
PIEBALDconsult
21-Aug-24 12:00pm
View
"try to realize the truth. There is no bool.”
Having said that, I like bools in C#, but I won't accept that bools which may have been hacked into some implementations of C can work as well and I doubt I would use them if I ever dabble in C again.
Rant: Besides it always seemed backward to me that C considers zero false rather than true. I would have thought that it would be based on jump-if-zero, rather than jump-if-not-zero. But I'm sure that's just me.
At any rate, we may represent a bool graphically as a zero or a one, but it is neither, it's a bool and the developer shouldn't care about how they are represented in the computer.
PIEBALDconsult
20-Aug-24 21:07pm
View
Well, my C was on OpenVMS and I basically haven't touched it in twenty years.
Just some small experiments with ODBC.
PIEBALDconsult
20-Aug-24 20:59pm
View
Never heard of !! , will have to watch this play out.
PIEBALDconsult
20-Aug-24 10:41am
View
Then brew a nice hot cup of tea.
PIEBALDconsult
20-Aug-24 10:37am
View
I should also note that I don't use msbuild; I just use the command line compiler (CSC) directly.
PIEBALDconsult
20-Aug-24 9:57am
View
Won't work. Unless the DLLs are built from your code, in which case you're in control anyway.
I have tried to embed third-part DLLs in an application and it was unsatisfactory.
PIEBALDconsult
20-Aug-24 9:24am
View
Just export CSV. Then Excel can read it, or another app can read it.
What is being done with the export downstream? Does the recipient really want Excel?
PIEBALDconsult
19-Aug-24 15:59pm
View
Don't use a DataGridView.
PIEBALDconsult
18-Aug-24 14:25pm
View
From what and why?
On my last gig we used TFS and it was great. Then we were forced to switch to GIT and we could no longer develop utilities to support the flow and it was horrible.
Never switch anything. Whatever you start with, stick with it.
PIEBALDconsult
16-Aug-24 14:00pm
View
No matter what you do, someone will still try to pass you a wombat. :D
PIEBALDconsult
15-Aug-24 20:49pm
View
Infested with TABs?
PIEBALDconsult
13-Aug-24 9:01am
View
Don't use a DataGridView.
PIEBALDconsult
11-Aug-24 16:13pm
View
Don't use Linq.
PIEBALDconsult
9-Aug-24 23:19pm
View
OK, I've only ever used System.Timers.Timer -- and that not recently.
I've heard bad things about that other one.
Apparently, there's also System.Threading.Timer :shrug:
PIEBALDconsult
9-Aug-24 19:16pm
View
Which Timer control?
PIEBALDconsult
4-Aug-24 10:32am
View
The minimum of f is Double.MinValue
PIEBALDconsult
3-Aug-24 18:32pm
View
Don't use a text box for that.
PIEBALDconsult
2-Aug-24 10:25am
View
I don't see an algorithm.
PIEBALDconsult
28-Jul-24 15:28pm
View
Please don't try to answer your own question. You can use the improve question button to add context and detail.
PIEBALDconsult
25-Jul-24 14:28pm
View
DLL needs to be in the same directory as the EXE?
PIEBALDconsult
21-Jul-24 10:59am
View
I can't help you, but I recommend that you not put that code directly within your forms methods. Begin to think of writing applications modularly.
PIEBALDconsult
20-Jul-24 16:54pm
View
For the most part, I write CSV rather than directly to Excel.
Having said that, I have written directly to Excel, but it can be problematic.
One thing to bear in mind, though it might not matter to what you're doing, is that a worksheet may contain any number of logical tables, there is no 1:1 relationship between them.
PIEBALDconsult
15-Jul-24 8:49am
View
You probably don't want spaces within the strings:
'% @cboFilter.Text %' '% @txtSearch.Text %'
PIEBALDconsult
14-Jul-24 13:05pm
View
Yeah, by using the provided procedure(s).
But why are they stored in XLS? That seems like a bad idea. When you script the database and its objects, you should script the extended properties as well -- that's what I do.
PIEBALDconsult
13-Jul-24 23:43pm
View
Do not use string concatenation to form SQL statements!
PIEBALDconsult
10-Jul-24 22:47pm
View
More detail is required.
PIEBALDconsult
10-Jul-24 22:35pm
View
Depending on the needs of performance, I'd consider an XML column.
PIEBALDconsult
8-Jul-24 8:41am
View
If multiple files, read them in parallel.
If SQL Server, use an SqlBulkCopy object.
PIEBALDconsult
30-Jun-24 15:38pm
View
I would have said "recursion", but I held my tongue.
PIEBALDconsult
28-Jun-24 23:59pm
View
You can't even explain what the terms "fyp" and "mvp" mean in this context? I have no idea what you are talking about.
PIEBALDconsult
22-Jun-24 16:35pm
View
Is this related to the CodeProject AI ?
PIEBALDconsult
22-Jun-24 15:50pm
View
If you want control of how things look,
do not use a DataGridView
.
A DataGridView is fine for a quick-and-dirty proof-of-concept, but is not suitable for public release.
PIEBALDconsult
10-May-24 19:54pm
View
Sign up for some classes.
PIEBALDconsult
26-Apr-24 10:19am
View
Use DefaultView in:
Dim size1 As String = table.Rows(4).Item("Size")
PIEBALDconsult
24-Apr-24 8:43am
View
3445678352.123 can be represented in scientific notation as
3.445678352123E9 (if I have that right)
__^^^^^^^
and single-precision values have only about seven places of precision -- you are trying to exceed that.
PIEBALDconsult
24-Apr-24 8:04am
View
You can use the Improve question button to edit the question.
PIEBALDconsult
23-Apr-24 12:55pm
View
fscanf ?
strtok and atof ?
PIEBALDconsult
23-Apr-24 10:46am
View
Really an error? Or a warning treated as an error?
What happens if you comment it out?
Bear in mind that no using directives are ever strictly necessary.
PIEBALDconsult
22-Apr-24 17:29pm
View
What does AddItems do?
Should the "0" be a different value on each call?
PIEBALDconsult
22-Apr-24 13:01pm
View
Write it in a real language.
PIEBALDconsult
19-Apr-24 11:48am
View
Personally, I would probably set up a map of characters in an array.
But I would need more detail. Are you actually supposed to be implementing a Caesar Cipher?
Caesar cipher - Wikipedia
[
^
]
PIEBALDconsult
12-Apr-24 17:23pm
View
Please don't try to answer your own question. Use the Improve question button to add detail and context.
PIEBALDconsult
12-Apr-24 14:45pm
View
Will 1.23E3 work?
PIEBALDconsult
12-Apr-24 14:38pm
View
Revert to the published version?
PIEBALDconsult
12-Apr-24 10:52am
View
You should use the Improve question button to add that to the question.
Try putting the items in a different order and see what happens.
PIEBALDconsult
11-Apr-24 12:51pm
View
Please don't try to answer your own question. If you have additional information to post, just use the Improve question button.
PIEBALDconsult
11-Apr-24 10:31am
View
And don't store 'True' as a string -- use a BIT.
Better yet, make them number_of_toilets , number_of_elevators , number_of_bathtubs -- then test against zero.
PIEBALDconsult
10-Apr-24 14:55pm
View
Contact the developer of it.
PIEBALDconsult
10-Apr-24 12:47pm
View
"2. Manager doesn't have access to UI." -- That seems like a bad idea to me. Why can't a manager access the UI and approve or deny any pending requests?
PIEBALDconsult
8-Apr-24 15:36pm
View
I'd sooner use a Stack than a StringBuilder.
PIEBALDconsult
8-Apr-24 11:32am
View
And don't use string concatenation to form SQL statements.
PIEBALDconsult
2-Apr-24 17:04pm
View
Best not to put contact info in posts.
P.S. I'm originally from Reading.
PIEBALDconsult
28-Mar-24 16:38pm
View
I would use a text editor and the Borland C/C++ compiler.
PIEBALDconsult
25-Mar-24 14:30pm
View
We won't do your homework for you.
PIEBALDconsult
25-Mar-24 14:28pm
View
0) I think it's doing exactly what you told it to do.
1) Avoid using DISTINCT.
2) Don't put the ORDER BY in the CTE.
PIEBALDconsult
22-Mar-24 12:35pm
View
Avoid the Convert class. Use the parsers for the type you want.
PIEBALDconsult
19-Mar-24 17:25pm
View
A number of points come to mind...
0) Why are you copying all the data from data to orderdata/orderlist?
1) Can't you pre-allocate the orderlist with the ArrayList(Int32) constructor? That should save some time.
1.a) Or the ArrayList(ICollection) constructor?
2) Instantiating such a large structure for such a short duration is a waste of resources.
3) Wouldn't something like orderRepository.save(data)work?
3.a) Maybe with a begin transaction / commit transaction?
Looking at that code, all I see is time/resource wasters.
PIEBALDconsult
15-Mar-24 10:43am
View
You can use the Improve question button to add context and detail to the question.
PIEBALDconsult
15-Mar-24 10:32am
View
Please don't try to answer your own question. You can use the Improve question button to add context and detail.
PIEBALDconsult
13-Mar-24 19:00pm
View
What currency?
(We won't do your homework for you.)
PIEBALDconsult
12-Mar-24 23:34pm
View
What system? Some don't do the order of operations correctly.
PIEBALDconsult
10-Mar-24 11:29am
View
We won't do your homework for you.
PIEBALDconsult
9-Mar-24 20:21pm
View
dataGridView is not viable for anything but quick proof-of-concept and demos.
Find something better.
PIEBALDconsult
9-Mar-24 14:36pm
View
Try asking here -- https://www.codeproject.com/Feature/CodeProjectAI-Discussions.aspx
PIEBALDconsult
7-Mar-24 18:49pm
View
Please! don't form an SQL statement that way.
PIEBALDconsult
5-Mar-24 18:31pm
View
I think the plot was back that way.
PIEBALDconsult
29-Feb-24 11:17am
View
What if I copy/rename the EXE?
It seems to be an impossible goal. Not worth worrying about.
The EXE would have to protect itself; I see no other way.
Or, are you actually trying to push ExeLock because you wrote it and think it's great? It probably truly is kaka.
PIEBALDconsult
28-Feb-24 10:29am
View
An index is not a magic bullet which always makes everything faster. A bad index can make some things slower.
Without seeing your SQL statement and such, we can't really tell.
PIEBALDconsult
28-Feb-24 10:01am
View
I wrote my own tokenizer for that. I wouldn't use Split except in very simple cases.
PIEBALDconsult
23-Feb-24 11:18am
View
How about a Regular Expression?
PIEBALDconsult
20-Feb-24 12:24pm
View
What type is PermitID?
I recommend against setting the datatypes of parameters.
PIEBALDconsult
16-Feb-24 20:33pm
View
Try posting that over here:
https://www.codeproject.com/Feature/CodeProjectAI-Discussions.aspx
PIEBALDconsult
10-Feb-24 20:57pm
View
Every other column? Or every other row?
PIEBALDconsult
9-Feb-24 10:36am
View
Having to calculate that kind of thing is a code smell. Why did you not store the number you allocated?
PIEBALDconsult
8-Feb-24 11:37am
View
I'm sure my copy of VS 2010 (Express) will continue to work just fine for a while yet.
PIEBALDconsult
8-Feb-24 10:33am
View
Not me. I use WinForms when a command-line utility won't suit.
PIEBALDconsult
7-Feb-24 21:52pm
View
Did you have a question?
PIEBALDconsult
1-Feb-24 15:00pm
View
Maybe they can help you over here...
https://www.codeproject.com/Feature/CodeProjectAI-Discussions.aspx
PIEBALDconsult
31-Jan-24 13:38pm
View
Please don't try to answer your own question. Use the Improve question button to add detail and context.
PIEBALDconsult
31-Jan-24 11:45am
View
With a name like that it could be a spam set-up or test.
PIEBALDconsult
30-Jan-24 15:58pm
View
Stick it on a floppy disc.
PIEBALDconsult
30-Jan-24 10:53am
View
Yeah, we're gonna need a clearer spec, mmmkay?
PIEBALDconsult
29-Jan-24 17:17pm
View
It definitely sounds homeworkish and poorly defined.
PIEBALDconsult
28-Jan-24 19:08pm
View
Few people will click on a link.
And I don't think you want a subsequence.
PIEBALDconsult
28-Jan-24 19:06pm
View
Put the characters from box 2 in a HashSet (A).
For each word in box 1, put the characters in a HashSet (B).
If HashSet B is a subset of Hashset A, then note its length.
If more than one word from box 1 is a subset, then keep the longest.
PIEBALDconsult
28-Jan-24 11:33am
View
I suspect a spam set-up.
PIEBALDconsult
28-Jan-24 10:17am
View
As someone who has written code for a taxi company (twenty years ago), I don't see why you would be doing this rather than buying an existing taxi routing/scheduling package -- there are (or were) many.
Furthermore, it seems that in many areas, ride sharing services have killed traditional taxi services, so this does not seem like a reasonable business to be getting into now. The taxi company I worked for is no longer in business, maybe the software companies have also died.
Similarly, if you are actually trying to start a ride sharing service, you are way behind the established leaders.
PIEBALDconsult
26-Jan-24 15:01pm
View
Did you have a question?
PIEBALDconsult
24-Jan-24 13:11pm
View
Might be running by double-clicking in Windows Explorer.
PIEBALDconsult
23-Jan-24 10:51am
View
We advanced users never do that. That's for newbs. ;)
PIEBALDconsult
22-Jan-24 9:56am
View
I definitely wouldn't do that (or anything else) with Linq.
At most you will get "can be interpreted as a date", but not necessarily the correct date (as has been mentioned).
Just loop through each of them, and pass each to DateTime.TryParse and DateTimeOffset.TryParse and note the results.
PIEBALDconsult
22-Jan-24 9:52am
View
As well as some the reasonable "never" or "N/A" as an expiration date or similar.
PIEBALDconsult
13-Jan-24 18:28pm
View
Something along the lines of:
string query = "SELECT null , '--SELECT--' UNION ALL SELECT ID, Type FROM NoteExpires " +
" ORDER BY Type;";
PIEBALDconsult
8-Jan-24 20:06pm
View
DataGridViews are generally not a good idea. I recommend thinking of a better design.
PIEBALDconsult
7-Jan-24 17:53pm
View
Please add it to the question with the Improve question button.
PIEBALDconsult
7-Jan-24 16:34pm
View
Parent as in inheritance? Bh _IS_A_ Ah?
Or only Ah _HAS_A_ Bh?
PIEBALDconsult
5-Jan-24 10:32am
View
Maybe you want to run in kiosk mode?
PIEBALDconsult
5-Jan-24 9:51am
View
Is that what your users want?
PIEBALDconsult
4-Jan-24 18:20pm
View
0) Doesn't Access use OleDB?
1) I recommend against using a data adapter, especially for this case.
2) "0".ToString() -- is just freaking stupid.
3) You don't need to Clear a new DataTable.
PIEBALDconsult
27-Dec-23 10:14am
View
I see a number of issues which should be addressed:
First, don't have the database code directly in the UI code -- make a separate object/project for all the Database Access Layer. Then call that from the UI layer.
Second, have the button (button2) disabled until the textboxes and comboboxes have have values. For this, in the changed handlers for each of the boxes, set the Enabled property of the button to true only if the boxes have appropriate values. I usually write an UpdateUI Method to do that which all the other handlers call. All of that validation should happen before the button can even be pressed. Including checking to determine the existence of the ID.
Third, you need to check the state of the connection in the finally before just trying to close it. No need to close the connection inside the try if the finally will do it anyway.
Fourth, can you make the textBoxCId a NumericUpDown instead?
PIEBALDconsult
22-Dec-23 11:25am
View
I doubt you actually need to have all of those items in memory all at once.
PIEBALDconsult
22-Dec-23 11:06am
View
I doubt there is any actual reason to have all of those objects in memory at once. Rethink.
PIEBALDconsult
13-Dec-23 10:57am
View
Then don't repost, use the Improve Question button.
PIEBALDconsult
27-Nov-23 15:38pm
View
Derive a new custom Form and use that.
PIEBALDconsult
21-Nov-23 21:21pm
View
We won't do your homework for you.
PIEBALDconsult
14-Nov-23 18:26pm
View
I'm _assuming_ the first integer is how many integers to expect.
PIEBALDconsult
14-Nov-23 18:25pm
View
We won't do your homework for you.
PIEBALDconsult
9-Nov-23 10:12am
View
I doubt you need to use the Convert class; please don't. Try using a cast instead. You also don't need the local variable
prop
.
Do you want to maybe fill a
List<string>
with the values?
PIEBALDconsult
8-Nov-23 10:31am
View
I'd use a text editor.
PIEBALDconsult
6-Nov-23 13:55pm
View
Rename it.
PIEBALDconsult
2-Nov-23 15:32pm
View
You can test for NULL.
I recommend never using the Getxxx methods.
PIEBALDconsult
25-Oct-23 19:16pm
View
I can't even figure out what exactly is being described here.
PIEBALDconsult
25-Oct-23 14:49pm
View
Glad to be of service.
PIEBALDconsult
25-Oct-23 10:05am
View
Maybe re-think your life choices.
PIEBALDconsult
6-Oct-23 10:09am
View
Do not try to include a database system in the install of your application.
Just make sure to state in the documentation that it requires some database system. The user can then choose how and where to install it. The user may already have a suitable database system available.
PIEBALDconsult
2-Oct-23 21:56pm
View
Yeah, it's not an matter of "or". Just use ADO.net and cut out the middleman.
PIEBALDconsult
29-Sep-23 19:41pm
View
Is it RESTful? Does it use basic authentication?
PIEBALDconsult
13-Sep-23 11:19am
View
Writing Excel is not an easy task. I know of no way to do it with SSIS itself. At best, you could write a C# procedure to do it, but then why involve SSIS at all?
Excel can read CSV, so frequently we write CSV instead.
PIEBALDconsult
12-Sep-23 11:31am
View
How will it know which Explorer window to look at? Or all of them?
PIEBALDconsult
12-Sep-23 11:17am
View
You mean right-click and select something like "Open with MyApp" ?
Doesn't that still require setting the app up as a file association with the Open or Edit or whatever verb ?
PIEBALDconsult
11-Sep-23 19:08pm
View
Other than associating the file extension with your app? So your app runs when the file is opened via Explorer?
PIEBALDconsult
11-Sep-23 10:05am
View
One hopes not.
More detail is required.
PIEBALDconsult
7-Sep-23 16:45pm
View
Please don't try to answer your own question, just use the Improve question button at add detail.
But seriously, may I bother you with something which is causing me some trouble?
PIEBALDconsult
7-Sep-23 14:01pm
View
Maybe use INSTR() to find the backslashes, but I think you would then have to loop until there are none.
PIEBALDconsult
1-Sep-23 10:31am
View
Push is evil, do not do it. Pull is the way to go.
PIEBALDconsult
29-Aug-23 20:26pm
View
So, use the Improve question button and add that to the question.
PIEBALDconsult
29-Aug-23 19:27pm
View
Rule one: Do not store dates as strings.
PIEBALDconsult
24-Aug-23 10:08am
View
We won't do your homework for you.
The maximum beauty would be to sit in the hotel cafe watching people walk past.
PIEBALDconsult
19-Aug-23 12:15pm
View
0) Don't use a DataGridView -- define your own custom Form. Usage of a DataGridView is a cry for help.
1) A DataGridView is usually backed by a DataTable, access the DataTable or whatever backing source it is.
2) Don't call ToString on a value which is already a string, just cast it.
PIEBALDconsult
18-Aug-23 20:10pm
View
Glad to be of service. You may be using HashSets all the time without knowing. They were added to support Linq.
PIEBALDconsult
18-Aug-23 19:40pm
View
For what purpose?
PIEBALDconsult
18-Aug-23 19:39pm
View
You can provide a case-insensitive comparer to the HashSet.
PIEBALDconsult
18-Aug-23 19:35pm
View
Please don't try to answer your own question; just use the Improve question button to add detail.
PIEBALDconsult
17-Aug-23 0:18am
View
Basically as I showed in one of my responses to your earlier question.
Intersect is done with sets, so it's best to make a set.
PIEBALDconsult
16-Aug-23 10:22am
View
Also, rather than using a Dictionary for your SQL keyword list, use a HashSet.
PIEBALDconsult
16-Aug-23 10:15am
View
It's good to see that you have now begun using JSON.
For what reason are you trying to detect SQL keywords in your JSON data?
PIEBALDconsult
15-Aug-23 12:31pm
View
I would assume that a string with multiple name/value pairs would be more like this, but the OP needs to provide such detail:
string str = "{ Text = Banana, Value = 81}, { Text = Apple, Value = 11}, { Text = Orange, Value = 21 }";
PIEBALDconsult
15-Aug-23 11:05am
View
I must assume that you are concerned about the values being SQL injection attacks. You are right to be concerned, but the correct solution is to use a parameterized SQL statement.
If, on the other hand, you wish to flag suspicious input for review, rather than blindly insert it, then maybe this technique has merit.
However, you should still be aware that some good data values may contain what appear to be SQL keywords. For instance: "OUTER BANKS", "DROP SHIPMENT", "ROUND TABLE". It may still be worthwhile to insert all the data (with a parameterized SQL statement) and then perform a search for SQL injection attempts for review.
Basically, do not attempt to detect SQL injection then adjust for it in order to use string concatenation to create the INSERT statement -- it's not even very efficient.
Does your database system not support parameters?
PIEBALDconsult
15-Aug-23 10:30am
View
Maybe. We would need to know how additional name/value pairs may be specified.
Is there no way to use a proper JSON format instead?
PIEBALDconsult
15-Aug-23 10:28am
View
It is very inefficient.
PIEBALDconsult
14-Aug-23 12:16pm
View
Regular Expressions.
Using a Regular Expression yields a MatchCollection, after which you can then access the Groups by name.
As to: "should convert to some object and get value by key word" -- that really just restates the problem and maybe even moves the goal post.
If possible, use a better-supported format, such as JSON or XML.
PIEBALDconsult
13-Aug-23 11:20am
View
Please don't try to answer your own question; use the Improve question button to add detail.
PIEBALDconsult
12-Aug-23 12:05pm
View
Save it locally and then move it to where you want it if it succeeds.
PIEBALDconsult
10-Aug-23 11:04am
View
Hard-coding the namespace is unnecessary and not a good idea.
PIEBALDconsult
10-Aug-23 9:38am
View
I hope you're not planning on using string concatenation to form SQL statements from the data in the JSON file like that.
I recommend you rethink what you are planning to do as it is unlikely to be a very good solution.
Step back and think about the high-level process you are trying to develop.
PIEBALDconsult
9-Aug-23 16:48pm
View
Hmmm... as long as inserting the searchFor value doesn't produce an invalid RegEx.
PIEBALDconsult
9-Aug-23 12:25pm
View
What foreach loop? I don't think that will even compile, you must have mis-pasted the code.
OK, that looks better. I think the issue is that there is a default namespace [ xmlns="http://schemas.datacontract.org/2004/07/Xata.Ignition.WebServiceAPI.Contracts.DataContract.StatusAndEvents" ] which you need to resolve.
P.S. I have been trying to see how to do that, but I don't use XDocument, so I don't know how. I use XmlDocument so I can probably give an example using that.
You'll need to add the namespace to the namespace manager and specify it in [ doc.Descendants("VehicleBreadcrumb") ]
PIEBALDconsult
7-Aug-23 19:44pm
View
Visual Studio is not a compiler anyway.
PIEBALDconsult
6-Aug-23 20:24pm
View
Please don't try to answer your own question; use the Improve question button to add detail.
PIEBALDconsult
6-Aug-23 16:31pm
View
Please don't try to answer your own question, just use the Improve question button to add detail.
PIEBALDconsult
5-Aug-23 11:12am
View
If the string is XML, use XPath.
PIEBALDconsult
5-Aug-23 11:04am
View
Don't use the Convert class when a cast will suffice.
PIEBALDconsult
3-Aug-23 21:14pm
View
Well, for one thing, don't keep instantiating and throwing away the connection and command.
Create each once, use them many times, then let them Dispose (use
using
statements) for them.
Also, don't use the Convert class when a cast will do.
PIEBALDconsult
27-Jul-23 1:11am
View
0) I would use the ACE Engine and ADO.net, but it's not a straight-forward proposition.
1) Always look for ways to break a task into smaller sub-tasks:
1.1) Read XML
1.2) Write to Excel
PIEBALDconsult
26-Jul-23 23:46pm
View
Please don't try to answer your own question, just use the Improve question button.
PIEBALDconsult
26-Jul-23 23:43pm
View
Please don't try to answer your own question, just use the Improve question button.
PIEBALDconsult
26-Jul-23 8:57am
View
I've had those symptoms, but I don't recall the cause or cure.
PIEBALDconsult
20-Jul-23 13:23pm
View
Deleted
That definitely sounds like something you need to be doing inside the database.
PIEBALDconsult
20-Jul-23 13:23pm
View
That definitely sounds like something you need to be doing inside the database.
PIEBALDconsult
20-Jul-23 11:48am
View
You should include a link to the original you copied from.
PIEBALDconsult
20-Jul-23 10:41am
View
So does the Address class simply contain a list (collection) of strings?
PIEBALDconsult
20-Jul-23 9:00am
View
Ah, OK, I thought you might not. Your best choice may be to write an Extension Method to do it.
PIEBALDconsult
19-Jul-23 9:06am
View
Yeah, OK, so if the Address is a class, can you add a comparison method to it?
PIEBALDconsult
19-Jul-23 8:52am
View
The question isn't clear.
Can you add a comparison method to the class?
PIEBALDconsult
15-Jul-23 13:58pm
View
Well, I mean, you'll _have_ to use some built-in methods no matter what you do.
But have a look at a
for
loop.
PIEBALDconsult
14-Jul-23 19:44pm
View
You're welcome.
PIEBALDconsult
14-Jul-23 9:25am
View
I would not use such a system and I would not go to a shop which insisted that I do.
Don't waste your time.
PIEBALDconsult
13-Jul-23 15:17pm
View
It's optional there, but I always use it anyway.
PIEBALDconsult
12-Jul-23 9:27am
View
Still have to think of anyone who comes along and reads this in the future.
PIEBALDconsult
12-Jul-23 8:56am
View
Well, that was definitely not what you have in the question. Please use the Improve question button to update the question.
PIEBALDconsult
11-Jul-23 16:24pm
View
Oh, and what is the expected result of
f ( { 1 , 1 , 2 , 2 } , { 1 , 2 } )
and why?
PIEBALDconsult
11-Jul-23 14:06pm
View
Not going to. It looks like it will not return what I expect.
PIEBALDconsult
11-Jul-23 13:37pm
View
What does yours do with the inputs { 2 , 1 , 1 } and { 1 , 2 } ?
PIEBALDconsult
11-Jul-23 12:28pm
View
I disagree, I think he wants to remove the _sequence_ { 1 , 2 } from { 1 , 1 , 2 }
PIEBALDconsult
11-Jul-23 11:54am
View
Unsure that's actually what is desired, because the question isn't clear enough.
PIEBALDconsult
11-Jul-23 11:17am
View
I think you need to improve the question to add more detail, such as what you want to have happen when the lists are { 2 , 1 , 1 } and { 1 , 2 } ? The second sequence does not appear in the first sequence.
PIEBALDconsult
11-Jul-23 10:36am
View
Won't that have the same effect?
He doesn't want to remove all 1s and 2s.
PIEBALDconsult
11-Jul-23 9:36am
View
Aaaaand... what do you get?
PIEBALDconsult
10-Jul-23 12:09pm
View
Regular Expressions
PIEBALDconsult
10-Jul-23 11:41am
View
What's it worth to you?
PIEBALDconsult
9-Jul-23 10:41am
View
42
PIEBALDconsult
6-Jul-23 10:27am
View
RegularExpressions.
PIEBALDconsult
16-Jun-23 13:18pm
View
I think you'll need to make an array which contains the List.
classMethod.Invoke ( classObject , new object[] { parameterValues } ) ;
PIEBALDconsult
15-Jun-23 9:24am
View
Please don't try to answer your own question. Just use the Improve Question button to add it there.
PIEBALDconsult
14-Jun-23 12:05pm
View
Don't forget
https://www.codeproject.com/Articles/17474/Timer-surprises-and-how-to-avoid-them
PIEBALDconsult
13-Jun-23 14:53pm
View
And nasal fitment?
PIEBALDconsult
13-Jun-23 14:52pm
View
My understanding is that they use a Quick Sort.
PIEBALDconsult
8-Jun-23 10:07am
View
Create it locally and then move it.
PIEBALDconsult
7-Jun-23 19:02pm
View
I'm confused. Do you have things backward there?
PIEBALDconsult
7-Jun-23 11:22am
View
The only way is for the child to be told who its parent is.
The best way is for the child's constructor to take the parent as a parameter and if you don't want to do that, then maybe you can use a property and set it after instantiating the child.
Also, have you considered something along the lines of child = parent.CreateChild() so the parent can set the child's Parent property?
PIEBALDconsult
6-Jun-23 19:29pm
View
Dunno. I think something is truncating it along the way. Could be the query or something.
PIEBALDconsult
6-Jun-23 16:13pm
View
In part, yes. As in the solution I posted. But I discovered the SqlConnectionStringBuilder class only a few months ago.
Ever since I began learning ADO.net in 2002 (?) I have cobbled my own connection strings for whichever database I was using -- SQL Server (including CE), Oracle, MySQL, Teradata, Cache, Ingres, Excel via JET or ACE, etc. I don't know that all providers include a connection string builder.
PIEBALDconsult
4-Jun-23 11:40am
View
Don't store connection strings.
Allow the user to specify the server and database names and possibly store those in a config file, but not the whole connection string.
I found recently that .net has a built-in facility which allows you to provide the values and it will dynamically create the connection string at run-time.
I will have to refresh my memory and get back to you.
PIEBALDconsult
4-Jun-23 9:12am
View
Remove the prerequisite.
PIEBALDconsult
1-Jun-23 13:22pm
View
Use the RowFilter property of the DataTable's DefaultView ( DataView ).
dataset.Tables [ " ... " ].DefaultView.RowFilter = " ... " ;
Show More