Michael Barrett's Q&A profile
Windows Forms Datagrid
hi everybody, hi have a set of data bind to a grid view but how to i click on a particular field to prompt a textbox inorder for the user to change the data. Any idea Your sincerely, Cindy Hi Cindy, are you working with the DataGridView in Windows Forms If so, you might want to set your grid's EditMode property to EditOnEnter. I hope this helps, Andrej ...Show All
SQL Server RunningValue ?
I am having problems with the following - this represents the dataset Date Customer Voucher Number Document Amount Check Amount 7/15/2006 Company G 101 15.00 45.00 7/15/2006 Compnay G 101 25.00 45.00 7/15/2006 Compnay G 101 5.00 45.00 7/18/2006 Company A 102 35.00 35.00 7/25/2006 Company M 103 45.00 50.00 7/25/2006 Company M 103 15.00 50.00 This represents the final report this is what I am getting Date Customer Voucher Number Document Amount Check Amount Check A ...Show All
Visual Studio Team System questions about reports
Hi, I have the following questions: 1- How can I run/generate a report Suppose I add a work item with VSTS, If I display a report showing work items, it will no appear. I have to wait about 30 minutes. I guess the report is generated every 30 minutes. How can I manually run the report 2-I am trying to create a report. MSDN says that we need to install SQL Server Business Intelligence Server Studio (because it does not appear when i click on File->new project). But how can I install it Can I download this somewhere Actually I thought it was packaged with SQL Server 2005, but it is not. I have SQL server 2005 on the same machine and can't find it... Thanks for your help Rod 1 - Take a l ...Show All
.NET Development Generate a Class from an XML file
I have a challenging idea that hopefully someone has some ideas on how to solve... Does anybody have any ideas on how to go about creating a .NET class whose sole purpose will be to read in an XML file and, based on the data contained within the XML file, from it will be able to dynamically create a class I'm not talking about an object of the class, because obviously there's many options to do that. I'm talking about creating the entire class and everything in the class; the name of the class, modifiers, members, methods, properties, etc. I'm not concerned about logic/decision making inside the class, nor am I concerned about events, delegates, threads, and other advanced topics, just the basics that I mentioned. I ...Show All
Visual C# Mixed languages in Visual Studio
Can I use mixed languages in Visual Studio i.e. some source files in C# (.cs), others in C++ (.cpp) you can add several various .NET language projects in 1 solution yes, but in terms of C++ I'm not sure and don't quite think so, but do not quote me on this. if its a VC++.NET then perhaps so yes but either way you need a new project to include those supported language files in the project ...Show All
SQL Server OO Database Design performance question
I am hoping someone has had a similar table design scenario and has a slick solution that i am not thinking of. Basically I have the following tables (kind of OO based design in this case). Create Table Entity (EntityID int, EntityTypeID) Create Table Company (EntityID, CompanyName) Create Table Contact (EntityID, FirstName, LastName) Create Table Group (EntityID, GroupName) Basically an Entity can be a Company, a Contact or a Group based on the EntityTypeID The trick becomes when I get an EntityID is how to get the name of the Entity in an efficient manner. You can make a view that does a Union to all three tables like such... select CompanyName as Name from Company union all Select FirstName + LastName ...Show All
Visual C++ Build process: TargetDir - lower case
Today I wanted to change the output directory of one of my projects. The default behaviour is that the compiled exe is placed into a directory called "release" or "debug" (notice the lower case format). I wanted to change these names into "Release" and "Debug". When I looked into the definition of the macros I found out that the TargetDir property seems to be automatically converted to lower case: OutDir: "D:\Development\Testing\Dirs\Debug" TargetDir: "d:\development\testing\dirs\debug" How can I change the TargetDir Why is it converted to lower case Try changing it as described in http://msdn2.microsoft.com/en-us/library/ms165410.aspx Hope t ...Show All
Visual C# Why did I only get part of what I intend to get?
No error was complained! The following program is to write a whole year's month,day,weekday in a MSSQL table. But somehow, for many times I have tried, but each time I got only part of what I intend to get: the whole year with 12 monthes, instead, I only got 3 or 4 months' content in the table. Can anybody tell me why calendar.dll using System; using System.Configuration; using System.Data; using System.Data.SqlClient; using database; namespace calendar { public class calendar { private int _nian; //year private int _yue; //month private int _ri; //day private int _xingqi; //weekday private string _errorInfo; public int nian { get {return _nian;} set {_nian=value;} } public ...Show All
.NET Development Headache with OnBeforeUnLoad and postback
Hello, I have an OnBeforeUnload for my page to check if some textbox fields have been changed, I also have a Save button to save changes, I also have a navigation menu. The question is: when there is any changes to the textbox, and if I choose to navigate away through the menu, I get pop up confirm box, and this is correct. But if I click on the Save button, because it will cause a postback, the OnBeforeUnload is also raised, this is not what I want. Can anyone tell me how to fix it Thanks. I am not too familiar with JScript, but here's the answer in javascript, hope it helps: Your javascript should look something like this: <script language=javascript> var changeMade=false; window ...Show All
Windows Forms !!!HELP!!! Is ClickOnce useless? Publishing a Clickonce application after certificate renewal.
I recently renewed my certificate through thawte and found out after signing our clickonce application that clickonce does not play well with the renewed certificate. The problem seems to be that during the process of renewal, thawte and apparently others require a new private key to be generated for the renewed certificate. So it seems there is a critical flaw in the ClickOnce architecture if it requires your code to be signed but can't handle the industry standard of renewed certificates. The only other option is to be your own certification authority but that requires distributing your CA certificate before clients install your application. If we have to have our clients uninstall our software and reinstall it because of this, then ...Show All
Visual Studio Tools for Office Control Break in Visual Studio VSTO, Word does not recognize break
I placed a control break in the vb code inside VSTO and Word does not recognize it. It runs and ignores the break. How do I make it to stop on the break I set in VSTO. I placed a break here, I placed a debug control break in the code in Visual Studio, but I was unable to let Microsoft Word to understand this. It would not break for me to do a step through. Is there a setting that I need to turn on to do this At startup I have the following code: Private Sub ThisDocument_Startup( ByVal sender As Object , ByVal e As System.EventArgs) Handles Me .Startup Dim oPause As Object oPause = False Me .MailMerge.Execute(oPause) End Sub I placed a break at : Private Sub ThisDocument_ ...Show All
Software Development for Windows Vista Windows Workflow Code snippet insertion not available
I am working with Windows workflow and going through some labs from MS. One of the task is to use the Code Snippet option to insert for example a DpendancyProperty The problem is when I right click and select Insert Snippet I can only see the following C#, Office Development, My Code Snippets; I cannot see the option for Workflow I am able to develop other workflow applications but cannot the Workflow option for Insert code snippet. Any Ideas why. I have run the "intergrate Windows SDK with Visual Studio for WWF. Thanks Javahar Hi Javahar - As Elif pointed, we are not sure what do you mean Integrate Wondows SDK with VS for WWF - I am assuming you want to say VS ...Show All
SQL Server Log Shipping v Database Mirroring (again!)
Hi I'm looking at replicating our primary SQL server to a secondary offsite server (linked via 100Mb so effectively LAN speed). What are people's preference when deciding on a solution On the surface mirroring looks much better but having dug a little I've found it is recommended only 10 databases are mirrored per instance. That said, I've found a post from someone who is upto 58 databases mirrored. Are there similar limitations with log shipping Does anyone have any experience of mirroring and is using it in prefence to log shipping Our current recovery strategy is the classic restore the SQL dump from tape onto a rebuilt server so either method will be a vast improvement. None of our databases are mission critical that they ...Show All
SQL Server SSIS:package contains two objects with the duplicate name
public static void CreateDestDFC1() { destinationDataFlowComponent1 = dataFlowTask.ComponentMetaDataCollection.New(); destinationDataFlowComponent1.Name = "SQL Server Destination 1"; destinationDataFlowComponent1.ComponentClassID = "{5244B484-7C76-4026-9A01-00928EA81550}"; managedOleInstance1 = destinationDataFlowComponent1.Instantiate(); managedOleInstance1.ProvideComponentProperties(); managedOleInstance1.SetComponentProperty("BulkInsertTableName", "Employee"); managedOleInstance1.AcquireConnections(null); managedOleInstance1.ReinitializeMetaData(); managedOleInstance1.ReleaseConnections(); } //Second one here.. public static void CreateDestDFC2() { destinationDataFlowCompon ...Show All
SQL Server Not Connecting to a remote SQL server with OLEDB
Hi, I can connect to a remote SQL server with ADO.NET but not with OLEDB. I get ------------------------------ Test connection failed because of an error in initializing provider. Login timeout expired An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. Named Pipes Provider: Could not open a connection to SQL Server [233]. ------------------------------ Through the SQL Server Connection Manager, if I disable Named Pipes and enable TCP/IP, I get for OLEDB connection: ------------------------------ Test connection failed because of an error in initial ...Show All
