BrentM2's Q&A profile
SQL Server IIf problem
I'm using that expression in a select statment in generic query designer, but there is a problem with it. I'm wondering what would that be. IIf(Parameters!StartDate.Value = "" or Parameters!EndDate.Value = "", "", "where (Date between '" & Parameters!StartDate.Value & "' and '" & Parameters!EndDate.Value & "')") A double-quote character within a string literal is escaped by a preceding double-quote. So, the second argument of IIf() should look like: "where (Date between '"" & Parameters!StartDate.Value & ""' and '"" & Parameters!EndDate.Value & ""')" http:// ...Show All
Windows Forms How do I use GDI with ContextMenus?
I am trying to use the GDI to DrawString, etc. to change the fonts, colors, etc. of a given contextmenu item. The problem is that I am doing it from a notifiyicon. Microsoft says I cannot do that that it is a bug: http://support.microsoft.com/ id=827043 Just wondering if there is another way or to get other ideas. I have to be able to  ...Show All
Visual Studio F1 context sensitive help and code
How does the f1 context sensitive help work when pressing F1 on a hightlighted keyword in a VS 2005 texteditor What I'd really like to know is how does the H2 Help know which page to display when F1 is pressed while some code is highlighted in the editor Are there some keyords I can add to the help file pages I have my own help integrated into VS2005 help but it does not always go to the correct page in help when I press F1. In addition to looking at the attribution on the document, you can look at the active context in VS by enabling Debug Output in the Dynamic Help toolwindow: Set this key: [HKEY_CURRENT_USER\Software\Microsoft\Vi ...Show All
.NET Development Events & Delegates CPU spikes
Hi, I have the following issue and am not sure what's the best way to tackle this: The application I'm dealing with utilizes live financial market data for stocks, options, etc. So, there is one class that handles all the market data subscriptions and emits the quote as an event. There are several controls which subscribe to this Quote event and process the data the event delivers. The issue with this is that one control might subscribe to market data for MSFT and the other control might need data for IBM, however they are still subscribed to the same event and thus the control itself has to filter the incoming data from the event and determ ...Show All
.NET Development How can I set PIN programmatically to disable raising a dialog asking for a smart card pin?
Hi, I want to decrypt a data using a private key, stored on a Smart Card. I want to disable raising a dialog asking for a pin. There is my sample code: CspParameters cspp = new CspParameters (); cspp.KeyContainerName = "MyKeyContainer"; cspp.ProviderName = " Schlumberger Cryptographic Service Provider "; // My Smart Card PIN is "1111" System.Security. SecureString ss= new System.Security. SecureString (); ss.AppendChar( '1' ); ss.AppendChar( '1' ); ss.AppendChar( '1' ); ss.AppendChar( '1' ); cspp.KeyPassword = ss; cspp.Flags = CspProviderFlags .NoPrompt; RSACryptoServiceProvider rsa = new RSACryptoServiceProvider (cspp); ...Show All
Visual C++ Need help to enable/disable menu command on specific condition
Hello, I like to enable / disable a command (File | Save). It will be disabled (grayed) when the program starts, but must be enabled when a new screen shot is taken. I have written codes in ON_UPDATE_COMMAND_UI message handler but don't know how it is triggered to enable the menu command (File | Save). My code is : void CScreenTakerApp::OnUpdateFileSave32773(CCmdUI *pCmdUI) { // TODO: Add your command update UI handler code here if (m_bolSave) pCmdUI->Enable(TRUE); else pCmdUI->Enable(FALSE); } Any ideas, please Thanks. Thanks Kuphryn. Can you please explai ...Show All
Visual Basic Percent Processor Time - Processor Utilisation
Hi all, I am trying to get the total CPU usage on the local machine. Sounds easy huh Here is the trick; I don't want to use WMI or the Performance Counters (% processor time). Please don't ask why, long story. Now I have slapped this code into VS and it works, but it uses a lot of processor time. Imports System.Diagnostics Imports System.windows.forms Imports System.Runtime.InteropServices.ComTypes Module Module1 Private WithEvents mTimer As New Timers.Timer Dim t1 As TimeSpan Dim t2 As TimeSpan Sub Main() mtimer.Interval = 1000 mtimer.Start() Application.Run() End Sub Priv ...Show All
Visual Studio Team System Task "WSS.WssPortal" failed exception while importing the process Template
I exported MSF Agile process template successfully at my local drive and then I tried to import the same . I got a import failure message with the following exception. Can anybody tell me that what may be the reason for that failure. Event Description: Task "WSS.WssPortal" failed Exception Type: System.Net.WebException Exception Message: The request failed with HTTP status 404: Not Found. WebException: Response Status Code: NotFound WebException: Response Status Message: Not Found WebException: Status : ProtocolError WebException : ToString() = System.Net.WebException: The request failed with HTTP status 404: Not Found. &nb ...Show All
.NET Development Unable to modify database data (ADO.Net, C++, ODBC)
I am trying to learn how to use DataSets to edit data in a database using the ODBC .Net provider. I would also like to have an OdbcCommandBuilder buid the SQL commands for me. In this simple example, I created a small MS Access database with two tables (Table0 and Table 1), with a few columns, and populated with a few rows in each. I am able to connect to the database using a DSN (only targetting Table0), query and properly populate a DataSet - "properly", as far as getting some basic information back. Then I try to Clear the table from all its rows, and then I try to update the database by using the OdbcDataAdapter Update function. The upda ...Show All
SQL Server Cannot create new SQL database file.
Hello, I'm using MS Visual C# 2005 Express, but I can't create a new local database file in the "Add -> New Item" dialog. The Studio doesn't create the database, but shows a file not found message. Any ideas Can you connect to SQL Server Express and create the database manually If yes, then the issue is within Visual C# and you should post this issue on a Visual C# Express forum. If you encounter an error with manually creating the database, let us know what that error is. Thanks Laurentiu ...Show All
Visual C++ Can I use system and system.io of visual studio.net in Visual c++ 6.0 and how?How many head file do I need to include ?
Can I use system and system.io of visual studio.net in Visual c++ 6.0 and how How many head file do I need to include You can't user header files from newer version with older compiler tools since there could be breaking changes. This is not a supported scenario. Thanks, Ayman Shoukry VC++ Team ...Show All
Visual Studio Tools for Office Best way to do this?
Hello, Hopefully someone would have some advice, I'd like to trigger an action inside outlook from outside outlook. I.e. pop-up a new contact window for the user to access. Should I approach this from a mapi standpoint or use IPC with a VSTO add-in inside of Outlook... I'm not sure what the "most correct" way to go about this is. Thanks! Well, I'm far from being an expert, but in my opinion an Outlook add-in is meant to create functionality from within the application... since what you need is to trigger an action from outside Outlook, I would rather simply use the Outlook Object Model from a diff ...Show All
Visual Studio Tools for Office XMI - Tool compatibility
Hi, Is it possible to get the formats in which different tools use to emit XMI while exporting file As of now, there is no standard XMI format that all tools follow isn't Why is it so Is there any possibility that this could become possible in the future Thank you. Hi, Could be please answer the second part to the question "Why isn't there a common standard that all tools follow Will it become possible in the future " I searched around but itseems the formats aren't available for public use. Thank you. ...Show All
Visual Studio Express Editions Is the express version the best visual studios C++ compiler?
Im asking because its free and im surprized that its free and Im wondering if the express version is kind of a demo version or something. Its a Cut down Version http://msdn.microsoft.com/vstudio/express/visualc/ ...Show All
SQL Server Assistance on implementing Data Mining
Hi, I'm new to SQL Server and data mining, so please forgive my ignorance... I'm working on a project which requires me to use the datamining provided by SQL Server 2005. I've a table for which i want to predict the values in a table (Encyclopedia) The table contains the following fields: Component Major Attribute Minor Attributes(which is basically a list of CSV for attributes in no particular order) I want to predict the component if i enter the attributes ..... my questions: 1. Should i change the table structure in any way to assist in data mining 2. What model would be preferrable 3. If i'm using the model ...Show All
