rekasnuh's Q&A profile
.NET Development Operator '+' cannot be applied to operands of type 'System.DateTime' and 'System.DateTime'
Hi guys, I am trying to add two DateTime instances together. One is an actual DateTime Stamp and the second is a TimeSpan Stamp. However I keep getting the following error.. class.cs(63): Operator '+' cannot be applied to operands of type 'System.DateTime' and 'System.DateTime' Does anybody understand why Also what should I do to add two DateTimes together. The code I am using is: if (thePaidGivenData.TimeStamp < (CloseTime+Time2Calc) & CcyCcy != CcyPair) { continue ; } else { return alPaidGiven; } Regards, Harry What are the data-types of all these variables Also, you might want to make your code more readable by doing something like this: if ...Show All
Visual Studio 2008 (Pre-release) FYI, Orcas CTP available
Just wanted to give a heads-up about the latest CTP that was just released, for those of you who are interested in trying out new WCF features we will deliver in Orcas: http://www.microsoft.com/downloads/details.aspx FamilyId=281FCB3D-5E79-4126-B4C0-8DB6332DE26E&displaylang=en Here's a snippet that describes the WCF/WF features: Windows Communication Foundation and Workflow Foundation WF Designer and Debugger integration with Visual Studio WF & WCF integration: New WCF Send and Receive Activities Enhanced Workflow and Service hosting Enhancement to WF Rules: Added support for operator overloading Added support for the “new” operator to allow users to new up objects and arrays ...Show All
.NET Development Stripping diacriticals from string?
Is there a .Net string method that will strip diacriticals from strings That is, what can I replace ToNoDiacriticals with to get the following to work: string foreign = "Bia owie a"; if (foreign.ToNoDiacriticals().Equals("Bialowieza")) System.Console.Writeln("Works!"); Actually, String.Normalize is the recommended equivalent of FoldString in .NET 2.0. As long as you agree with what it considers diacriticals it will do what you want. The results of FoldString depend on what NLS table is currently loaded--which means it will result in different conversions depending on the computer that runs it. A bit more research yielded: static string RemoveDiacritics(string stIn) { string s ...Show All
Windows Forms Power Point Show in WebBrowser Control ? Can it be done ?
how to view power point show inside a web browser control in an application form i have a powerpoint link ( local file ) , i need to make something like this : webBrowser1.Url = new Uri(@file://c:\whatever\yourpresentation.ppt) it doesn't work with me !!! I'm afraid, you cant use web browser control in that way. It is just for displaying Web pages in the form. And if you want to show ppt in the form, try to reference corresponding com component. ...Show All
Visual Basic Error when trying to run the debugger
Hi there, I've just started to write my first VB application. I have designed the UI but not done any coding. When I have pressed 'start' on the debug toolbar to view my new UI I get the following error message: ' Error while trying to run project: Could not load file or assembly ‘”Oli’s RSS Reader”’ or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)' I can't think why this is and i'm completely stuck as if I can't debug then I can't build! Any help is appreciated. Thanks Oli Hi DMan1, No 3rd party controls, no references apart from default. I thought it might be some kind of naming rule i've broken Still stuck i'm afraid. I can send you ...Show All
SQL Server Need help with Insert or Update from Excel
Hello - I have an Excel data source from a customer. The data source is a daily dump from the customer's HR system - bascially data about people. Some of these are new (to the data source) and some already exist in my database (from a previous import). What I am trying to do is: If the row in Excel is new, then INSERT the data into my table. If the row in Excel already exists in my database, then I just want to UPDATE the data in my table. The Excel data contains an ID field from the HR system that I store in my table for lookups. However, I also generate an ID from my table, when the data is inserted. I have a Lookup task that uses the HR system ID from the Excel file and this will return the rows that already exist. These are ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Sprite Sheets?
How can i use a sprite sheet instead of using single sprite files Thanks in advance. When I've done this, I tend to use a BMP or equivalent, with each of my sprites on it. I load it into a single Texture2D as usual. However, when it comes to drawing them, you use the overloaded version of the Draw method, which takes both the screen location rectangle and a source rectange (along with colour and the usual others). This second parameter is the location within the single sheet of the individual sprite I want to display. I'm playing with a Pacman graphic at the moment, so I have a bitmap which is 256 x 128 pixels. Each pacman is 32x32, and I've got 4 rows (representing the 4 possible directions) plus 8 ...Show All
SQL Server Unable to browse data in Dimensions or cube
The error I get says the provider cannor be found, it may have not been properly installed. I've re-installed Analysis Services, and still get this error. The Connection to the server (data sources) tests sucessful. What version of Analysis Services are you using What client application you are using to browse your cubes Edward Melomed. -- This posting is provided "AS IS" with no warranties, and confers no rights. ...Show All
Software Development for Windows Vista There's GetDefaultAudioEndpoint,but no SetDefaultAudioEndpoint
Hello, There's GetDefaultAudioEndpoint But I need to Set it Have a function doing that Tks. I found a sample file but I can't run it well. HRESULT SelectCaptureDevice(IMMDevice *pEndptDev); http://msdn.microsoft.com/library/default.asp url=/library/en-us/CoreAud/htm/devicetopologies.asp See it's remark: //----------------------------------------------------------- // The input argument to this function is a pointer to the // IMMDevice interface for a capture endpoint device. The // function traverses the data path that extends from the // endpoint device to the system bus (for example, PCI) // or external bus (USB). If the function discovers a MUX // (input selector) in the path, it selects the MUX inpu ...Show All
Visual Studio 2008 (Pre-release) WCF configuration and working
Hi all, I am using WCF to configure my server . In that i have a contract which is having many properties as wellas methods.All properties and methods in the contract is returning .net's datatypes. While accessing the service using client it is working fine. The problem is i have added on more property whihc will return a user defined class. whihc is created by me. i created client . while accessing that new property i am getting an error. "The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.9220000'." After this i can not acces other ex ...Show All
SQL Server Processing Cubes via a SQL Server 2000 DTS
Hi, I have a DTS which processes a set of AS 2000 cubes via a set of AS Processing Tasks. I want to know how I can accurately trap and report errors once a cube fails to process Thanks in advance Jon Derbyshire The logging of processing errors in DTS ( SQL Server 2000 ) is bit limited. You should try and look at migrating your application to SQL Server 2005 instead. I know it is bit a far fetched suggestion to migrate your whole solution to SQL Server 2005 just because of a single problem with accurately tracking processing errors. But the problem is: your will find increasingly harder to implement any new functionality with old version of the product. You will find it harder to find answers to your qu ...Show All
SQL Server ---PULL replication with SQL Server Express, it is possible whether or not?---
Hello! Question of such plan, to documentation to Microsoft SQL Server 2005 Express Edition it is written, that the given product supports only PUSH replication, however in his{its} structure there is an agent replmerg.exe which description says: replication merge. Synchronization means, that the agent of merge transfers changes from the subscriber to the publisher, and then transfers changes from the publisher on the subscriber … And so the question if this agent is present at this edition, whether that is possible to adjust manually his{its} call, or through Windows the agent, for realization PULL replication or it is impossible and for what reasons Thanks. I have bad understood th ...Show All
Visual C++ MultiByteToWideChar of VC8 went wrong, but VC7 worked.
Dear all, For example: MultiByteToWideChar(CP_UTF8, 0, str, (int)strlen(str)+1, wstr, 1024); Assume "str" is a "bo-po-mo-fo" Chinese phonetic alphabet such as "ㄉ", in VC8, this function always failed; however, it worked fine in VC7. Does any one know how to fix it Thank you very much! Sincerely, Mike Hi b6s, how does the function fail - what is the return value If your input is chinese you should provide the correct code page as first parameter. Something like 50936 for Simplified Chinese. Have a look at Code Page Identifiers in MSDN. -- SvenC ...Show All
SQL Server Conditional Formatting in Report Builder
Hi all! I would like to know if Conditional Formatting in Report Builder is supported in Service Pack 2 CTP. Thanks for your time. I am interested in conditional formatting for ad hoc reports as well. Is this something that will be available in the SQL 2008 release Thanks, Lisa ...Show All
Visual C# C# code to access a shared folder?
Someone opens a shared folder for me on a remote computer with a user name and a password. I can certainly map a local drive to that remote folder, but I wonder if I can write a C# program to access the folder without having to map. I've tried two APIs: The first is "LogonUser" which can not connect to the remote machine (the error code says " unknown user name or bad password "). The second is WNetAddConnection2 which connects but maps a local drive to it. These two APIs are not really C# APIs. They are Win32 stuff and called through PInvoke. I wonder if there's an elegant way to code it in C#. There has to be one given the large class library we have, right Got it. It can be done by ...Show All
