GRLisa's Q&A profile
.NET Development ServiceController.ExecuteCommand - access denied
Hi, I got a simple service to which I want to send a custom command to make it refresh some data. I tried to do this through a console application like this: ServiceController sc = new ServiceController ( "TestService" , "Marvin" ); sc.ExecuteCommand(1); But I get an Exception: Unhandled Exception: System.InvalidOperationException: Cannot control TestService service on computer 'Marvin'. ---> System.ComponentModel.Win32Exception: Access is denied But I can successfully execute sc.Start(); or sc.Stop(); just sc.ExecuteCommand throws this exception. The user executing the console application is member ...Show All
Visual Studio Tools for Office Serious Smart Tags Problem (a bug?)
Hello, Using Word Smart Tags Sample sample. Smart tags get processed only if there is no other Word windows open. If there's ANY Word window, or even a hidden WINWORD.EXE server process running, VSTO smart tags are ignored. Such behavior sadly renders Smart Tags useless for users who keep an open instance of Word for any editing purpose. Even Outlook with Word as the editor may cause this. Note, this applies to VSTO smart tags only, the shared COM smart tags work OK. Here is how to repro: Download and compile the Word Smart Tags Sample sample. Open WordSmartTag.doc from <sample folder>\CS\bin\Debug ...Show All
Windows Forms Adding TableAdapters to a form
Hi, I have a question regarding the process of adding a TableAdapter to a Windows Form. I know that I can drag a table from a data source and it will add the adapter along with the dataset and the binding controls. However, I want to know if there is another way to add it to the form when all I want is the TableAdapter and not the binding controls. I tried selecting the "none" option in the list beside the table but it won't drag anything onto the form when that option is selected. I have already created a typed dataset and have an xsd file containing the adapter in the project. Also, is the presence of the ...Show All
SQL Server Tempdb shrink (newbie)
Hi, I'm running Sql 2000 with many users logged in. My tempdb database has grown to a large size 3/4 of it free space. Is there a way to shrink the database while users are logged on. I tried using the enterprise mgr. to shrink the tempdb database, but it did not work. How can I shrink this It's using a ton of free space. Thank You in advance 3 ways are explained in this article http://support.microsoft.com/Default.aspx id=307487 Denis the SQL Menace http://sqlservercode.blogspot.com/ ...Show All
SQL Server Failed to reinstall sql server 05
Hi guys, I had sql server 05 RTM Developer installed on my laptop before and decided to remove and reinstall it. because i want it on a different drive. I went ahead and uninstalled everything that had to do SQL Server 2005. When I come to reinstall it, it throws me with an error saying, - Performance Monitor Counter Requirement (Error) Messages Performance Monitor Counter Requirement The System Configuration Check for Performance Monitor counter registry value has failed. For details, see How to: Increment the Counter Registry Key for Setup in SQL Server 2005, in the readme file or in SQL Server Books Online. I looked up the f ...Show All
Visual Studio Team System Question about CA1819: PropertiesShouldNotReturnArrays
Heya folks, i have a property that returns a byte array /// <summary> /// Binary data of the ringtone. /// </summary> public byte [] BinaryData { get { return this ._binaryData; } set { this ._binaryData = this .PropertySetter( value , "BinaryData" ) as byte []; } } now i get a warning saying i shouldn't return arrays from properties. Hmm. ok - the rational (if i have understood it correctly) is becuase the array is not write-protected and therefore not tamper-proof. So, when i make two methods (a getter and a setter) i get asked to make a property! :) haha. so, may ...Show All
SQL Server wmi event watcher task
hello i would like to know how i can retrieve the file path+name of a file detected by the WMI Event Watcher task, so that I can assign this to a variable for an Import task thanks You cannot. Ideally you would expect the query result to be available in the event for example, which follows the pattern for most events, but that is not the case. I did raise it some time back, but you may wish to log it via the Feedback Center http://lab.msdn.microsoft.com/ProductFeedback/ An alternative may be the File Watcher Task ( http://www.sqlis.com/default.aspx 23 ) ...Show All
Visual Studio Express Editions Tab pages- enabling and disabling (or mimicing as seen in C# thread)
I had a search for this and found something about mimicing the enabling and disabling of tabpages but unfortunately couldn't convert it from C# (im a beginner and only with vb). I have a shared variable called op as a string. It has three states, "Add", "Edit" and "Delete". When i open the form (with three different buttons) it changes the variable as required. I have three tabpages add, edit and delete and i want the other two to be unselectable.( I didn't want three different forms). Is there any way i can do this I tried playing with the tabcontrol_selecting method, but have had no success. Cheers. -- A ...Show All
SQL Server Best Practice - Lookup or SQL from Variable?
Hi, I am pulling data from FoxPro tables into SQL 2005, and want to only pull new or changed rows. Accordingly each table in Fox has a column LastChangedDateTime, indicating the last time the row was updated, and I have a table in SQL which has one row per Fox table, listing the table name and the most recent data pulled into SQL. In 2000 DTS I would have pulled the SQL datetime value into a package variable, then used a parameterized SQL statement with ".. WHERE LastChangedDateTime > " to select the rows I require. In SSIS this approach does not seem to be possible, and the options are that I either use a variable for ...Show All
Visual Studio Team System Invalid Drop Location
In the New Team Build Type Creation Wizard, why doesn't the Drop location allow hidden shares \\ComputerName\sharename$ It doesn't like the $, but I think this should be allowed. I'll file a bug for that. Does the build work if you check out and edit the TfsBuild.proj file to use that drop path after going through the build wizard You'll have to escape the dollar sign. See http://msdn2.microsoft.com/en-US/library/ms228186.aspx (though it doesn't list the set of special characters). Buck ...Show All
Visual Studio Team System Attachment download
Hi, I am trying to extract attachment from TFS back to file system through OM API. In beta2 there was Attachment.CopyTo method. It is not there in beta 3 refresh. The only thing I found is DownloadFile method of ClientService, but if it is correct path, how I can get AttachmentId Can anybody point me in right direction Thanks in advance, Leon Leon, sorry for delay in responding to your question. We see that attachment id is not exposed in OM, and hence using WS is harder. Instead below is a simple function to download data directly from attachment Url which is exposed in object model: private static void DownloadFile( ...Show All
Visual Studio Help with initial toolwindow placement, sizing, and drawing
Hello, I have a toolwindow in which I am placing a UIHiearchyWindow control. My goal is to have the toolwindow's default position be docked in the same tab group as the Solution Explorer, Class View, etc. In an attempt to accomplish this, I am using the following registration attribute on my managed package: [MSVSIP.ProvideToolWindow(typeof(AltHierarchyWindow), Style = VsDockStyle.Tabbed, Window = "{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}", Orientation = ToolWindowOrientation.Bottom)] What I'm experiencing is the following: 1) Toolwindow does not have its initial placement in the same tab group as Solution Explorer and ClasView ...Show All
Visual C# Icon in Form
Hi All, I would like to make to change icon in the same form. By this means that the form has 2 functionality: when functionality is changed also icon must be changed in the same form. Is there any ideas for solving the problem Many Thanks. Hi all the problem is how to implement changing the current form icon property In case of .Net 2005, it is fine to change icon by adding icon in folder of resource, but when I try to add in .Net 2003 it is not. if ( this is form B, pop-up form A) { this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); } else this.Icon = ( ...Show All
Visual Basic specifying relative folder paths
Hi -- I've built a simple Windows application with VS2005 and I'm having a problem with specifying folder names. My application folder has a subfolder called Images and I reference this folder in my code like " ../Images ". (Notice the double dot in order to go up and out of the bin folder and into the Images folder. Now when I deploy my application, the user will not be running the application from the bin folder so using the double dot will result in a file-not-found error. How do I specify the correct path no matter where the application is run from Should I create an Images folder as a subfolder from the bin folder I ho ...Show All
Visual Studio Express Editions visual Basic Activation
As you mention in FAQS i followed the manual instruction for installing visual Basic Express without connection to internet its ok , but after 30 days it asks to activate the product & i can't use it any more while in your FAQS its mentioned that if its installed without internet connection (that i dont have) the product never ask for activation . thanks ...Show All
