kennm's Q&A profile
Software Development for Windows Vista Truly Dynamic Runtime Activity Property Nirvana
I'd like to acheive "Truly Dynamic Runtime Activity Property Nirvana". My most critical custom workflow activity needs to expose a list of items that is not known at custom activity compile time. Each item in the list can be bound to from other activities - this is a pretty powerful concept for our workflow application that makes it very useful for end users that design their own workflows with my custom activity. I've figured out a solution where this dynamic custom activity is possible but it involves dynamically generating / compiling a brand new custom activity class on the fly - not the prettiest solution and I'm trying to create a better solution. Ghenadie has a neat example of how to create dynamic properties here ...Show All
SQL Server SQL Mobile 2005 NVarChar Truncation Problem?
I have a field in an .sdf database which is an nvarchar(350). I'm accessing the database using .Net Compact Framework 2.0 and have setup the SqlCeCommand as follows: SqlCeCommand command = this.conn.CreateCommand(); command.CommandText = "INSERT INTO Items (FeedID, Title, Link, Description, PublishDate) "; command.CommandText += "VALUES (@feed, @title, @link, @desc, @date)"; command.Parameters.Add("@feed", SqlDbType.Int); command.Parameters.Add("@title", SqlDbType.NVarChar, 75); command.Parameters.Add("@link", SqlDbType.NVarChar, 300); command.Parameters.Add("@desc", SqlDbType.NVarChar, 350); command.Parameters.Add("@date", SqlDbType.DateTime); command.Parameters["@feed"].Value = article.Feed; comma ...Show All
Visual Studio Express Editions My.Settings file location
Hi. Is there an easy way to change the location of user config files without having to re-write the entire settings class and provider Reason: I'm the only user of my PC, and I do a lot of small samples that never make it to real life (at least, not on their own.) Usually when I'm done with the test/sample project it's deleted or at least never used again. Then I have several unused user configfiles floating around in the Application Data folders. What I would like was, to be able to save the config files in the bin folder, so if I choose to delete a solution, the config files are deleted as well. I have no need for individual user files. Just one. The Application Settings would be ideal, except that they are read-only. Is ther ...Show All
SQL Server Setting up log shipping in a clustered environment
Hi can anyone help with a step by step instructions on how to set up log shipping in a clustered envionment I aware that your need to set up a clutered share but am looking for as much details as possible. Thank your for your help in advance. As you indicate, the best practice (independent of clustering) would be to ensure the backup share be on a separate server from the principle or secondary. That way a complete loss of either the principle or secondary does not lose the files that have been backed up to the share. The location to which log files are copied should be associated with the secondary so that they are treated as a unit for the purposes of failover. -Matt Hollingsworth ...Show All
.NET Development those extra columns in the Feature Table
Just curious to know what are those extra columns in the Feature Tables of the .NET framework MSIs Short answer: the extra columns are not really used for anything in .NET Framework setup. Explanation: the extra columns in the Feature table are a side-effect of the internal MSI build system that is shared with the Visual Studio family of products. Visual Studio setup has a feature tree that allows advanced customization of feature install locations and run-from-source options. Those extra columns in the Feature table control the parameters of customization, and provide additional descriptive text. The build system outputs those extra columns for all products, but since .NET Framework setup doesn't have ...Show All
SQL Server sqlxmlbulkload into tables with computed fields
I'm using sqlxmlbulkload (versions 3 and 4) to import large volumes of data into sql server (2000 and 2005) tables. Some of the tables have computed fields. Currently I need to drop the computed fields before the load as the load displays a message "The column xxxx cannot be modified because it is either a computed column or is the result of a UNION operator". The computed columns are not included in the XSD schema. Is it possible to use sqlxmlbulkload to load data into Sql tables with computed fields (without first removing the fields). ...Show All
Visual Studio Team System Merge/shelve/Source Control Explorer Strangeness???
Here is the scenario as best as I can describe it. I'm hoping someone can explain why/how these things can happen. 1. Developer#1 attempts a merge from top of tree to branches\v1.0.x, gets some type of error (maybe SQL error but it put pending changes) Any ideas of what can cause sql errors 2. Due to the error that developer was seeing I (Dev#2) did the merge with no errors and shelved my changes for that developer to unshelve, review then checkin. The developer did this. 3. Developer #3 At some point during the above did a shelve of items they were working on in the branch. 4. Developer #3 notices a branches\v1.0.1 tree with just the files from Developer #1. They also notice some items in the shelve they did show up in v1. ...Show All
Visual Basic adding image in imagelist at run time
how to add image in imagelist at runtime and displaying the index of the image in textbox Me . ImageList1 . Images . Add ( "TheKey" , Image . FromFile ( "MyImage.jpg" )) Me . TextBox1 . Text = CStr ( Me . ImageList1 . Images . IndexOfKey ( "TheKey" )) ...Show All
Visual C# Question about indexed and non-indexed bitmap!
Hi,I have three Questions: 1. How can I know whether a bitmap is a indexed one or non-indexed one 2. How can I convert non-indexed bitmap to indexed 3. How can I convert indexed bitmap to non-indexed 1: Use the Image.PixelFormat property 2: GDI+ doesn't support this. There is however a trick available that you can play with the GIF image encoder. The result isn't always very good, the encoder uses dithering if necessary. You can only generate the 8bpp indexed format. Here's the code: public static Image Image2Indexed8bpp(Image img) { System.IO.MemoryStream buffer = new System.IO.MemoryStream(); img.Save(buffer, System.Drawing.Imaging.ImageFormat.Gif); buffer.Seek(0, System.IO.SeekOrigi ...Show All
Visual Studio Team System Any hints of migrating 1.32 custom rules to work with 1.35?
Is there anything i need to do to a 1.32 rules (besides compile it against .Net 2.0) to get it consumed correctly by FxCop 1.35 The rule compiles correctly, but when FxCop trys to load the rule i get the following error Unable to load rule assembly 'c:\program files\microsoft fxcop 1.35\Rules\MyCompany.FxCop.Rules.dll': Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. It loads just fine in FxCop 1.32, on a different server, compiled against .Net 1.1. oh yea...except for changing the OpCode enumes, like Beq_S1 to Beq_S, Bge_Un_S1 to Bge_Un_S, ect. Changing the class FxCopOm from public to internal, totally removing the class TypeMemberSn ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Render scene into cubemap
Trying to make subject working. The problem is in the fact that cubemap axis are left-handed, but my camera is right handed, so my NegativeX and PositiveX are both reflected - picture is broken. Should I use left-handed camera when rendering scene into cubemap If answer is "yes", plz post some snippet about making left-handed view matrix in XNA. Really need your help. I save my cubemap after rendering into it, and then view it using directX texture tool. "It doesn't work" means that total picture in cubemap is still broken into unconnected parts. Well, look: i've render a scene looking (0,0,-1) into NegativeZ, than looking (1,0,0) into PositiveX. But in cubemap PositiveX is connected t ...Show All
SQL Server How do you get the last modified date column in SQL Management Studio
In 2000, the last modified date was show as a column when viewing the various database objects. So, after a long off-line session with a copy of a database, you could sort the query list, by last date modified, and script the recently changed queries to a file. It was very easy to see exactly what was changed recently. How do you do this in 2005 thanks lkh wrote: One other thought....SQL Server Service Pack 2 will be released soon. It has a new feature, Custom Reports, that will allow you to create a report based on any system object with the columns you want sorted the way you want and attach it to the node you want in Object Explorer. Books Online will have How-to infor ...Show All
Visual FoxPro Preventing key strokes to be passed to control
Hi, I have a form that needs to read data from a bar code reader. The bar code reader connects to the keyboard plug and functions like a keyboard. So what I would like to do is to have the user click a "Barcode Read" button and then scan all the bar codes he needs to scan and then click a "Done" Button. I was going to intercept the barcode data in the forms "Keypress" event and store it in a table. Problem is that I have so far found no way to stop the keypress data to be passed to the current control. As each set of data is terminated by a CR each time a barcode is read you jump to the next control and when you get to one of the buttons <CR> just clicks that button. So what I need is to intercept the ...Show All
.NET Development WSE 3.0 get UsernameToken
How do i get my UsernameToken in a web Service [ WebMethod ] public string HelloWorld() { UsernameToken token = // how String username = token.Username; return username ; } Thanks. Paul. this .User.Identity.Name is not working. Im using a custonUsernameToken Class for user authentication against a database, does this matter as im not using windows user accounts If so, what do i need to do ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA Game Studio Express is ready for download!
Get it here: http://www.microsoft.com/downloads/details.aspx FamilyID=21e979e3-b8ae-4ea6-8e65-393ea7684d6c XNA Dev Center (going live soon) will have the readme file. Enjoy! ...Show All
