iljanated's Q&A profile
.NET Development COM Interop Refernce Question
Suppose I have a COM Object named object1 that exists the entire life of the .NET Application. And I have a temporarray existing class Class1 inside this Application. And in this class I refernce the object1 and do some operation on it and leave the Class1 object to Garbage COllect. Does this also Garbage Collect the object1. And what should I do to avaid it. It sounds as though you want a single instance of class to exist for the lifetime of your application, the fact that this is a COM object used via COM Interop in .Net is irrelevant. What you describe can be achieved via multiple techniques but is commonly known as the singleton pattern . A single instance of class can be created very easily in .Net by using the 'static ...Show All
Visual Studio Need help building web projects with MSBuild?
If you're interested in building your web project using MSBuild, we can save you the trouble of posting the question and waiting for an answer :) To build web projects with MSBuild you need the Web Deployment Project add-in. You can get it from http://msdn.microsoft.com/asp.net/reference/infrastructure/wdp/ . Another option is to use Web Application Projects , which give you the VS2003 model of working with ASP.NET projects, but the benefits of ASP.NET 2.0 and VS2005. Happy building! Neil Craig, There's no support for publish/deploy from the commandline that I'm aware of for web projects. With regard to your other question, I'll have to pass this along to the web guys and have them post back. I'm not too familia ...Show All
Visual Studio 2008 (Pre-release) How does one express a many-to-many 3-table arrangement as an entity model?
Take this schema: Authors (ID, First Name, Last Name, etc) Books (ID, Title, ISBN, etc) BookAuthors (BookID, AuthorID, IsPrimary) So, this is a representation of your standard "mapping" scenario where you map many rows of one table to many rows of another table via an interim "mapping" table that supplies the many-to-many relationship. In my experience, I encounter this table structure all the time and is considered extremely common and still satisfies 3NF. As a rule, using ADO EF, I should not have to modify my schema to de-normalize to produce a better relational model - the model should be object/relational and the schema should be 3NF - that's the whole point of an abstracted entity model in the first place. So, I w ...Show All
SQL Server Creating A tab delimited export
Hello all, I am trying customize the CSV rendering extension with different device information settings. I would loke to change the CSV extension to a Tab delimited output. However, whenever I add a new extension line to the RSReportServer.config file I run into problems. 1. What is the correct character to use in the delimiter to specify a Tab character I seem to be unable to get this correct 2. Why when I override the name in the rendering extension does it still show up as the CSV (comma delimited) name in the export dropdown. Here is my customized rendering extension. < Extension Name = " TXT " Type = " Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRend ...Show All
Windows Forms Listview control with up down arrows, any easy way to get this functionality?
Basically I have a list of items that I want to keep track of their order(not simply a sort) that they appear in the list. To move items up in the listvivew I want to have an up/down arrow to the side of the listview. Has anyone done this before If so, can you outline the steps that need to be done i.e., do I need to write my own control etc Hi Scott, I am using the vb version. It works ok, but when I move an item down, and it reaches the last position and I still press the down key, and error happens saying "ArgumentOutOfRange Exception was unhandled...InvalidArgument=Value of '4' is not valid for 'index'. Parameter name: index." Here is my code. Please tell me what is the problem.   ...Show All
Windows Live Developer Forums Filtering Address based on Country in Virtual Earth
Hi, I am working with Microsoft Virtual Earth. I want to show Adresss. I used VEMap.Find() method to find the address. I passed street name,houseno,city,zipcode,county,state and country informations to find the address. The problem is I got the address throughout the world which matches the address. But I want to filter the address based on Country entered. So pls kindly assist me to sort out the problem. Is there a method to filter the address based on country in Virtual Earth Help me. Thanks in advance. Hi derek, Still it is not filtering based on country. I placed a DropDownList to select the country. I entered a city name that is not in the selected country. But still the map searches that city and shows t ...Show All
Visual Studio Team System Build with tests fails with no indication of where
I have setup two builds on my TFS project - one to run when code is checked in that only verifies that the code will build, and one to be run automatically that will run our tests. The first build appears to work correctly, but when I run the second (from my VS) it fails. When I look at the BuildLog.txt file, I can't see any failures, and the build results in VS show red "X"s next to the "Running tests" and "Running tests for Any CPU/Debug" entries. I have looked at this post: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=673795&SiteID=1 and based on that tried installing VS Test edition on the build machine, with no change in the results. I am running Team Suite on my machine. Can anyone ...Show All
Smart Device Development CF does not have NodeFont property for treeview control???
Hi, I've 2 probs with the TreeView control in CF 1) It does'nt let me change font at the node level 2) It enforces the first image in the imagelist for a node for which the imageindex is not specified Does any one have solutions to these The mainform of my app contains a treeView control. I can't have the same font for all the nodes. I need to distinguish some nodes from the others. Why does CF not provide NodeFont property available in .netFramework. But i reallly need this. How can i do it on my own. Is it possible by overriding the paint of treeView. I need to have one mid-level node which should not have any icon displayed. Plz...... suggest. ...Show All
SQL Server Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path
Hi, I spend two days looking for an anwser to this problem but no luck. I have a simple ASP.NET 2.0 application which run correctly on my local machine. But After uploading all files including web.config file on a Windows 2003 Server with SQLEXPRESS installed. I have this error. Please Help!!!!!! Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Da ...Show All
SQL Server Auto populated field
Hello, I have SQL Server Server Man Studio Express 2005, currently having a problem with an auto populated field. Basically I have a number populated everytime a new asset is added to my database, but at the moment the firled does not increment by 1 as I would like it to. Seems to assign the same number as a item already in the database and I have to go into the back end and change it manually. Anyone know how this is easly sorted, the asset ID is not the primary key. Just for your info at the moment 'Identity Spec' is set to 'NO'. Many thanks, Andrew Thank you for your reply but I still cannot change the Identity Spec field It is setup the follwoing way: Allow Nulls: Yes Datat Type: ...Show All
Windows Forms datagridview columns databindings
Hi all. I've this table in database: columnDay, columnTotal Now, in the columnDay, are stored data like: columnDay columnTotal Mon 01 01:00:00 Tue 02 01:00:00 Wed 03 01:00:00 Thu 04 01:00:00 Fre 05 01:00:00 Sat 06 01:00:00 Sun 07 01:00:00 The number of days are directly retrieved from the month. Now, i need to design a datagridview, that have the name and number of days as columns: For ex.: int myColumn = Thread.CurrentThread.CurrentCulture.Calendar.GetDaysInMonth(myYear, datetimepicker1.Value.Month); datagridView1.ColumnCount = myColumn; for(int i = 0; i < datagridView1.Column.Count; i++) { DateTime dt = new DateTime(year, datetimepicker1.Val ...Show All
.NET Development Reflection + late bound COM object = not working.
Hello, I'm trying to discover properties of a late bound COM object, I do: Type newtype= Type .GetTypeFromProgID("MyCOMLibrary.MyCOMType"); object newobject = Activator .CreateInstance(newtype); System.Reflection. PropertyInfo [] props3 = newtype.GetProperties(); However, 0 properties are returned when object really has a few properties. If I instantiate the com object by a RCW it works ok. Please note I have simplified the code above but in my application I don't know the properties names, I don't even know the ProgID, I need to discover the properties at runtime without knowing the name. So, what can i do Thank you for the answer Mattias, ...Show All
Smart Device Development playing video on Windows CE 5.0
I want to play a video file on windows CE 5.0. I am developing application using VS 2005 and C# as devlopment language. Can anyone know how to achieve it. Thanks in Advance. Siddharth Hi Siddharth - The Windows Media ActiveX control for WindowsCE can be hosted in a .Net Compact Framework application using a community sample developed by opennetcf.org. Here's a pointer to the latest source: http://www.alexfeinman.com/download.asp doc=CLI331.zip I hope this helps, Steven ...Show All
Visual Studio Team System VSTS with SP1 Beta to non TFS SP1 Beta Server
Can a Team Explorer or VSTS instance with the SP1 beta connect to and utilize a TFS instance that does not have SP1 Beta installed or will there be conflicts Thanks, ...Show All
.NET Development Effective connections to SQL Server 2005 from ADO .NET 2.0
Hello, Can somebody point me to official MS guidelines/custom advices where I can find methodology of creating effective connections to SQL server 2005 from ADO .NET 2.0 My system is planned to have big amount (thousands) of users who work with my system simultaneously and I have to create most effective communication from ADO.NET layer to SQL Server 2005. For instance: how many connections I should create Should I use connection pool or something else How frequently I should open/close connections How to guarantee correct connections behaviour in a multithread environment Thank you in advance. I don't know where the guidelines are (though I'm sure there are some) but what you want to do is keep ...Show All
