RoMo's Q&A profile
Windows Forms Installer class
Hello, I'm new at deployment and Setup with VS .NET (C# application). I would like my setup program to APPEND the path of where the application is installed into the Environment variables Path registry (in the currentControlSet). In order to do this I created (after trying with the Registry View and not succeeding) an installer class in the project and where I override the Install method, and get the registry path registry key ...: RegistryKey regKey = Registry.LocalMachine.OpenSubKe(@"System\CurrentControlSet\Control\Session Manager\Environment", true ); string pathKey = regKey.GetValue("Path").ToStr ...Show All
Visual Studio Team System How to suppress instrumentation of dependent projects?
I have a solution with several projects: web application, web service, library dlls, etc. In my case, I have one library dll that I do not want instrumented (I'm only referencing a small portion of the code). However, it appears that if you choose, via the testrunconfig, to instrument one project output then all dependent libraries are also instrumented, even if they are not checked. I would like code coverage to be performed only for the selected projects. Is there a way to block the dependent projects or is this a bug I'm running the RTM Team Suite. I spoke to anothe ...Show All
SQL Server Setting the report language property programatically
Hi, I want to set the language property of a report programatically. I get the language locale at runtime and once I get it, I need to go to all the reports which are published or still are on the local system (in rdl format) and set the language property on each of the reports. Thanks, If you want the language locale to be the user locale at runtime, you can just set the report language property to =User!Language. Otherwise, you can pass in the language locale through a report parameter, in that case, you'd set the report language property to Parameters!<LocaleParam>.Value. ...Show All
Visual Studio Team System Incredibly (astronimically) slow performance on new RC of TFS
We upgraded from beta3 to RC on TFS. Also ran the 2.0 hotfix. I uninstalled the client (had no instances of vs2k5 running) and installed the new RC team explorer client. I also installed the 2.0 hotfix on my local computer. Now the SQL server runs on 100% load.. 'TfsVersionControl.dbo.prc_QueryItemsExtendedLocal;1' is running It loads the solution fine to a certain point, but then freezes. Getting latest from team explorer goes fine. Branching is successful, opening the branch, however, was not successful. It resulted in the same kind of freeze / cosmic slowness. On 1 out of 10 times, I managed to load the solution. From there it was fa ...Show All
SQL Server Database Diagram error on SQL 2005
I upgraded from SQL 2000 to SQL 2005. The database owner is sa and I am logging in as sa in Management Studio. But when I click on Database diagrams I get the following error "Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects." How can I fix it Can you run the sp_dbcmptlevel to check the db compatiblity level for the db you are havi ...Show All
Visual C++ ListView in Visual C++
Hi, I want to use a somekind of a "table" control in my form. The table columns consist of a nb. of units, a description and a unit cost. At the bottom of the table control, I would like to put a total cost of every items listed in my table (sum of (nb.units * unit cost) for all items in table). If I add a new record for which a same "description" exists in table, I will instead update this record and increment the "nb. of units". The table should be refreshed as far as I'm adding/deleting graphically modules units (GDI+). For cumulating the list of items, I thought of using an arraylist but I can't figu ...Show All
SQL Server storing values
I want to store the whole values returned by a while loop. How to do this my store procedure is like this create proc start_proc @country varchar(20), @c_code int, @p_id int, @out_put varchar(500) output as if exists(select start_date from new_start where country=@country and country_code=@c_code and program_id=@p_id) begin set nocount on declare @@msg1 datetime Declare out_put cursor local Scroll Keyset Optimistic For select start_date from new_start where country=@country and country_code=@c_code and program_id=@p_id open out_put fetch absolute 1 from out_put into @@msg1 while @@fetch_Status <> -1 begin print @@msg1 fetch next from ...Show All
Smart Device Development Registration Hang in call to _Module.RegisterServer in DllRegisterServer in a ATL COM dll
I have a large workspace I am moving from CE 4.0 to CE 5.0 and Visual Studio 2005. I used the built in import support to migrate the project into Visual Studio 2005. My problem is I have two dlls out of a dozen or so that hang at the call to _Module.RegisterServer(TRUE) in DLLRegisterServer. I can stop Visual Studio and it recovers but the CE device must be soft rebooted in order to do anything. This problem also occurs using the emulator. The dll can be manually registered on the device successfully. Any suggestions on debugging this or any idea what might be wrong I do have a test project for one fo the dll's that demonstrates ...Show All
.NET Development Converting between Ver 1.1 and ver 2.0 .net
Howdy, I have just written a small program in VB 2005 in .net framework 2.0, i wondering if there is a way that the executable could still run in ver 1.1 as i have been getting errors (ie not compatible!) The program is very simple, and i dont think i use any new "fancy" parts of 2.0 (I am very new to VB and .net....like today) thanks... Dwayne Ok, I tried a small experiment and Yes, you are correct. I got a "Application generated an Exception that cannot be handled" when I tried to force a v2.0 EXE on v1.1 So, I guess the only option is to rebuild the app for v1.1. Regards, Vikram ...Show All
Visual C# params and null value
Why does the following code writes "True" for the first F() call and False for the second one using System; class Test { public static void Main() { F("Test", null); // Writes True F("Test", null, null); // Writes False } private static void F(string arg1, params object[] args) { Console.WriteLine(args == null); } } Because in the second case, args is an array containing two objects that are null. If args is not null, you can check if args[0] is null, or even step through all the objects and see if they are all null. ...Show All
Visual C# Parsing a string
Hello guys, i'm searching for an advice of how to parse a string. here is an example: --bla345"cool"but no-- And I need only the text double closed by ", which is 'cool'. My second question is about parsing multyline comments /* */. So if i have --bla bla /*nice thing */ alabala-- my target is get the 'nice thing' string away of the "sentence". Hope someone will find time to help me :) The first can be done with the Split() method of the string object: ...Show All
Visual Basic Word Macro Help
I have a requirements specification in MS Word and want to design a macro to delete the tiltle page, table of contents, and everything between. I also want to remove the headers and footers. If there is a why to do this and open up a new document that displays what is left (minus the above) that would be better. Is this possible If so, could someone provide me with a code snippet thanks, Jon ...Show All
Visual Studio Express Editions Where's the Quickwatch window
Hi, In VS2003 I can get a quickwatch window when I select a valid exression and hit SHIFT+F9. This did not work in VS2005 Beta 2 and also does not seem to come up in the current VS2005 edition How di I get this to come up. Thanks tribal The Quick Watch dialog box is only avalailable on Visual Studio 2005 Professional and above. Of course, as you point out above, the hover debug watches provide a very useful substitute. Thanks, Scott Currie DDCPX Program Manager Microsoft ...Show All
Windows Forms windows distributed application and web application
I have developed a .net window application using a database connection string to access a network SQL server database. Now I was told that the front end window application will be installed on a doctor's home at California, and the SQL server is on a window 2000 server at New Jersay behind a firewall. The database connection string using a IP&nbs ...Show All
Windows Forms Datagridview and AcceptChanges
Hello I am using a databound datagridview. When I call the acceptchanges on the dataset that the datagridview is bound to, the current highlighted cell changes to the first cell in the row, but the actual focused cell stays where it was. My question is, is there anyway to get around this odd behavior So is the only way to clear the .Getchanges dataset through .Acceptchanges Thanks ...Show All
