JH.'s Q&A profile
Visual C# global settings - saving problem
Hi I have a big solutions with many projects. I wanted to create global settings which would be visible from all of the projects. I created one project responsible for dealing with settings. It contains class public class P Settings : ApplicationSettingsBase { private static bool globalProp; [ UserScopedSetting ()] [ DefaultSettingValueAttribute ( "false" )] public static bool GlobalProp { get { return ( bool )globalProp; } set { globalProp= value ; } } etc. This project also contains class which has static fields for dealing with above settings. public class GlobalSettings { private static GlobalSettings instance; static GlobalSetti ...Show All
SQL Server Derived Column Comparison
I am importing States into a table and need to change all NULL fields before I perform a lookup. I'm using a derived column to replace the state value. I'd like to find all States that are blank and set it to "--". Ironically, this works: State != "" State : "--" but State == "" State : "--" Does not work Can someone tell me why Just a guess: the State column really has NULL values (vs. empty strings), which never compare equal to anything. But to explain why the first approach works, there must be some kind of implicit conversion going on. I think the right way to express what you mean is: isnull(State) "--" : State ...Show All
Game Technologies: DirectX, XNA, XACT, etc. makeing a racing game
I was woundering if i could make a nascar type racing game with xna. I don't like the current nascar games so i was wondering if i could make one myself XNA can do this, if you have a look at the video that is on http://letskilldave.com at the moment (in his last post), there is an example of an XNA racer game... ...Show All
.NET Development Comparing sql decimal to .net decimal
I pull decimals from a SQL 2000 database that have a scale of (14, 6). Let's say the value from SQL is 0, so it comes out 0.000000. I then do the following comparison: decimal x = 0; Convert.ToDecimal(column["column name"]) == x it comes back false. Why ! How can I compare a SQL decimal with a scale set to a local decimal 0 would not be equal to 0.0000 because you used == as your condition. == means that the two values you are comparing should be EXACTLY equal. It is better to convert both into the same format so that you can have accurate results in comparisons. you can add something like this inside your loop if (IsDecimal(column["name"]) == true) column[" ...Show All
SQL Server Any way to view <Long Text> In Data Viewer
I was wondering if there is any way to view <Long Text> in the data viewer I have a text data type, and when using the data viewer it just says "<Long Text>". That contains the data I actually want to watch... is there any way to get this ...Show All
Visual Studio How to add a file and project reference
My project creates a class library and a website. I am using the sample that installed itself and modifying it as needed. My samplesolution.vstemplate has the following entry to create my solution: < ProjectTemplateLink ProjectName = " APP_BL " > Projects\ClassLibrary\ClassLibrary.vstemplate </ ProjectTemplateLink > < ProjectTemplateLink ProjectName = " $WebSiteName$ " > Projects\WebSite\WebSite.vstemplate </ ProjectTemplateLink > There are certain dll's that I would like to reference in both the APP_BL library and the website that gets created. I also would like to reference APP_BL in the website as well. I have been unsuccessful in trying to implement Microsoft.Practices.RecipeF ...Show All
Visual Studio Team System Is Microsoft.Cci.dll redistributable?
I'm writing a standards-checking program which primarily parses C# source code (using the NRefactory library from SharpDevelop), and I sometimes need to relate the information in the source code to the compiled code in the resulting assembly. I'm currently using regular-old reflection to do this, but I've been poking around with the Microsoft.Cci dll from FxCop 1.35, and it's really nice. I'd like to use it in my app, and I was just wondering whether I'm actually allowed to do that. The license at http://www.gotdotnet.com/team/fxcop/Misc/eula.htm specifically says the component parts may not be separated for use by more than one user. I would say no, you can't redistribute. ...Show All
Visual Studio Tools for Office Excel Help [Hope posted in right place]
Hi everyone, Wondering of someone can help me on Excel i dont know if IF statements can do this BUT if you look @ this image! well what it is i need the spreadsheet to automatcally work out the discount for example "Example Jhon" spent 29.99 and i want the spreadsheet to work out the discount automatcally for 15% i know IF statmenet can do this but i need it to work out what discount theyll get Each price is going to be diffrent for example if someone spend 50 they would get 25% off i need excel to figure out what discount thell get automatcally Thanks for all help! Hi, This forums is for VSTO related questions. Please repost your question to Office Developer newsgroup . ...Show All
SQL Server SQL Create Trigger syntax
Hi, I have the following SQL and for some reason, I do no know why the keyword "REFERENCING" is not recognized by Microsoft SQL 2005 CREATE TRIGGER CDYearTrigger ON CDs AFTER INSERT REFERENCING NEW ROW AS newData FOR EACH ROW WHEN ( newData . Year IS NULL) ..... (This is not the complete code, but i keep on getting the error ' Incorrect syntax near 'REFERENCING'.') Does this has any SQL syntax or it just doesn't work on Microsoft SQL 2005 (Trial version) That is what I learned from school, and was wondering is there really a keyword call "Referencing" Thanks in advance! that is not a valid keyword in sql server 2005 her ...Show All
SQL Server SSIS DTC Transaction's HOT questions
I am using SSIS with Transaction, and I met a lot of questions as below: 1.IF DTC doesn't support ADO.NET Connection Please check the ADO.net Connection's property, it has a property named like: DTCTrancactionSupport. But it's always set to False and unable to edit. IF the answer is NO, HOW could I bound all my Tasks into one Transaction You know, I have some Tasks with SQL connection, and I have also some Script Tasks, witch need the ADO.net connection. 2.IF DTC required to run in both the Destination Server and the Source Server I have a Dataflow Task, and take some data from a table in a Source Server to a Destination Server. The DTC doesn't run on the Source Server. I found the Dataflow Task hangs when I use the SSIS ...Show All
.NET Development A name was started with an invalid character
To All I came across a distinct error. The details are below: The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. I am getting the same error. I followed Seabert's way and also others but it still does not work for me. We have published using VS 2005 IDE. OS XP2 VS 2005 Professional ...Show All
Visual Studio 2008 (Pre-release) RichTextBox, current inline element?
How can I find the ”current inline” element at the cursor position If I use “this.richTextBox1.CaretPosition.Paragraph.Inlines” I get all the inlines in the current paragraph. Best regards, Thomas S. Andersen You can cast it, currentInline = this.richTextBox1.CaretPosition.Parent as Inline, so obviously if its not an inline, it will return null. ...Show All
Visual C++ CPU temperature
How can I get CPU temperature without using any hardware dependent API. How is it possible in VC++. Can any one help me For such issues, please use the newsgroups at http://msdn.microsoft.com/newsgroups OTP Thanks, Ayman Shoukry VC++ Team ...Show All
Software Development for Windows Vista Unpredictable event reception in state machine workflow
Hi, I'm relatively new to WF, and developing a state machine workflow project. The workflow runtime is hosted in a windows exe which raises events to it when requests come in from a browser UI via a web service interface on the host. This all works fine.. sometimes! Specifically, when I'm running in debug mode through VS, the events get fired and everything happens correctly the first time through. But when a second request comes in from the web service, the host raises the event, but the workflow never hears it. And when I run the service as an exe, the workflow never picks up the events. In either case, no error is raised, but nothing happens. The data exchange service and my own service for the workflow events are correctly att ...Show All
Visual Basic Convert byte array to bitmap and vice-versa
Hi, How do I convert a byte array to a bitmap and vice-versa in VS2005 Thanks, Ivan From Image to byte array: Me .Picture1 = New Bitmap( Me .Image) Dim ptr As IntPtr ' Lock the bitmap's bits, get a BitmapData object Dim rectngl As New Rectangle(0, 0, Picture1.width, Picture1.height) Dim bmData As System.Drawing.Imaging.BitmapData = Me .Picture1.LockBits(rectngl, _ Drawing.Imaging.ImageLockMode.ReadWrite ...Show All
