zwang2's Q&A profile
Architecture Best place to store across Layers
Hi, In a layered ASP.NET application, with Entity/Collection, DAL, BLL, Service Facade, UI, I would like to know what is the best place to store information. This information could be either a primitive type such as a string, or a complex type such as Collection. We use Oracle 10g as DB and two servers for Load balancing. I'm unable to come to conclusion on giving a generic solution on when to use what, among the four options below: 1. Sessions: FYI, we use Out-of-proc mode to store Session objects in the DB. 2. Cache: We have two servers for load balancing and storing in Cache would mean replication of data. 3. Profile: Again th ...Show All
Visual C# Position a form in a Parent Container
Using VS 2005 C# I have a main form that has a split container - I want to load a mdi child into one of the containers. Can anyone provide a sample of the code required. Thanks in advance. Not through the designer, but you can do it programmatically. You need to do the following: Instantiate the child form Set its TopLevel = false Add the child form to the appropriate container panel It will appear like a window locked within the panel. You can remove the border from the child form's designer and then maximize it by setting the WindowState, that is, if you don't want it to look l ...Show All
Windows Forms C# winform - check if event fired while in another event
Upon firing an event (button1_Click), I want to check if another button event has been fired first before determining what to execute in this button1_Click event. How do I check to see if a button's click event has been fired I've tried true or null, but these don't work. Thanks for your help. Excellent. Thank you both for the information.&nbs ...Show All
Visual Studio Supress database alert messages
Hi, I am using Crystal Reports XI developer edition, trial version. I am displaying reports in crystal report viewer through VC++ code. When i alter the tables in the database, the reports on display "Verify database" and "Database is now upto date" alert mesages. I want to suppress these alert messages. Somewhere its being suggested that, i need to use latest service packs and craxdrt.dll. Even after using them, i am getting those alert messages. How to avoid it through VC++ code Help me please... Thank you. ...Show All
Visual Studio Team System Error loading Event Web Services
We are getting this at the very end of the TF Server Beta 3 install. From reading various posts, it seems that you have to name the special account TFSSETUP exactly that "TFSSETUP" even though the docs indicate that you can pick an arbitrary name. Can someone from the TF team confirm that this is indeed a bug We will most likely have different TF servers running in different divisions and I can see problems if everyone has to use the exact same domain account to instal TFS. One other piece from experimenting around. It seems that our web proxy server handles "machineName" and "ma ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Installation Problems
I've just installed the DirectX SDK and am getting results not listed by other forums and people. Previously, I used to program with DX8 and had no problems in setting up dependencies and references. However, with the DX9 installation, it doesn't recognize any dependencies or references. I've downloaded the latest update (June 2005 ed. of DX9SDK), and still have problems. I'm running the .NET framework 1.1 and using C#, C++, and Visual Basic to no avail. The references in the .NET tab (right-click references then click add reference) should have Microsoft.DirectX, but it isn't there. Without these dependen ...Show All
Visual Studio 2008 (Pre-release) Getting the Avalon Viewer Sample up and running
Hey all, My first post here, happy to see im not the only one obsessed with gettin stuck into a bit of WPF! Apologies in advance if this problem has been posted already, I cant seem to find a thread relating to it.Last night I spent hours trying to get viewer sample up and running on my machine. Im running XP SP2 and im using Visual Studio 2005 Professional Edition... I've had no previous betas relating to Avalon installed on this machine. So far I've downloaded and installed: WinFX Runtime Components - BETA 2 Windows SDK (from this i've only installed from Developer Tools: "FxCop", "Windows Powershell", " ...Show All
Visual C++ VS2005 unnecessary build for project
In a solution, a particular project appears to Build for no reason which I can discover when I choose Build. Is there any way to determine why the IDE Builds a project, in other words why it is deciding that it needs to actually do anything when one chooses to Build Can a makefile be generated from within the IDE for a project or is there any way to get the IDE to show something which will lead me to discover why it is Building In this project the IDE will actually compile the source files, not just do the link, when it appears to be totally unnecessary. This does not happen all the time but intermittently. If I can understand what it is fin ...Show All
Visual Studio Express Editions Formless Application?
Is there anyway to create an application that (when created) doesn't have a form For example, I would like to create an application that has an icon in the notification bar and have it so that when I double click it a settings form is created. I would prefer not to have the form exist all along and just have it invisible because to my understanding that uses more memory then creating it on demand and the goal of this application is to make it as unobtrusive as possible. Thanks in Advance, Nick Dancer. I'm not sure what this application will be doing but what you're describing sounds like a Wind ...Show All
.NET Development Hiding/Showing objects in a process_exited
In the following code I am suspending a thread, hiding a progress bar, and showing a label. The code works if I remove the label code from this function then my code works, but I don't have any feedback that the process finished. Why would I not be able to show this label // This is the end of a process I am using private void Process1_Exited ( object sender , EventArgs e ) { //I am suspending a thread so that I can resume it later timerThread . Suspend (); //hiding a progress bar that the timerThread was updating ProgBar . Hide (); //If I remove this if statement this code works if (! lblCompleted . Visible ...Show All
SQL Server Failure to insert multiple rows into SQL database
I have an app that imports data from a csv file into a dataset. The user views the dataset and then decides to import the data into the database by clicking the code below. I am getting the error message below when the app gets to the line 'objCommand.ExecuteNonQuery()' "Message="The variable name '@PartNumber' has already been declared. Variable names must be unique within a query batch or stored procedure. Incorrect syntax near ' '." My questions are: 1) Why is the code failing at this point ( i have hard coded the part number and part name to test my code) 2) How do i pass the actual value of PartNumber and P ...Show All
Smart Device Development Serialize an ArrayList of Custom Objects?
Actually, I can serialize my ArrayList of custom objects, and the XML looks reasonable, but when I deserialize, I get a casting error in the "for each" line: Dim reader As TextReader = New StreamReader(sFile) Dim x As XmlSerializer = New XmlSerializer( GetType (ArrayList)) Dim obj As Object = x.Deserialize(reader) Dim al As ArrayList = CType (obj, ArrayList) m_CustomObjects.Clear() For Each co As cCustomObject In al m_Walls.Add(co) Next reader.Close() I thought I should make the cCustomObject class serializable, but apparently that's not supported in CF2. I suppose I could use a DataTable, as I've ...Show All
Windows Forms How do I display images in my embedded HTML?
I'm using a web browser control in my Form to display embedded HTML pages. I'm loading the HTML content via a StreamReader, and it all works fine, except that the images on the HTML are not showing. I'm not surprised, since the img tag reflects the design time location: "<img src='MyPic.jpg'> How can I embed the images in my C# app so that they can be found at runtime, and referred to at design time btw - I know how to embed resources in general. It's only in this case where the HTML resource needs its own images. Thanks in advance. I don't think its possible, the <img> tag uses a file or url location, the ...Show All
Visual Basic How do I remove a string from the string collection without throwing an exception
'Load the collection with the filenames fro mthe server MyFileList.AddRange(MyFTP.GetFileList( "*.pgp" )) 'The code always returns a blank string, remove it For Each MyFile As String In MyFileList If MyFile.Trim = "" Then MyFileList.Remove(MyFile) Continue For End If Next In this case the collection has 4 items. the last one is an empty string. But the remove method causes an InvalidOperationException = "{"Collection was modified; enumeration operation may not execute."}" So how do I remove the string. Or do I just except the fact that it will throw an excpeti ...Show All
.NET Development Regex Substitution
Hi, I need to substitute an extra colon in my date time field to allow it to be parsed by the DateTime.Parse method. I have tried using the substitution constructs ${name} and the $ groupnumber but they in turn stop the validation of my regular expression which was working previously. ( Testing using Sells Brothers RegexDesigner). Can some one provide a working example of the substitution construct. Thanks tribal Hello Tribal, Could you post the value of the date-time field as well as the values for the other arguments being passed to the DateTime.Parse method please Also, i ...Show All
