Click here to Skip to main content
11,411,312 members (64,433 online)

Comments by Eddy Vluggen (Top 50 by date)

Eddy Vluggen at 8-Jan-13 9:14am View
I'd use an IDbCommand, not an adapter.

Google for SqlCommand.ExecuteNonQuery :)
Eddy Vluggen at 7-Jan-13 5:30am View
UPDATE [MyTableName]
SET CurrentStock = CurrentStock - 5
WHERE Id = @yourKeyValue
Eddy Vluggen at 24-Sep-12 10:46am View
MSDN is.
Eddy Vluggen at 14-Sep-12 3:22am View
Reason for my vote of 5
Nice solution :)
Eddy Vluggen at 7-Sep-12 8:03am View
Although your solution works, I have to disagree; it's a silly request, and we don't write in those locations. At all. Ever.

The only reason to request something like this, is when someone wants to HIDE his app from the user - your typical trojan-writer.
Eddy Vluggen at 30-Aug-12 7:13am View
Because it doesn't; it only exists as a local variable in your constructor. Make it a private class-level variable, and you can access it.
Eddy Vluggen at 8-Nov-11 9:53am View
It's not another singleton-alternative, but an alternative answer to the original question; what does the singleton add beyond a simple module or a class?

I'm wondering where the added value is, especially compared to what we already know from the documentation.
Eddy Vluggen at 8-Nov-11 4:58am View
Reason for my vote of 5
Helps in debugging, and one can convert the list easy to Xml using the DataTable.WriteXml method :)
Eddy Vluggen at 2-Nov-11 12:27pm View
Reason for my vote of 5
Cool and handy helper, and a to-the-point explanation :)
Eddy Vluggen at 1-Nov-11 16:13pm View
A former Delphi-Programmer? :)
Eddy Vluggen at 15-Oct-11 16:41pm View
Reason for my vote of 5
I did consider your example in the past, and it counted spaces with at least one non-empty space character (tab, enter, space) - this is a lot cleaner :)
Eddy Vluggen at 12-Oct-11 13:14pm View
Reason for my vote of 5
Quite nice :)
Eddy Vluggen at 12-Oct-11 13:12pm View
Have you tried it? One can throw a lot of exceptions in a single second! (If there's no debugger attached, that is)
Eddy Vluggen at 8-Oct-11 21:37pm View
Reason for my vote of 5

always good to understand the code that VS generates on your behalf.
Eddy Vluggen at 17-Sep-11 5:45am View
Reason for my vote of 5
Cool, handy little helper-routine :)
Eddy Vluggen at 16-Sep-11 12:58pm View
Reason for my vote of 5
Learning the Framework is more efficient than hacking together everything once you need it :)
Eddy Vluggen at 13-Sep-11 19:14pm View
Reason for my vote of 5
Also usefull in the debugger :)
Eddy Vluggen at 14-Aug-11 15:40pm View
What's the brand/printer name and model? Does it support showing a "no paper"-message if you print from Microsoft Word?
Eddy Vluggen at 25-Jun-11 14:55pm View
Your welcome. The only alternative is to copy it to the startup-folder. Applications don't get started randomly, they need to be run from either the user or another program.

How would the script know "when" to run? :)
Eddy Vluggen at 25-Jun-11 14:52pm View
Hehe, true, but there's a link to the documentation; just a matter of investing the time to read it. Good additions btw, should have enough pointers to get started :)
Eddy Vluggen at 14-Jun-11 3:31am View
They'll have similar interfaces. As an example, here's the configuration manual for Avast;

The manual of Avast, explaining how to configure (among others) MSN and Miranda IM;

Even Norton has to use this interface;

Norton being a big company, they simply checked where each (version of each) messenger saves the path to the virus-scanner, and set that upon installation of the product. That costs time, and thus money, but it makes sense for Norton to do so.

There's no common application-level API provided; the alternative is to go a level deeper into Windows, raising the complexity and the costs.
Eddy Vluggen at 13-Jun-11 17:18pm View
No, it's not. If you set the configuration once, WL Messenger will scan every incoming file with that particular executable.

Yes, they will have to set the path once. You might to seek where the path is stored (registry perhaps) and modify it, but these things tend to change between different versions - so there's no guarantee.
Eddy Vluggen at 10-Jun-11 14:45pm View
The datatype is very important, obviously. The examples you gave make sense, but sometimes it's redundant. E.g.;

using(SqlConnection con = new SqlConnection())
using(SqlCommand cmd = con.CreateCommand)
// ..


using (var con = new SqlConnection())
using (var cmd = new con.CreateCommand())
// ..

You could even declare a type-alias using the using-keyword, by adding it to your using-list on top of the source-file;
using ConType = System.Data.SqlClient.SqlConnection;
using CmdType = System.Data.SqlClient.SqlCommand;

making the previous example like this;
using (ConType con = new ConType())
using (CmdType cmd = con.CreateCommand())

Question is; what is easier in terms of maintenance?
Eddy Vluggen at 10-Jun-11 9:14am View
# How do we get the file passed to messenger command-line.
That depends on the messenger that you're using. For the MSN Live Messenger, sign in, go to the menu "Extra" and then select "Options". Go to the tab "File Transfer", and select the console-application that you want to use to scan incoming files. That's specifically there to allow the end-user to specify which virusscanner they want to use with their messenger.

# How can we achieve this, can you give some example or method to do this.
Create a console-application that scans each file that's being passed as a argument. Then configure the messenger to use that; each messenger-application will have it's own unique way of configuration.

# can you give some example or method to do this.
There should be someone in the antivirus-team that knows how to create a console-application.
Eddy Vluggen at 10-Jun-11 4:56am View
Thanks, and you're welcome. Would love to see an article on your implementation, if you can spare the time :)
Eddy Vluggen at 8-Jun-11 18:21pm View
You're right - was specified even on the first line :)
Eddy Vluggen at 6-Jun-11 12:43pm View
Looks more like it applies to mixed 32/64 bit environments :)
Eddy Vluggen at 11-May-11 17:03pm View
Vielen Dank :)
Eddy Vluggen at 11-May-11 17:03pm View
Thanks :)
Eddy Vluggen at 28-Mar-11 10:38am View
I see your point; might have been a problem. Good to have a warning in advance - I mistook it for pedantry, like my own post :)
Eddy Vluggen at 28-Mar-11 3:16am View
It's not a lecture on best-practices on coding, it's a valid and correct answer. Stay on-topic, please :)
Eddy Vluggen at 12-Feb-11 6:00am View
Reason for my vote of 5
Changing stuff without looking at them is asking for trouble. The use-case described calls for #if DEBUG :)
Eddy Vluggen at 7-Feb-11 13:08pm View
Aight, well done :D

I'm just home, am not allowed to post much from work, but been following the updates. I was formulating a new post in the train, loved to see the 'I got it' - and without much help. My compliments :)
Eddy Vluggen at 7-Feb-11 13:08pm View
Aight, well done :D

I'm just home, am not allowed to post much from work, but been following the updates. I was formulating a new post in the train, loved to see the 'I got it' - and without much help. My compliments :)
Eddy Vluggen at 6-Feb-11 16:54pm View
Datatables provide their own select-method;
Eddy Vluggen at 6-Feb-11 9:36am View
As described on that page. Is there anything unclear in the documentation?
Eddy Vluggen at 19-Jan-11 6:45am View
String.Format wasn't supposed to do mailmerges, but having a lot of fields in a large body of text isn't neccesarily an indication that you're doing something wrong. Even if I drop that argument completely, having a named field adds to the readability (and thus, maintainability) of the project.
Eddy Vluggen at 14-Jan-11 18:48pm View
I'd try replacing the domain-name with the local pc's name, the computer-administrator as the user, and his local password. If that works, try a normal user.
Eddy Vluggen at 6-Jan-11 5:54am View
You could split it on the <li>, and add prefix each string in the resulting string-array with a number. Increment the number as you iterate over the array :)
Eddy Vluggen at 28-Dec-10 14:15pm View
The fact that it's allowed to interact with the desktop, doesn't mean that you're running in that desktop or with the current users' credentials.
Eddy Vluggen at 25-Dec-10 15:39pm View
I voted 1: Don't spam the board with several wrong ways of asking a question. And drop that monster of a MSFlexGrid like Microsoft did, install the InterOp Forms Toolkit. That will allow you to mix .NET and VB6, enjoying the best of both worlds. Then you kick out all those FlexGrids and replace them with nice and enjoyable DataGridViews. It's supported by Microsoft;
Eddy Vluggen at 25-Dec-10 13:42pm View
Good find! - I'm using <a href="">A Professional HTML Renderer You Will Use</a>[<a href="" target="_blank" title="New Window">^</a>], since it also works on Linux (no WPF here). Bookmarked the CF-version, I'm sure it will come in handy one of these days :)
Eddy Vluggen at 25-Dec-10 6:28am View
You want to hide the UI of the Twain-driver when the user starts scanning? I doubt that it'll work as intended; what do you do when the driver wants to show an errormessage like "Already in use"?
Eddy Vluggen at 23-Nov-10 14:11pm View
Reason for my vote of 5
Thanks for sharing :)
Eddy Vluggen at 9-Nov-10 6:14am View
Will convert it to a string. Once he saves it to the database, it'll contain more than the specified two decimal numbers.
Eddy Vluggen at 9-Nov-10 6:07am View
How are you assigning this BeginSend to the SMART-threadpool? Sounds like you're running into the maximum number of threads from the threadpool, where the application has to wait until there's a new free thread available. Also, it does cost time to start a thread, and starting threads cannot be speed up.
Eddy Vluggen at 8-Nov-10 10:52am View
The service is running under a different account than the user; when the user ends it's session, the service is simply still logged in. In other words, when you logout, the service doesn't.
Eddy Vluggen at 28-Jul-10 6:04am View
dtCities.DefaultView.RowFilter = "CityName 'Istanbul'";

..and how many records are in that dataset with that particular CityName? :)
Eddy Vluggen at 28-Jul-10 5:51am View
How does the code of your filter look? Code would go along these lines;
view.RowFilter = "City = 'Berlin'";
view.Sort = "City DESC";
Eddy Vluggen at 18-Jul-10 6:19am View
The example-project that Griff mentions is referencing libraries from .NET v1.1 - install that framework and it'll work. (I ran the project on my own PC right now to confirm that)

Alternatively, you can upgrade the project to a more recent framework.

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