nethervoid's Q&A profile
Visual C++ vc++8.0 bug: access violation upon call of any CImageList methods
I have sucessfully imported and compiled a complex MFC 6.0 project from vc++6.0 into vc++ 8.0 (MFC 8.0). It contains several subprojects (libs and dlls). In vc++ 6.0 those project linked MFC6.0 statically and after I imported it to vc++ 8.0 I set the linkage of MFC8.0 to "shared". However when I try to compile and link the project in vc++ 8.0 in release mode (debugmode works fine) I get an acess violation in afxcomctl32.inl. This happnes whenever I call any of the CImageList methods. When I comment out all lines that call mehtods of CImageList everything work fine in release mode too. When I look at the disassembly the crash pattern i ...Show All
.NET Development Searching a Generic List
I have no problem making and using a generic list. They work fantastic. However, I'm having a major problem being able to search them in the manner I want to. If I make a generic list to store some objects of some type, I want to be able to search the list not by passing it an instance of the object, (such as List.Contains(MyObj), or List.IndexOf(MyObj)), but rather by passing it the value of one of the properties of my object. For example, I cannot get this to work . Dim MyList as System.Generic.List(Of MyObject) Public Class MyObject Public property Name Public Property Date End Class ... create some instances of my ...Show All
.NET Development Exceptions generated by SqlCommand.ExecuteReader()
Relevant documentation: http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpref/html/frlrfsystemdatasqlclientsqlcommandclassexecutereadertopic1.asp SqlCommand.ExecuteReader throws by Exception and SqlException. Under what conditions does it through Exception instead of SqlException I don't think the documentation is correct; I'm pretty sure I've seen SqlExceptions raised in circumstances other than executing a command against a locked row. I don't have any examples; I am writing a database layer and am interested in what sort of non-SqlException exceptions might be thrown. ...Show All
.NET Development Initial Query Slow
Hi, I have a c# class library that accesses a MSDE database. My ccode opens a conection too the database, executes the SQL and closes the database My Question is The first query run is always a bit slower than subsequent queries. Is there a connection being kept open, even though I am explicity closing it Thanks J Sounds like you want to keep the database open all the time instead of closing it. In general SQL Server will do this, if you let the server rest without any stress for a period of time it will start freeing up memory etc to reduce it's overhead. Then when the next query comes in SQ ...Show All
.NET Development Design Problem In Serialization Of Event
I has a design problem in serialization of event. In all UI class is doesn't implement Serializable attribute that I cannot clone with all object right The following is my customer object [Serializable] public class CustomObject { public event EventHandler Test; public CustomObject() { } public CustomObject Clone() { System.IO.MemoryStream stream = new System.IO.MemoryStream(); System.Runtime.Serialization.Formatters.Binary.BinaryFormatter formatter = new System.Runtime.Serialization.Formatters.Binary. ...Show All
SQL Server Open Navigation Link in a new window
I have a report with a hyperlink. When I go to the navigation tab, it does not give me any options to open the link in a new window. I have a link to show help and I do not want the user to actually move away from the reports Any ideas This is such a simple thing..I wonder how MS misses this One way of doing this is to use an expression like this for the hyperlink action ( Note - I had to insert a blank between 'java' and 'script' otherwise the text would not be visible in the posting ): ="java script:void(window.open('http://www.microsoft.com','_blank'))" Note: be careful with single and double quotes in the expression - espe ...Show All
Windows Forms How could I check if it's 1 or 0 in my Database table
I have a database table and my Datatype is BIT. If I have a command button how could I make it check my Database table to see if the colunm is 1 or 0 thanks in Advance Private Function GetColBit() As Boolean Dim conn As New SqlConnection("my_conn_string") Dim ...Show All
.NET Development Remoting from GINA
Our app needs the services of remote objects during the logon process (say, to log invalid log on attempts). We have a replacement GINA in place and it uses COM to invoke a COM-enabled CLR object. This object in turn does the remoting stuff. All the objects are connected up and working but during initialisation, the CLR object performs a RemotingConfiguration .Configure(...) call which throws an exception (apologies, its a a lengthy one) and I've currently no idea how to progress. The exception relays something about illegal characters in path. Obviously, I've checked what I'm passing to the call and it's fine. Other than that, it may be ...Show All
Visual Studio 2008 (Pre-release) Passing a token between services and InfoCard
I would like to use InfoCard to authenticate and acquire a token on one channel and then I would like to create a second channel and pass the token I acquired in the first channel to it so that I am not prompted by InfoCard again. Something like this (pseudocode). Is this possible or would it by nature invalidate the token All of my services require the same claims, and my application calls into multiple services, so I want to get the token once and reuse it for each service. I thought about using InfoCardClient.GetToken(), but I'm not sure what to do with the resulting GenericXmlSecurityToken. How can I tell a channel to use it // Host my ...Show All
Windows Forms Remove .dll custom action
Is there anyway I can remove the .dll and the .installstate file from the project when it has installed successfully I have included a .dll file that is used in the installation process but I don't want that file to be in the project after the installation as well as the .installstate file. Is this possible thanks ! A DLL that you only need for a custom action can be stored in the Binary table. Windows Installer will automatically extract it from there to the temp folder and remove it once your setup is finished. ...Show All
SQL Server How can I use SemiAdditive aggregations on a dimension other than Measures?
Our cubes include a dimension that needs semiadditive aggregation (inventory calculation) on some of its members. As I read the documentation (what there is of it), it seems the only way to do this is to make my dimension a parent-child dimension of type "accounts". Unfortunately, we have several levels in this dimension, each of which needs the functionality. SSAS tell us that we can have only one attribute in the entire dimension of type Account and only one member of type AccountType. So, that eliminates the all by one level in the dimension. we tried configuring the dimension as a parent child dimension.  ...Show All
Visual Basic VB access programming
I'm trying to allow users to sort a listbox in access, when the user clicks on the specific column i.e. Columns: Day Month Year i need to be able to sort by each field when click by the user...please help...thanks again i'm using a listbox to display the data.... I'd recommend a listview constrol for that and there was discussion on almost your exact problem here: http://forums.microsoft.com/msdn/ShowPost.aspx PostID=68246 ...Show All
Visual C# How to load a textbox?
Again, I'm still new to C#. I have this code in VB: Protected Sub txtSummary_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtSummary.Load Dim strSummary As String strSummary = txtFstName.Text & " " & txtLstName.Text End Sub How do I do exactly like this in C# I tried: protected void txtSummary_Load(object sender, EventArgs e) { string strSummary; strSummary = txtFstName.Text + " " + txtLstName.Text; } But it is not working. Your help is needed. Thanks. Hi, Did you add that method txtSummary_Load as ...Show All
SQL Server SSIS XML connection limitation
Hi, I came accross this and spend a significant amount of time on it. Thought I'd posit it for all. I looks like 2005 SSIS has a limitation on the number of simultaneous transformations it can pull from an XML file using "XML source" as a dataflow. I've got an XML / XSD that will load 20 tables. I cannot put more than 13 into my data flow task. If I do I get the error message below. I've tried adding multiple OLE DB transformations to the same server/db and spreading my feeds accross the OLEDB destination connections and it still fails with the same error. Despite the error pointing to the network ...Show All
Software Development for Windows Vista Using custom state workflows in a hosted designer
We are experiencing two major issues in correlation with using custom state workflows/activities within a hosted designer: - we are not able to add/embed activities to custom (derived) state activities at design time o is that a desired behaviour For testing reasons we derived a custom statemachine workflow from the out of the box activity StatemachineWorkflowActivity. As recommended by Visual Studio designer we added a StateActivity and set the InitialStateName property to the name of the added StateActivity. Then we started this workflow in our hosted designer, which presents the designed stateworkfl ...Show All
