15,892,768 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by John d. Bartels (Top 22 by date)
John d. Bartels
26-Dec-13 9:51am
View
You can also use wmi to retrieve this information; I am not sure if the win32_product class has all of the same information that you need or not. The wmi query would be: "Select * from win32_product". If you want to verify that all of the info is there prior to coding out the solution, jump on powershell and perform a gwmi query to see the information. "gwmi -computername RemoteComp1 -query "Select * from win32_product""
John d. Bartels
26-Dec-13 9:38am
View
Are you inserting this record by calling a stored procedure? If so, then you could simply do this work in the sproc. If not, have you given thought to simply creating a stored procedure and then calling the sproc to do your insert? Also, the trigger should work on both Inserts and Updates, and then you could achieve the same results using the trigger. So, I just re-read your post, and it seems like you want to update the "Status" column when a Date is inserted into the time column. But, then your post title is "stored procedure to run at a particular time"... this sounds like two different problems. Might I ask why you want the stored procedures to run at a particular time vs. when the record is actually being inserted or updated?
John d. Bartels
22-Dec-13 10:49am
View
Not sure what your Process or Sale Process looks like..., but I would assume that if this is a SQL db, there are likely other tables that contain Sales or Order Data. You would need to add an additional predicate (like a where clause) in the following queries if you were looking for a particular orderID, or a particular orderDate, etc.
Select ItmName from ItemMaster imstr
inner join Sales.Orders ordrs
on ordrs.ItmNo = imstr.ItmNo
Select ItmNo from ItemMaster imstr
inner join Sales.Orders ordrs
on ordrs.ItmNo = imstr.ItmNo
John d. Bartels
4-May-13 0:19am
View
"'Query3.BCCHNO=AND" <-- this appears to be a problem. I am not sure what datatype the column BCCHNO is, SQL or Oracle the correct syntax for that would be "Query3.BCCHNO='Value'" (Unless its a number, but then And wouldn't make sense) This is depicted in the very next line of your query. The error is definitely in the SQL query generation, and stepping through the code should provide you with some insight as to how you can improve your query generation code. You can also just place a message box right before you open the query and then display the sql query in the message box. This would likely provide you with enough information to remedy the error without having to step through all of the code.
John d. Bartels
19-Feb-13 22:55pm
View
In the excel formula, there must be an equals sign:
dt["Percentage"]="=p2/f2 *100";
John d. Bartels
2-Jan-13 0:28am
View
Instead of trying to invoke the click on the actual button, you could also try the Win32 mouse_event to make this happen.
John d. Bartels
30-Dec-12 10:52am
View
Deleted
Taken From MSDN article:
An abstract class cannot be instantiated. The purpose of an abstract class is to provide a common definition of a base class that multiple derived classes can share. For example, a class library may define an abstract class that is used as a parameter to many of its functions, and require programmers using that library to provide their own implementation of the class by creating a derived class.
http://msdn.microsoft.com/en-us/library/ms173150.aspx
John d. Bartels
15-Dec-12 12:08pm
View
There is a "FontDialog" class that will show the installed fonts
John d. Bartels
12-Dec-12 18:32pm
View
Add UIAutomationTypes and UIAutomationClient References (in the System.Windows.Automation namespace) to your project, then you can get to excel by way of the Root Element (the desktop), and you can get the button that you want to listen for an event from. There is a Property for the AutomationElement that specifies the rectangular bounds of a button. Also, I believe it is possible to "Listen" for events using these classes as well.
http://msdn.microsoft.com/en-us/library/aa348551.aspx
John d. Bartels
7-Dec-12 18:29pm
View
Is there another table that you can inner join with to obtain additional information?
John d. Bartels
25-Oct-12 21:07pm
View
XML file to house the Column names, that is loaded at runtime. This allows you to easily alter the XML file to include future columns. You could also store this information in the database. You could also store it statically in the code. The first and second options are preferred because they do not require code change.
public class webProductInfo
{
public string ProductName {get; set;}
public int ProductID {get; set;}
public List<string> Columns {get; set;}
}
Then you can create a List<webproductinfo> prodList = new List<webproductinfo>(); and fill it up with the information from the xml file or the database, etc.
John d. Bartels
25-Oct-12 20:51pm
View
See the following links:
http://www.thebestcsharpprogrammerintheworld.com/blogs/connect-to-an-oracle-database-without-an-oracle-client.aspx
http://stackoverflow.com/questions/3935808/how-can-i-deploy-a-net-application-that-uses-odac-without-installing-the-whole
I can not take credit for either of them, but I have used the code from the first link, and it works great (although I've heard its not a best practice, and that the Oracle Client should be installed on the target workstation... Also the first link instructs you to install .NET 4.0, so I'm not sure if that is what you want or not, but this may help)
John d. Bartels
21-Oct-12 13:05pm
View
Have you tried SendKeys.SendWait('r');
John d. Bartels
21-Oct-12 11:16am
View
The Office Interop Dlls would be a good place to start. The Excel Interop will get the data, and the Word Interop can place the data into a Word Document.
John d. Bartels
21-Oct-12 11:03am
View
At the end of your BindGrid() method, try the following: "dataGridView1.Refresh();"
John d. Bartels
21-Oct-12 10:59am
View
Have you tried to select the reference to the MySQL DLL in your project, and set the "Copy Local" Property to true?
John d. Bartels
16-Jun-12 13:58pm
View
I have done this in the past with Linq to SQL. However, it sounds like you are querying the db to get the gridview contents... If that is the case, I would think you could perform this task in the same way you used to populate the gridview. Another question I would have: do you have a unique identifier in this gridview/database table?
John d. Bartels
20-May-12 12:01pm
View
I Agree with Zoltan and sjelen; this could be causes by a lack of content in the CSV file, and could be caused by having only five comma-separated values on a line instead of six which is what the code is expecting. First, check to ensure the file has at least one line. Then check to ensure each line has the six values you are looking for. If not, break out of the logic and state why the break occurred. (i.e. The File is empty! or There were only five values in line x for the file ...)
John d. Bartels
13-May-12 13:33pm
View
This question is worded poorly. I am unable to decode what you want to accomplish with the checkboxes. Being able to automatically select the checkbox if the value for the item is set to true in the first table shouldn't be an issue. That part I understood, but the following made no sense to me: "AND ALSO I WANT DISPLAY OTHER DATA IN GRID FROM FIRST TABLE AND ITS VALUE FOR CHECKBOX FALSE IF IT IS NOT MATCH...
SOOO, IN SORT I WANT TO CHECKBOX CHECKED TRUE IF MATCH AND FALSE IF IT NOT MATCH AND DISPLAY ALL RECORDS FROM FIRST TABLE..
"
I think some screenshots and better wording for this question will help you get an answer much sooner...
John d. Bartels
13-May-12 13:26pm
View
If your question is the bold text above, "How to know which application open in current monitor screen", then the answer would be to use a Win32 API method call that is shown below. This will return the Handle for the application that is currently the focused application.
[DllImport("user32.dll")]
static extern IntPtr GetForegroundWindow();
If you are attempting to count the number of times a key is pressed on the keyboard, you could simply use a global keyboard hook and then increment a value each time the keypressed event fires. I have used a globalkeyboardhook from codeproject successfully in the past to transform keypresses into other key combinations.
John d. Bartels
13-May-12 13:07pm
View
This seems like a simple permissions issue to me... Are you using WMI to query a remote computer? or is this the local computer? If it is a remote computer, you will have to query the remote terminal using a domain admin, and the computer must exist on the domain. If this is a local WMI query, simply running the application as administrator will rid you of this error. Running Visual Studio as Administrator will rid you of the error while actively developing the program. You could also use impersonation or have the user specify login credentials at runtime. Posting the portion of code that is throwing the error would be helpful as well.
John d. Bartels
13-May-12 13:00pm
View
So let me get the question straight... You want to take the selected item from the Combo Box, and send it to another Form (populate a label or textbox or whatever on Another Form... In the Same Application?... In another Application?). I can help you with Same Application, but a different form in a different application is a different story entirely (still possible, but different question)... So, please clarify exactly what you want to do. Do you want to take the selected item from the combobox (a string) and populate a label or textbox in another Form in the same application?
Show More