adamb99's Q&A profile
SQL Server How to work out the difference of two numbers in SQL table.
Hi I have 2 columns the first column is a counter thats always counting up like a meter, the second column is a formula that calculate the difference between the counter(column one). like Counter Difference 1 1 3 2 6 3 9 3 11 2 13 2 17 4 25 8 The first row is taken as it is, but the second row will be difference = 3-1 the third one will be 3-6 and so on. How can I do this in a SQL table or any other away Your help will be highly appreciated. Here is a solution for 2005. If you are using 2000, you can replace the CTE with a temp table and identity pretty easily: create table test ( c ...Show All
Visual Studio 2008 (Pre-release) Missing references in basic WPF example
using System; using System.Windows; using System.Windows.Forms; namespace AvalonApp { class MyApp : Application { [STAThread] static void Main() { // the WPF message box MessageBox.Show("Hello, Avalon"); MyApp app = new MyApp(); } } } Hi all, Im trying to execute the above piece of code but its thowing up an error on my class definition "Error 1 'AvalonApp.MyApp': cannot derive from sealed type 'System.Windows.Forms.Application' C:\Documents and Settings\Gerard\My Documents\Visual Studio 2005\Projects\Avalon Example\Avalon Example\MyApp.cs" Does anyone have any suggestions Apologies if this problem is a bit trivial. (I've installed the .NET 3.0 framework and Windows SDK RC1 ...Show All
SQL Server how to do this in SSIS? soory if i m a noob
Hi all, Am trying to setup a SSIS package between a sql2000, sql2005 source and a sql2005 destination. I have 2 concerns, firstly, due to performance reasons (we have 2 huge legacy databases): After 1st run, Source table has: 1 - 1000 records Destination table has: 1 - 1000 records For 2nd run, Source table has: 1 - 1500 records Destination table has: 1 - 1500 records How I insert only the 1001th record - 1500th record, without touching the 1st to 1000th record Secondly, if there are any changes in values in the records 1st to 1000th record, how to I compare and only update the value that has changed Is there any particular configuration setting in sql that I can use Many thanks for any help provided. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Meshes, Shaders, Animations...OH MY!!!
Hi Everybody. So far I've been really impressed with XNA and seeing stuff I create play on the X-360. I've had success creating a game in 2D and am now moving into the 3D realm...which consequently has led me to a few questions. First, for reasons unexplained ( $$$ ) I've found myself with copies of MilkShape 3D and Ultimate Unwrap 3D, and have managed to create a mesh that has an animated walk cycle, and then successfully imported and viewed it in a 360 project ( animation less of course ). So, now I'm at a crossroads, and due to my lack of experience I'm coming to you guys for direction to keep my expectations in check and find what reasonably I could and should do. Just a little background on myself, I've been doing C# bu ...Show All
Visual C++ How to show HRESULT in messagebox
Hi all , How to show HRESULT in messagebox. Your help would be appreciated. -Rups I am getting this error when i tried below code: CString s; s.Format( "%d" , hr); AfxMessageBox(s); Error 1 error C2664: 'void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)' : cannot convert parameter 1 from 'const char [3]' to 'const wchar_t *' d:\rupeshtrainingprograms\delete\delete\deletedlg.cpp 198 ...Show All
Visual Studio 2008 (Pre-release) XAML/C# Singleton class?
What is the best way to implement a singleton pattern in XAML/C# Haven't gotten this to run correctly... I guess it's the way the XAML and C# are tied together... XAML shouldn't really get in the way here. < Object xmlns = " clr-namespace:System;assembly=mscorlib " xmlns:x = " http://schemas.microsoft.com/winfx/2006/xaml " x:Class = " Singleton " /> using System; public partial class Singleton { private static Singleton instance; private Singleton() { InitializeComponent(); } public static Singleton Instance { get { if (instance == null ) { instance = new Singleton (); } return instance; } } } ...Show All
Visual C# how to make trial version
i want to make my application useable for un licensed users accessible only for 25 days. can u tell me best approach to do that which saves me frauds like some users put their date back and like that There is no one and simple solution for this. The best way is to use web services for this, and check that clinet license at your license database. Also you can store the number of days changed at user machine and increment that number for every changed day and store that number somewhere hidden and encrypted. ...Show All
Visual Studio Team System VSTS to Project Server Synchronization
Hi, I am developing application for synchronizing VSTS WorkItems at task level to Project Server. I am able to synchronize all the fields ofwork item except Baseline Start Date, Baseline End Date and Baseline Work. It is getting properly assigned in coding but when I open Project Professional, it display NA for Baseline start date, baseline end date and '0' for Baseline work. Other fields value are getting reflected properly. Is there some problem with Project Professional setting If anyone knows about it, please let me know. Thanks, Chandrakant Patil. Hi Patil, This is the known issue and i am not sure this bug has been fixed in SP1 release...i am also testing the same with MPP...what actually is the problem...is ...Show All
SQL Server Your upgrade is blocked.. when adding components to SQL 2005 Standard Edition SP1
Name: Microsoft SQL Server 2005 Tools Hello, I am having a problem when trying to add the Client Components to an existing installation of SQL 2005 Standard Edition SP1 running on Windows 2003 Standard. The server was originally built with SQL 2005 Standard Edition and had SP1 installed at a later date. I am using the CD that SQL was originally installed with which is not a service packed copy of SQL. The reason given when clicking the details button is as follows: Reason: Your upgrade is blocked. For more information about upgrade support, see the "Version and Edition Upgrades" and "Hardware and Software Requirements" topics in SQL Server 2005 Setup Help or SQL Server 2005 Books Online. Build version ch ...Show All
Windows Forms How to navigate between muliple screens?
Hi, I am trying to create an winforms (v2.0) application and I need to use multiple screens. I am not sure how to create multiple screens that become visible/invisible when users click different menu items on the menu strip. 1)Should I use form inheritance for this How do I embed one form in another I can only get it to pop up a new form. I need to embed one for in another... 2) Should I use a panel to group the screen controls on and then make the panel visible and invisible depending on what menu item the user selects None of the above things have worked for me. Thanks David Hi David, I think I'm missing something - does every form need to be shown within your main application form Or can they be sepa ...Show All
SQL Server SQL 2005 Sp2
I would like to know the official release of SQL 2005 Sp2. Right now I can see SQL Server 2005 Service Pack 2 - Community Technology Preview (CTP) December 2006. You can expect the release of SQL Server 2005 SP2 in the next 30-60 days. Current plans is to ship in first Qtr. Thx Ajay ...Show All
Visual Studio 2008 (Pre-release) Bug? ...Attribute On Interface Not Working
I have an attribute: [ ServiceContract (SessionMode = SessionMode .Allowed, CallbackContract = typeof ( ISubscriber ))] I want to use the attribute on an interface IPublisher that a class of mine implements. Unfortunately, the attribute only works if applied directly to the class, not the interface. I get a runtime exception saying that ServiceContract needs to be applied to the interface or class (which it already is). I assume this is a bug. Also, something with a configuration leaves the app saying it can't communicate becase the ServiceHost is in a "Faulted" state. I seem to be able to programmatically do want I wanted to do in the configuration, but does anyone know what might be going on with that ...Show All
Visual Studio Express Editions How do I transfer a dll to another computer and have it work?
I have created a dll with Visual Studio C++ Express 2005 and it works great on my development computer but I cannot transfer it to another computer and have it work. I have read many posts on this forum, dl'd vcredist_x86.exe from Microsoft and ran it on my target computer, have copied the ms*80.dlls to the same directory as the dll, etc. and nothing works!!! Any help anyone could give would be most welcome. I am using this dll in a Java program so I don't have a .exe. The exact error I get is java.lang.UnsatisfiedLinkError: <filename of .dll> This application has failed to start because the application configuration is incorrect. ... Lokar wrote: I have created a dll with Visual Studio C++ Ex ...Show All
.NET Development ICorProfilerCallback::Shutdown not called
Hi all, I run NCover to get coverage results from my .Net assemblies. In some circumstances I get no coverage information. After some investigations I found that NCover uses the profiler callback and the shutdown callback is not called in this case. Which circumstances may lead the CLR not to fire the shutdown callback I read the profiler.doc, but the few hints are not true in this case. Unfortunatelly my test envrionment is too complex, thus I'm not able to figure out the root cause. Having some hints I possibly can figure out what may lead to this problem and how it may be handled. Ciao Thomas Hi, Thomas! Shutdown of an app is extremely tricky and has lots of cases. ...Show All
Smart Device Development tab control and Visual Studio 2005
Hello! I tried out the tab control in Visual Studio 2005, created a new project and drew a TAB control onto the about dialog box. There were 5 tabs by default, I tested the dialog via 'test dialog', it was OK. But, when I deployed it into the emulator device (F5), there were no tabs. So the question is, how should I use the tab control Thanks In my copy of VS there are only two tabs by default and I can see them just fine while running the application. Are you talking about ASP.Net project If so you’re in a wrong forum. ...Show All
