Ian Jorgensen's Q&A profile
Visual Studio Team System TokenizeCompoundWord not tokenizing as expected
I'm running the VS2005 integrated version of FxCop but debugging by using the stand-alone IDE and I've noticed that I'm getting some funny results (visible in debug) from the RuleUtilities.TokenizeCompoundWord method when tokenizing words with underscores in them E.g. EMPTY_ARGUMENT_ERROR is tokenizing to "EMPT", "Y", "ARGUMEN", "T", "ERROR" instead of "EMPTY", "ARGUMENT", "ERROR" Also I have come across situations where a single 'word' tokenizes to nothing! E.g. variable name "x" tokenizes to "" Has anyone else come across these problems Are they known issues Is there going to be a fix This is causing issues in my custom ru ...Show All
Visual Studio 2008 (Pre-release) PerCall storage
Hi, Can anyone tell me if there is someway of creating a per call storage area. What i have is and object that is passed using a message header on the operation call. On the service side the object decodes the message header to rehydrate it's and then become available for service code. What i want is for service code to be able to call MyClass.Current, what i had at first was upon access of the static property it checks to see if a static variable is null, if it is it then decodes from the message header and stores the decoded object in the static variable. The problem with this is that the static variable is shared across all services & operations. So if another client changes a property of the object that is passed across the m ...Show All
Visual Studio Tools for Office excell parameters
Hi I have a problem in excel when i try to import data from MSSql with Import external data: I must use the same condition in two places in the same query..something like that: select col2 from d where col1= union select col3 from d where id not in (select col2 from d where col1= ) this query works perfectly in MSSql, but when I try to do this in my ".dqy" file the excel tell me I have an error in my sql... pls help me The MSQuery application is "owned" by Excel. So the best place to ask is in a group that deals specifically with Excel. (VSTO is a special Visual Studio technology, but I realize this is the only forum you could see in the web interface where you started con ...Show All
Visual Basic Synchronize settings button isn't working
Using VS2005 version 8.0.50727.42 RTM, I am experimenting with application settings to add some persistance to a VB windows app. Changing the scope of a setting from User to Application leads to a Configuration system failed to initialize exception at run time. I eventually realized that the Synchronize button on the Settings tab isn't working. It always gives me a dialog No user.config files were found in any of the following locations: [OK] No locations appear to have been searched, even though an out-of-date user.config file does exist in ...\Local Settings\Application Data\... Of course I can manually delete the user.config file to work around this but it would be nice if I could get the Synchronize button to do it for me. Do ...Show All
.NET Development convert database to xml
my first experience to create ado.i must to convert my database(all tables,relations,views,procedures) to XML,client works only with dataset(restore from XML) without connection to database in server. 1from system tables i get all names tables and in loop add every table to dataset,what way to add constraints,views,procedures. i read about primary key -use property adapter: thisAdapter.MissingShemaAction=.MissingShemaAction.Addwithkey every foreign key add separatly how add views,procedures thanks for help.wait answer. Hi, First, I'd like to know which database are you working with Initially, The dataset works with two types of constraints, one for Unique values, and one for foreign k ...Show All
SQL Server Where to find examples
Hi! Where can i find examples of T-SQL executed by one instance of SQL Server 2000 to communicate to a 2005 SQL Broker instance (both located on the same server) thanks for your help! The relevant MSDN topic is at http://msdn2.microsoft.com/en-us/library/ms188721.aspx You can also try to post this question on the "SQL Server Data Access" forum: http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=87&SiteID=1 HTH, ~Remus ...Show All
Visual C++ Char* issue on Migrating from VC6 to VC8 (2005)
Hi, I have a function in VS-6 which displays Helzo. (Project settings I changed in VS-6 are: In C++ tab the Warning level is set to "Level4" and Debug info as " Program Database") void CVCTempDlg::OnOK() { char* pChar; pChar = "Hello"; *(pChar+3) = 'z'; AfxMessageBox(pChar); } When I try to use the same function in Visual Studio.Net 2005 it compiles fine but throws an exception during run time. void CtempDlg::OnBnClickedOk() { char* pChar; pChar = "Hello"; *(pChar+3) = 'z'; AfxMessageBox(pChar); } I tried the following : IsBadWritePtr, memncpy, functions to set the 3rd char to Z, but no use. Thanks in advance. Kama No rewrite needed. Just find the places w ...Show All
Visual C# WebBrowser 2005 Document.Selection
I was using webbrowser.document.selection on a webbrowser control in VS.net 2003, and now I have upgraded to 2005, and the selection object is not there. Is there any easy way to get the selected text from the webbrowser control without having to copy the text to the clipboard Thanks, - Jon Mario....while I have you here... I have a vertical band object that I cant hang onto the eDisp...whenever a new window is opened in the browser...it "attaches" to the original....and when closed....fires my close event in the original. I am playing/recording an mp3...In in the quit event I clean up (stop recording etc)...so its quite a kink in the project. Now with IE7...its even worse....wheneve ...Show All
Visual Studio Express Editions Code for printing
Does anyone know some code that will allow me to send to a printer the content of 4 text boxes Elliott ...Show All
Windows Forms SelectionStart for control object
I have several textboxes that I only want the user to enter numbers into. So I wrote a little routine to do this for a specific txtbox. I added the code txtbox.SelectionStart=100; to ensure the cursor always ends up at the end of the numbers. Worked fine until I moved the code to it's own procedure (probably I should call it a method) anyway... private void DelText ( Control tb) { Regex Num= new Regex ( "[0-9]" ); int l=0; l=tb.Text.Length; for ( int i=0; i<l; i++) { if (Num.IsMatch ((tb.Text.Substring (i, 1)))) { } else { tb.Text=tb.Text.Substring (0, i)+tb.Text.Substring (i+1, l-i-1); } } tb.SelectionStart=100; } now I get 'Control does not contain a definition of SelectionStart', Ho ...Show All
.NET Development retrieving last entry
i have a table ID. so how can i retrieve the ID immediately of the last entry after inserting the data into the table im using sql server express working on a mobile app. actually im calling the retrieve through a web service which means i would call the insert method then the retrieve method available at the web service. i think this command is not going to fit into my web service method. ...Show All
Visual C++ Computing for large matrices
I tried to write a file for 1e6 by 1e6 and it literally crashed. Double is too small to handle. How should I code so that I could begin to write and compute my matrices I am looking along the lines of computing values larger than 1e6. Is that realistic Also, how can I optimize on the memory space using MV.Net 2003 I am starting with a simple code, see below. Thanks. [code]int main() { int i, j, nmat; double *b, **a4; nmat = 1000000; Init_Matrix(a4, nmat); Init_Vector (b, nmat); for (i = 0; i<nmat; ++i) { if (i%2 == 0) a4 = 4; if (i%2 == 1) a4 = 4; if ((i-1)%1 ...Show All
Visual Studio 2008 (Pre-release) Test Endpoint Connection
Hi, I am trying to develop my version of the ChannelFactory class that has some built in functionalty to endpoint failure. The general idea is that consuming application calls my static method specifying the contract and endpoint name to connect to. The class can then make this connect and confirm that the remote service is available and if not it connect to a know backup machine. The problem i am having is that my class inherits from ClientBase and exposes the static but I cannot find anything to check if the connection was made. The code i have in the static has the following code inside it : returnValue = new ServiceFactory <TServiceContract>(endpoint); returnValue.Open(); I would have expected the open method to ...Show All
Windows Forms How to trap keyboard event. like Esc and Delete etc.
in my case , i want the same ability like in VS IDE which is when on design surface, select a control and then press ESC ,the Selection Control will turn to it's parent control. i trying to add the messageFilter to handle the key event . but it will trap all key events in the application. Apperently this not meet my requirement, i just want the design surface handle the message. i have tried to handle Message Loop as well it doesn't work ; for example: System.Windows.Forms.Application.AddMessageFilter(_msgFilter); ...... public class MessageFilter:IMessageFilter { private BaseForm _owner; private const int WM_KEYDOWN = 0x0100; private const int WM_RBUTTONDOWN = 0x0204; public MessageFilter(BaseForm owner) { this._o ...Show All
Visual C++ Confused about Return Value Optimization
Hi everyone, The return value optimization (RVO) eliminates temporaries for functions return by value. Scott Meyers wrote about utilizing RVO in "More effective C++" and Ayman B. Shoukry wrote an article about named return value optimization (NRVO) in this article: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnvs05/html/nrvo_cpp05.asp Those articles left me wondering: in what cases is trying to utilize the RVO beneficial Is there something I have to do as a programmer to help the compiler to utilize the RVO the best way that it can Both articles suggest that I should. I've tried to put this into practise. VS 2005 does a very good job optimizing and I think if you read mr Shoukry's article, ther ...Show All
