vitich's Q&A profile
.NET Development Interface as generic type parameters
What happens, when I define a generic type with an interface (e.g. List<IComparer> behind the scenes Does the CLR treats the list as a reference type list or as a value type list Meaning, does it create a new specialized type for that list, or does it use an already existing reference type for the list If the later is true, then it means that this list could store both value types and reference types, but it will do a lot of boxing/unboxing operations when accessing value types won't it Thanks. A List<> needs to store it elements somewhere. Only the heap qualifies. Value types stored in the List<> are therefore automatically boxed. ...Show All
.NET Development (XslCompiledTransform) Cannot process XML containing DTD
WHAT I'M TRYING TO DO I simply want to transform an XML file using an XSLT file. But the process throws an exception with XML files referencing a DTD. My research uncovered that I must set the "ProhibitDtd " property to false. As you can see in my code sample below, I did this. For some reason, the setting wasn't effective. I suspect I am making some sort of syntax error that is resulting in an improperly set property. SYSTEM Windows 2000, Visual Basic Express 2005 ERROR MESSAGE: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method. CODE USED (EDITED FOR SIMPLICTY OF T ...Show All
.NET Development using statement on SqlDataReader
Hi all, if I am to use the 'using' statement on a SqlDataReader where the resultset then gets passed outside of the method in which it was executed, will the 'using' statement still clean up the resources (close, dispose etc) although the SqlDataReader ResultSet gets passed out of the method What I currently have is below, but am not sure whether making use of the 'using' statement on the SqlDataReader will actually clean up its used resources. public static SqlCeDataReader ExecuteQueryGetDatReader(SqlCeConnection objSqlCeConnection, string strQuery) { SqlCeDataReader objSqlCeDataReader; try { using (SqlCeCommand objSqlCeCommand = new SqlCeCommand(strQuery, objSqlCeConnection)) { objSqlCeCommand.CommandType = Comma ...Show All
SQL Server Connection Issues To Report Services
Hello all, I just installed the SQL 2k5 standard suite of services on a w2k3 enterprise edition server. All went well except for the connection to the reporting server. I get the error below. "No connection could be made because the target machine actively refused it" I can't seem to find any information on this error and have no clue where to even start. I've done 10+ installations of this software on various machines and have not encountered this error on any of them. I have uninstalled, then reinstalled the reporting services and still no solution. All connection attempts are being made on the actual server, not from a desktop. sp1 for sql 2k5 is also installed, if that helps. Windows Firewall is off. What w ...Show All
Windows Forms numerical textbox
dear all I want to have a textbook with only number entries allowable in it. When a non numeric character is enteredm it shouldnt do anything. I tried using the masked textbox but the problem is if we select only numbers in the properties for the mask, we can still enter digits anywhere in the middle like... 12 45 as a single number with a space, can someone suggest. I want the textbox to be from left to right and ’no spaces allowed. thank you in advance, cheers, prasad.. Hi Rizwan, thanks for clarifying your use of ! Just misinterpreted that. In my school days I was tought that ! at the end of a sentence is like stressing the meaning of the sentence. So it ca ...Show All
Visual C++ Support for multiple concurrent compilations
With dual-core CPUs common and quad-cores just around the corner, is there any plans at looking into supporting multiple concurrent compilations Source code compilation has excellent parallelism and many make systems have supported spawning multiple compilations for ages. I can see that .pch file generation will cause problems and would probably have to be synchronized. And the current .pdb file generation with common .pdb files for all source files in a directory will not work well here. I ended up building a make system with gnu make running in bash to get full use out of our dual-core machines. A bit of a hassle but well worth it as it cut recompile times by as much as 40-45%. But native support for this in the origina ...Show All
.NET Development generating and populating datagrid columns and rows dynamically from a stored procedure
Do you know if it s possible to: from a stored procedure, get all the returned columns and build the datagrid clumns accordinally (each column returned by the Stored Procedure will correspond to a column of the datagrid column) so that we can populate the datagrid after with the resulting resultset from the SP. Thank you So i guess it s automatic. Let s say I want to implement amethod that retrns the list of columns of a resultset reurnd by a stored procedure. I guess my dataset will include that list automatically, right I need this for an asp.net datagrid that is supposed to get filled automatically (columns and rows) from an SP. But also, I need some of the columns to be a kind of a hyperlink to another page. P.S: I a ...Show All
Visual C# System.Char[] question
I am running a continuous download of records from a server. To monitor the progress I use a progress bar and at the same time I send symbols to a RichTextBox via an invoker. The symbols are just added to the previous content with a single space separating them. It is a continuous line for symbols but they are wrapped around in a small window thus I see about 6 symbols per line. At certain time I need to start a new paragraph, so to speak. I decided to send this character: char [] CR = new char [ 13 ]; to the textbox: Then the first symbol of the next paragraph is combined with CR like this: CR+symbol. Instead of getting a new line I get this in the window: System.Char[]ABCD where the ABCD is one of the symbols. In othe ...Show All
.NET Development My database doesn't update !!!???
I wrote a simple program with ASP .NET that modify data in a table and I'm using SQL server 2005 Express edition as my database engine. But when I modify data in a table (in the webpage) and then when I try to update the database, nothing happends, it even doesn't give me any error, and when i try to see the table again nothing is updated in the table. These are the things that I have done: 1- I gave permission to ASPNET and NETWORK SERVICE so they can Select, Update, Delete,... on that table. 2- I gave permission to ASPNET and NETWORK SERVICE to the table itself. 3- I evern assign the ASPNET and NETWORK SERVICE as the db_datareader and db_datawriter and db_owner. What else should I do Is there anything that i missed ...Show All
Visual C# BindingSource Filter with textbox.
Hi All! I have a question... How can I do filter the BindingSource and the TableAdapter under c# 2005 with textbox My database is mdb. Please help me! Thank's! HI! I have a little program. It use mdb. I would like to search in the table, or tables with textbox. The term is in the textbox, and I would like to upload the tableadapter or binding source with the hit's. (If possible to speak/write in hungarian please tell me. :) ) Thank's Imre ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA Framework Information
I've posted some more information about the XNA Framework here: http://blogs.msdn.com/xna/archive/2006/08/25/724607.aspx . The beta is getting close! I am counting the days and sleepless nights till the beta is out. Looks like the XNA Team is going to make it easy to teach people XNA. And for more info on the Content Pipeline see Shawn Hargreaves blog ...Show All
.NET Development ASP.NET web site publishing via command line
Hello! Does anybody know how to publish ASP.NET web site via command line. I want to automate this process, but I did not find tool (in Visual Studio 2005 or .NET Framework 2.0) to perform this action. Does anybody know another way to publish web site (for example via COM or SDK assemblies), if such tool does not exist L.G. Unfortunately XCopy does not work for FTP locations, it works only for local network resources. There are probably no utilities for help in remote publishing... Thank you for help! L.G. ...Show All
Smart Device Development Email using SQLCE
can we send emails using sqlce from a smart device applicaton i heared that we can do in sql server thanks Aditya ...Show All
Windows Forms Help coloring individual cells in datagridview based on cells beside them.
Hi, I have this requirement to color individual cells in the datagridview based on the value of the cells right of them. There is how the data looks like: ID Time D1 D1Q D2 D2Q D3 D3Q ..... 1 '1/1/2007 00:05' 35 BLUE 23.5 GREEN 42 RED 2 '1/1/2007 00:10' 38 BLUE 24.8 YELLOW 38 YELLOW 3 '1/1/2007 00:15' 41 RED 23.1 YELLOW 33 RED 4 '1/1/2007 00:20' 36 RED &nb ...Show All
Internet Explorer Development Script error invalid character using the WebBrowser control
One of our applications was broken after installing IE7. We narrowed the problem down to the below: WebBrowser browser = new WebBrowser(); browser.DocumentText = "<script src=\"file://c:\test\foo.js\"></script><p>test</p>"; This code works fine under IE6, but when running on IE7 you get the error: Line: 2 Char:1 Error: Invalid Character Code: 0 URL: about:blank It doesn't matter what is in the foo.js file, it can be completely blank and you will get the error. If you replace the file://c:\test\foo.js with a valid http URL (Internet zone), it works fine. If you create a file with the contents and load it into the control using browser.Navigate() it also loads fine. So it seems related to ...Show All
