BlackStallion's Q&A profile
.NET Development You need to add XmlChoiceIdentifierAttribute to the 'EvalDate' member.
Hello, I am trying to make a custom XMLserializer for my class. wrote a simple writeXML method for my class and it works. My class has int members. However, when I add a member of type datetime, the writeXML doesn't work anymore! This is the sort of an error i get: System.InvalidOperationException: There was an error reflecting property 'datetime member'. ---> System.InvalidOperationException: You need to add XmlChoiceIdentifierAttribute to the 'datetime member' member. here is my code for writeXML: public void WriteXml(String filePath) { StreamWriter stWriter = null; XmlSerializer xmlSerializer; xmlSerializer = new XmlSerializer(this.GetType()); stWriter = new StreamWriter(filePath); System.Xml.Serialization.XmlSerializerNamespac ...Show All
SQL Server Issues With SQL 2005 Encryption
Are there any pitfalls i should look out for when using the encryption in SQL 2005 I'm using Create symmetric Key EncryptTestbase with Algorithm = AES_128 encryption by Password = 'password' to create the key. to Open the key I use Open symmetric Key EncryptTestbase Decryption By Password = 'password'. and to Alter the Key I'm using Alter Symmetric Key EncryptTestbase Add Encryption by Password = 'new password'. ...Show All
.NET Development write database data row by row into excel
Hi, I have created an application where I can write to a particular cell in an excel spreadsheet. How can I loop through each row of the excelsheet so that I can place the database row data into each row of the sheet something like: foreach excelsheetRow (i) //i represents the row number cell(Ai).value = DataRow(i).column(i); cell(Bi).value = DataRow(i).column(i+1); cell(Ci).value = DataRow(i).column(i+2); ... Thanks Hi, Worked it out I think. Here it is: // loop through 10 rows of the spreadsheet and place each row in the list view for ( int i = 4; i <= 10; i++) { Excel. Range range = excelWs.get_Range( "A" + i.ToString(), "J" + i.ToString()); ra ...Show All
.NET Development javascript and AOL emails
Cannot fix a problem I am having with AOL emails. Recently, many of my AOL features disappeared and also I cannot open any links in emails. Could javascript be a cause for this I have tried everything along with AOL tech support. Any suggestions would be greatly appreciated. I am new here. Thankyou ...Show All
SQL Server server groups
is there a way to enumerate through existing server groups Im trying to create children server groups. Can you post the code you're using to create new groups I'm trying to find any reference for them and am unable to do so. The object hierarchy in SMO starts at the Server object and works its way down from there, to the best of my knowledge. ...Show All
Windows Forms Deployment from a website
Visual Studio 2005 Professional: I successfully used a Setup project to deploy my Windows project from a CD. Now, I would like to have users download it from a website. Do I simply compress it to a zip file and upload that to the website Thanks, I will upload the files without zipping them! I tried ClickOnce for deploying from CD. I didn't like it because: 1) It buried the app so deep that nobody could ever find it. Windows Installer puts the app in C:\Program Files. 2) I couldn't get rid of the "Unknown Publisher" warning message. Windows Installer never gives that message. 3) It wouldn't install an icon on the desktop &nbs ...Show All
Smart Device Development ListViewItemSorter :)
Error 1 'System.Windows.Forms.ListView' does not contain a definition for 'ListViewItemSorter' Strange on msd it says this is provvied in the framework! Hi, http://samples.gotdotnet.com/quickstart/CompactFramework/doc/listviewsort.aspx should help Pete ...Show All
Visual Studio Team System VSTS Areas vs. MSF Tracks?
Hi, I'm working with several clients on VSTS and MSF adoption, and a question that often comes up is how to use Areas in a Team Project. I've seen / read various ideas, such as using two areas to represent for example a "Windows" version and a "Web" version of the product being developed. My best suggestion to date is to map Areas onto MSF Tracks -- Envision, Plan, Build, Stabilize, Deploy -- so that you can cut the "work items cake" vertically by iteration or horizontally by Area / Track. For example: "Show me all the work items relating to Planning, across all iterations" or "Show me all the work items for iteration 3, regardless of track" or "Show me all the ...Show All
.NET Development IIS, Service Unavailable
Hi, My problem is like this. 1. There's a machine with Windows Server 2003 SP1. And i check there is no IIS installed, So i installed the IIS separately with some issues because when I install using the OS cds, it prompt me message like "Please insert Win 2003 CD SP1" which i dont have it. But i manage to solve it and install the IIS. When i try to open the local host, it says "Service Unavaible". How should i resolve this Thanks and Regards Hi, Sorry I dont get it. What do u mean by configure it I thought by default when i install IIS it should work already During the installation, i didn't have the Windows Server 2003 SP 1 CD, so i use the stardard installation Win Server 200 ...Show All
Windows Forms windows service confirmation
Dear All, I have created a windows service with the installer and successfully installed it. But I am lost and dont know whether or not my service is running or not I have put debug.write in my code but I dont know where to check either My service code I put in the onstart function is this correct or must I need an extra main function how to control my service to run just on a particular hours of a day Thanks. Dear Ashish, Sorry I am quite new. So when do we use debug.write I would like to confirm with you is that when I start a new windows service project in VS2005 I just have 2 function in it OnStart and OnStop. So I put my code in the OnStart it that correct to do or not Another ...Show All
Visual Studio Loop Project Files
Hi Is there a way to to gather all filename(full path) in any given project I succeeded in get a CS project code to parse using ProjectItem.Properties, but this method fails when run agains a CPP project. Any Ideas Thanks Alistair I was already using the Property.FullName Value, I was looking more for a way to loop the all files in a given project . Thanks Alistair ...Show All
Visual Studio 2008 (Pre-release) Cannot start project containing custom control
I have a WPF Application which references a custom control in its XAML file. I can compile this project in Visual Studio successfully, and I can also successfully start the .exe directly (or through Debug --> Start External Program...). My problem is that if I try to Debug the project through Debug --> Start project, I get the error: "Cannot create instance of 'MainWindow' defined in assembly 'MySample..'. Exception has been thrown by the target of an invocation. Error in markup file MySample;component/MainWindow.xaml' Line 1 Position 9." Would you expect this to work with the Nov 2006 CTP of the VS 2005 extensions for .NET 3.0 DOH! User error on this one . I'm all set now. ...Show All
Visual Studio Team System tf checkin not working while tf add does work??
Hi, I am working on an MSBuild project and i am having the following problem: i have to add files to the Team System Source Control, so i need to perform the following actions: 1- Add files to Source Control. This step works perfectly: <Exec Command='tf add /recursive /noprompt "D:\BRP\System\Wsdl\Generated\*"' WorkingDirectory="C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\" /> 2- Check in my files in source control. Does NOT work. <Exec Command='tf checkin /recursive /noprompt /override:"Overriden from MSBUILD" "D:\BRP\System\Wsdl\Generated\*"' WorkingDirectory="C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\" /> I get the typi ...Show All
Visual Studio Team System Each build does an entire get latest
This will add a bunch of time to my builds since I have a ton of build projects. Is there any way to specify that I would only like the selected sln's to be retrieved LOL....sorry, I'm so used to saying and using Source Safe (we're porting away from that) < xml version="1.0" encoding="utf-8" > <SerializedWorkspace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Mappings> <InternalMapping ServerItem="$/TeamProject/Binaries/" LocalItem="C:\Program Files\Microsoft Visual Studio 8\Common7\IDE" Type="Map" /> <InternalMapping ServerItem="$/TeamProject/Bi ...Show All
.NET Development Opening and Closing Conneciton for a loop
Hi , I am using the System.Data.Common.DBCommand to insert values into a table in a loop with each loop generating a SQL statement and inserting values into the table. The scenario is something like this. This code should work: DBCommand db = null; db.Connection = db.DbProviderFactory.CreateConnection(); db.Connection.ConnectionString = db.ConnectionStringWithoutCredentials; db.connection.open(); foreach loop { DBCommand db = db.GetSqlStringCommand(loop generated string); db.Connection = db.DbProviderFactory.CreateConnection(); db.Connection.ConnectionString = db.ConnectionStringWithoutCredentials; db.ExecuteNonQuery(); } except you are creating the connection again in the for loop, but not opening it ...Show All
