mandrijasevic's Q&A profile
Visual C# Multiple inheritance scenario
Hello, I know that there is no multiple inheritance of classes in C#. My problem is, I have a scenario that I don't know how to solve without it. Are there even scenarios that cannot be solved without multiple inheritance or is it just a flaw in my design Alright, this is what it's like. Let's say I have a class Object which represents a named item. class Object { public string Name; } It's extended by the Person class which adds the age property to it. class Person : Object { public int Age; } Next class ( IDObject ) extends Object , so that it can be associated with an integer. class IDObject : Object { public int ID; } Now what do I do if I want a person that has an ID Normally, I'd sug ...Show All
SQL Server covering indexes
Hi, I asked the similar question before but I have again some doubts about covering indexes. Besides, tomorrow I have a Microsoft MCAD 70-229 exam so please help me. In here, SELECT * FROM Order WHERE OrderID > 12 ORDER BY OrderDate we create composite nonclustered index for both OrderID and OrderDate column. Leftmost is OrderID. So when our first research is happening(Where clause), the only nonclustered index which is used is OrderID index. And then, when we pass through the second search( ORDER BY clause ), OrderDate index become activated. So we can say that the seleection of indexes in composite indexes is determined according to the situation of the quer ...Show All
Visual C# Need help converting VB to C#
Hi Can someone help me by converting this VB to C#. Thanks a bunch. James Keele Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MsgBox(Modulo10(TextBox1.Text)) End Sub Private Function Modulo10(ByVal strNummer As String) As Integer 'strNummer may only contain numbers between 0 und 9! Dim intTable(10) As Integer Dim intTransfer As Integer Dim intIndex As Integer intTable(0) = 0 : intTable(1) = 9 intTable(2) = 4 : intTable(3) = 6 intTable(4) = 8 : intTable(5) = 2 intTable(6) = 7 : intTable(7) = 1 intTable(8) = 3 : intTable(9) = 5 For intIndex = 1 To Len(strNummer) intTransfer = intTable((intTransf ...Show All
Visual Studio Tools for Office MSWord addin is not getting remove during uninstallation
Problem Our MSWord Add-In adds a menu to MS-Word. On Un-installing, the menu doesnt get removed properly, and the Menu Options we added Persist. What's the proper way to remove the added menu-options during uninstallation Word add-ins by Adobe and others get added and removed properly--- and our add-ins for MS-PowerPoint also behave properly. Issue: When adding menu items to the Office apps, they are marked as temporary. In addition, on unload, the add-in attempts to delete the menu items it added. However, the menu items still persist in Word (tested both 2000 SR-1 and 2003 SP2.) Repro steps Uploaded Code to URL: http://www.darksunsoftware.com/ppl/word-bug-aug-17-2006/2006-08-17-Addinox.c ...Show All
.NET Development What is the List<OdbcParameter>.Enumerator?
I'm having diffuculty with a memory leak that appears to be related to the System.Data.Odbc class. When the OdbcCommand class is disposed the List<OdbcParameter>.Enumerator classes are not being disposed. Using a memory profiler I can see undisposed instances of them continuing to increase through all the garbage collection cycles. Does anyone know how to get these to release with the other OdbcCommand resources What is the List<OdbcParameter>.Enumerator I'm using .NET 2.0 to connect to a MaxDB database and call a stored procedure via the ODBC data provider (System.Data.Odbc). Here is a piece of example code: OdbcConnection dbConn = new OdbcConnection(connStr); dbConn.Open(); for(int i=1001; i<2001; i++) { ...Show All
SQL Server Problem ODBC connection....
I have a porblem which windows 2000 couldn't connect to SQL server 2005 through ODBC. But I have no problem with the rest of my windows XP pro. Please help. thanks I have done the same step to connect to SQL through ODBC on windows XP pro. But I have 4 other PC which is run under windows 2000 that unable to connect the SQL server. It just counldn't find the server at all. ...Show All
Windows Forms RichTextBox.Rtf -include Final Carriage Return?
For a string with a carriage return at the end: richTextBox2.Text = richTextBox1.Text; //text is copied verbatim with the carriage return richTextBox2.Rtf = richTextBox1.Rtf; //The final carraige return is not copied over Is there a wy to copy Rtf and keep any final return character Carraiage returns anywhere else in the string are fine. I can't reproduce this problem, it copies a trailing end-of-line character just fine. Beware that the RTB control uses '\n' (a linefeed) as the end-of-line character, not a carriage return ('\r'). ...Show All
Visual Studio Team System VSTS working with Perforce...
Hello all, Currently we are evaluating moving to VSTS for our "bug tracking system" (etc..) and I've heard it works really well with its on "Source control system" (like TFS, VSS). For example you can tie bugs to checkins (etc..) and easliy trace what bug fixes went into a build or whatever. I was just wondering if anyone knew if we stay with say perforce and used VSTS for our bug tracking system, how well the two systems could interact and what types of stuff would we lose by doing this... any info would be great... thanks I am not sure if there are any perforce plugins to VSTS so effectively if you wanted to take advantage of the integration capabilities of TFS versi ...Show All
SQL Server How to create matrix that belongs to line report ?
I have to create a line report with a matrix below(that matrix displays detailed information in line report). The matrix must be below the line report and above the legend of report. But I don't know how to create a report like this. Is there anyone can help me to solve this problem Hope to receive your answer soon. Thank you. By line report I assume you mean a line chart You can definitely have a line chart and matrix that refer to data from the same DataSet. But, I'm not sure how you can achieve the layout you desire. Chart legends are drawn within the boundary of the chart area itself, so you won't be able to put any report items between the chart and its legend. -Chris ...Show All
Visual Basic Not able to save data to database
I am thinking that this is actually a very easy issue, but I can not figure it out and am hoping someone can help me. I have a database setup with no data yet. I am able to connect to it and everything fine through Visual Studio/VB 2005. I built a Windows form that I want to use to Add records to a table. I followed examples from books on doing this by taking the "Data Sources" table and dragging it onto the form. When I run the the project, the form comes up with the add record button active. I click that and add data, skipping over the auto-increment field. The Save Data icon never becomes active and if I click on the Add New icon again, I get an error about the auto-increment field not being allowed to be null. When I ...Show All
Software Development for Windows Vista Support for cross validations (Validations across activities)
Hi All, Currently WF supports validations on activity using activityvalidator. From my understanding, I think that ActivityValidator validates one activity. This is fine. My question is can we do cross validations across activities. Suppose there are two activities named A and B. activity A contains one property named 'prop1' and activity B contains a property named 'prop2'. For example validation conditions are like this: 1)prop1 should be between 1 to 10, when prop2 is 1 2)prop2 should be between 11 to 100, when prop2 is 2 Is it possible to provide these type of cross validation across activities Regards, Chakri. The thing that you need is writing your own custom validator. He ...Show All
.NET Development Using client to handle server events
I'm trying to use a client to handle an event on on a server. I have managed to do this successfully, however my solution seems somewhat convoluted... 1. Register server channel and all appropriate well known types on the server , and register client channel and create a new object from the server on the client . 3. Instantiate a new object from my custom-made EventProxy class and assign a delegate from this class to an event on the server. 4. Use this EventProxy object to handle the event fired on the server , then within this action, fire another event on the EventProxy class (so, we're on the server at this point). 5. Assign a delegate on the client to handle the event fired by the EventProxy class; so no ...Show All
Visual C++ "Insufficient memory to continue the execution of the program" exception
All I'm trying to do is open a registry subkey and read a value. Oddly, the same application works on other windows systems. I'm just concerned about this - want to make sure its not something in my application. Mine is a winforms application developed using managed C++. Is there something wrong with my app Here's the code that gets the registry key - // Check for Registry Key to make sure iscsi iqn number is set. RegistryKey ^LocalMachine; RegistryKey ^iqnKey; bool keyfound = false ; try { // Specify the HKEY_LOCAL_MACHINE hive LocalMachine = Registry::LocalMachine; iqnKey = LocalMachine->OpenSubKey( "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\XXX\\Default" ); // Request all values ...Show All
SQL Server Aid with store procedure
Hello, I have a problem, I want to execute in a single transaction three insert in store procedure, as it could implement. Thanks for its attention e.g. create proc usp as begin tran insert tb1 values(...) if @@error<>0 goto rollbk insert tb2 values(...) if @@error<>0 goto rollbk insert tb3 values(...) if @@error=0 begin commit goto done end rollbk: rollback done: return GO ...Show All
Visual Studio Express Editions Listview item double click
Hi. I have a listview that gets it's data from a database. What i wanna do is i want the user when he doub click an item, a new form will be shown with detailed information about that clicked item. Anyone can help In the original form passing the detailed information to the the new form. Form2.DetailedInformation = Form1.Listview.ItemClickedOn Form2.Show ...Show All
