menchie20's Q&A profile
Visual Studio Team System Unit Test - Private Accessor also generated for public method?
I have created a simple C# console application (using VSTS RC) and added a simple class containing a public method. Then a C# test project was automatically genreated. In the generated code I noticed that the test method still create a PrivateAccessor to test the public method. What's the reason for this behivior ///Production Code class Arithmetic{ public int Add(int i1, int i2) { return i1+i2; } } ///generated TestMethod public void AddTest() { object target = TestProject1.ConsoleApplication1_CAddAccessor.CreatePrivate(); .... } Li.Ming.Net wrote: class Arithmetic{ Because by ...Show All
Visual Studio 2008 (Pre-release) Problem with P2P
Hello, I am trying to run the "PeerTcp" sample on a fresh XP SP2 install. I installed and started the P2P windows service. However, when running the first receiver, I get the following exception. Any idea what could cause this Thanks System.Net.Sockets.SocketException was unhandled Message="Unknown error (0x2ced)" Source="System.ServiceModel" ErrorCode=11501 NativeErrorCode=11501 StackTrace: at System.ServiceModel.AsyncResult.End(AsyncResult asyncResult) at System.ServiceModel.Channels.PeerNodeImplementation.SimpleStateManager.OperationBase.End(IAsyncResult result) at System.S ...Show All
Visual Basic 2005 .Net Nightmare
As a visB programmer who has been happily coding very successful applications for many years, I have been shocked at the verbose incomprehensibility of the .net framework. Where is the wonderful Basic language that has served so well for so long Is there a way to disable all the garbage in VisB 2005 in order to just write simple single thread applications in the Visual Basic language I have been unable to get even the simplest microsoft SDK examples to run in .Net. I really don't want to invest in learning a language as complex and dense as the .Net applications, I don't believe I will ever need ANY of this functionality. The whole IDEA beh ...Show All
SQL Server Conditionally adding a column to my custom component
Hi, I am building a custom component have a IDTSCustomProperty90 property that can take the value 'True' or 'False'. Depending on its setting, I want to include (or not include) a column in the output. Any advice on how to go about doing this (with some sample code) would be much appreciated! Here's how I'm declaring the property in ProvideComponentProperties() IDTSCustomProperty90 IncludeErrorDesc = ComponentMetaData.CustomPropertyCollection.New(); IncludeErrorDesc.ExpressionType = DTSCustomPropertyExpressionType .CPET_NONE; IncludeErrorDesc.Name = "Some Name" ; IncludeErrorDesc.TypeConverter = typeo ...Show All
SQL Server Copy Database with "Transfer Database Task" breaks identity columns?
Hello all! I'm trying to do something which is seemingly simple, but I keep running into problems, so I am hoping for some friendly advice. I have a live SQL database running on a hosted Sql Server 2000. I'd like to copy that database to my local machine running Sql Server 2005. What is the easiest way to do this I tried creating a very simple SSIS package with one "Transfer Database Task" which does the database copy. This almost works, but all of my "identity columns" have been turned off for some reason. Is there a better way to copy a database Is this "identity" thing a setting I am missing or is it a known issu ...Show All
Visual Basic Regular Expression: Removing All Lines NOT Containing a Specific String
I know how to remove all lines in a file that contain a specific string using the IDE Find/Replace dialog and Regular Expressions For example, to remove all lines in a file containing the string ABC, you can use: Find: ^.@(ABC).@$\n Replace: (nothing) What I'm trying to figure out is how to do the opposite and remove all lines NOT containing ABC. Any ideas Thanks. I believe this regular expression you want to: ^[^A]|( ~(BC)))+$\n It will try to accept as many non 'A' characters it can, but if it does match an 'A', it will not accept a line with an 'A' followed by 'BC'. Y ...Show All
SQL Server Problem formatting currency to different decimal places
I'm trying to format a field value to currency on a SQL report. I need to allow for 4 decimal places to the right of the decimal if the field value contains those digits. (ie. $6.8484). Most of the time I will not have 4 places to the right of the decimal and would like to format according to the amout of decimal places. For example, If the value is 1 dollar, I don't want to format as $1.0000. I need a way to format the values according to the amount of digits to the right of the decimal. (ie. 1 dollar = $1.00, 3.453 = $3.453, 2.4453 = $2.4453) Is there an easy way to do this using C2,C3, and C4 Please help. ...Show All
.NET Development how to get some text into a XMLWriter?
This should be sooo easy. I've got a XMLWriter object I've got a XMLNode How do I get the XMLNode.OuterText into the XMLWriteObject without having to go through hoops messing about with streams, textwriters or any other derived stupidity or otherwise writing lines and lines and lines of code when I should be able to do this in about 3 lines These new readers and writers are rubbish. They just bend my head backwards every time I have to use them. Either I'm very very stupid, or they are just long-winded and illogical And please microsoft, tell w3c they can have thier own xml dom, just ignore them and write us one that isn't soooooooooooooooo ...Show All
Visual FoxPro dates
Hi, How would one manipulate a date field to run a query on it I have a field 'date' and i need all records w/ date >= 01/01/2004. is there way to perform a search like that Mike Mike, Assuming a date data type in your table: select * ; from TheTable ; into cursor TheResult ; where TheDateField >= {^2004-01-01} VFP uses date constants like this for non-ambiguous date constants across all possible date formatting. ...Show All
Windows Forms Licensing enterprise application with Serial # and Keys
Hi, We are developing an enterprise application. Here are our requirements: - turn on/off certain features of our application using some kind of license file. - Each license file should be unique to each of our clients and encrypted. - It should work only with the version it is given to. - Provide windows-XP like activation framework. - License should ...Show All
Smart Device Development How to start iexplore
How to start iexplore with html page from .NET controls I have CF 1.4. and System.Diagnostics.Process doesn`t exist :( Hi The OpenNETCF.org ( http://www.opennetcf.org ) Smart Device Framework implements a class named OpenNETCF.Diagnostics.Process which provides this functionality. Michael ...Show All
SQL Server Maximum number of databases used for each query in 2005?
In MS Sql Server 2000, if you run a stored procedure that query's more than 8 databases, you get this error gets raised: Maximum number of databases used for each query has been exceeded. The maximum allowed is 8. In 2005, does this maximum number still exist if so, is it still 8, or has the number been increased Thanks, Mike ...Show All
.NET Development Why does the BitArray use LittleEndian?
I'm curious about why System.Collections.BitArray uses Little Endian format. Was there a reason for this http://cplan.cse.msu.edu/cs/blogs/smithiscrazy/archive/2005/04/11/684.aspx And I think the BCL people should change it. BitArray uses little-endian format because you are running your program on a little endian CPU. BitArray stores the bits in an internal array of integers. So if the integers on your platform are little endian, your BitArray will be little endian too. If you look at the internal implementation of the constructor BitArray.BitArray(byte[]) (using a tool like Lutz Roeder's Reflector ), y ...Show All
SQL Server Rounding Values
Hi, How can I round a value to the next int number like all values > 1 and < 2 I need to round to 2 and on and on...to all numbers So If I have 2.1 it's 3 if I have 2.9 it's 3 ...and so on... Thanks ...Show All
SQL Server Convert from unicodestring to uniqueidentifier
Hello, I have a XML data source containing strings representing GUIDs (ie <modelAsset id="e04ba23c-0401-43a9-b40c-b4c3d580caa9" />) and I need to fill a SQL table with uniqueidentifier column. I added Data Conversion component setting the data type as DT_GUID. Running the package I get the following error message: Error: 0xC02020C5 at Import MyALM settings, Data Conversion [1301]: Data conversion failed while converting column "id" (4645) to column "GUID" (5912). The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.". Error: 0xC0209029 at Import MyALM settings, ...Show All
