Gurpreet Singh Sawhney's Q&A profile
Software Development for Windows Vista Installing MSDTC in a 2003 Cluster - Best Practice for SQL 2005?
The KB article How to configure Microsoft Distributed Transaction Coordinator on a Windows Server 2003 cluster states "When creating the MSDTC, moving the resource group into a group other than SQL Server or Exchange Server group is highly recommended. Creating the MSDTC resource in its own resource group and assigning it to a separate cluster group keeps the resource highly available." We currently have MSDTC in the same group as SQL Server 2005. We also made the SQL Server resource dependant on the MSDTC resource, since the applications that connect to this SQL instance use DTC transactions. Besides preventing unnessesary MSDTC failovers (as stated in the KB article), is there any downside to not configuring MSDTC within ...Show All
Visual C# DataGrid + threading help - 'Controls created on one thread cannot be parented to a control on a different thread.'
Im having trouble with threading, I have a DataGrid, and im downloading data from a server in a new thread. Once the data is downloaded I bind my arrayList to my DataGrid and create my DataGridTableStyle and add it to my DataGrid. When i run my app it crashes saying 'Controls created on one thread cannot be parented to a control on a different thread.' Here some code: Thread myThread=new Thread(new ThreadStart(readMessages)); myThread.Start(); private void readMessages() { // load messages from server ... // once messages loaded dataGridMessages.DataSource = arrayListDataGridMessages; DataGridTableStyle ts = new DataGridTableStyle(); // crashing here ... } Any ideas because im completly stuck. T ...Show All
Visual Studio Team System Can I use the XML/XSD schema as a source for data genaration?
I have some XML/XSD schema which has table definition. Can I use this schema in place of the RDBMS table for generating the data And is it possible to have this data generated in the XML file Right now we either reverse engineering the schema from database or import it from Sql Script. And there is no direct way to import the schema from XML/XSD. A workaround is that you can write your code to create sql script so that it can be imported. For data generation, there is no direct way to generate data into xml file. You can generate data into the database first and then export them into xml file. Thanks, ...Show All
Visual C++ binding datagrid control with sql server database
hi i need to build a dialog based application. next i need to place a datagrid control(registered activx control) and bind it to sql server database..i am completely new to vc++ and do not know what code to be placed and where(in which datagrid class...) please help Thanks I would first try some approaches and then post if there is a more specific issue you are facing. The forums are designed for more specific issues rather than generic ones. Thanks for your understanding! Thanks, Ayman Shoukry VC++ Team ...Show All
Visual C++ Returning the memory allocated for a pointer
Hi! I would like to ask if there is a function (or some way) to return the memory allocated for a pointer. Example: char *s = new char[69]; cout << DesiredFunction(s); //I would like this to print 69 Thank you in advance. bookysmell2004 wrote: I would like to ask if there is a function (or some way) to return the memory allocated for a pointer. Example: char *s = new char[69]; cout << DesiredFunction(s); //I would like this to print 69 There is no safe way to do this with a pointer allocated with new . The _msize function will return the size, in bytes, of a block of memory allocated on the heap by a call to calloc, malloc or realloc. While the new operator eventually calls malloc , ...Show All
Windows Forms another System.Windows.Forms.HScrollBar question
hi, i noticed that the System.Windows.Forms.HScrollBar renders a little differently from the scroll bars that are present on a control with the AutoScroll property set to true. The difference is in the way the arrow buttons render, or maybe i should say, don't render. when pressed they just disappear. with the autoscroll version they are rendered as a pressed button shaded a tad darker. what gives thanks, scott hi, now i spent some time duplicating this and looking for the difference between my working implementation and my duplicated implementation. i said earlier that i could not duplicate the problem, today i was able to. here is what did: create a simple form with hor and ver scroll bars from the to ...Show All
Smart Device Development control.invoke
Hi all. Can someone push or punch me in the right direction here Using the CF 2.0 I have an application that is doing an async poll of a TCP listener for data. When the data arrives, I want to update certain forms with the values. In a nutshell, The data arrives. I determine what type of data it is and where it should display. I populate properties of a class with the data. I then raise an event to signal the data is here and the properties have been populated. It is here where my problems start. Based on the the data I will determine what form I need to interact with. I need to call a sub from within that form to populate the controls on it. I was using invoke to call the sub , but the data would not display because the ...Show All
Visual C# Cast Problem with ArrayList.ToArray()
I am using an ArrayList (stuck in 1.1 land) to build an array dynamical, but because it needs to be serialized (and therefore typed) I am converting the completed ArrayList to a typed Array[]. Here is code that works: enrollment[] manifest_final = (enrollment[])manifest.ToArray(); And here is code that give an Invalike Cast error: ( enrollment)manifest[ i ]).lectures = (eLecture[])((enrollment)manifest[ i ]).tempLecs.ToArray(); The second line deals with an arraylist 'tempLecs' inside each enrollment object. I don't know if that scope is part of the problem. Does anyone have any ideas Thanks in advanced! Andrew Update: //create typed arrays out of ArrayLists for(int i = 0;i < ...Show All
Visual Basic Exe takes more than 35 sec. to load
Hi freinds, I am using vb.net 2005. The problem is when i install the project on the clients PC it take more that 30-40 sec to load. Why does it takes so much time as compared to vb 6 applications. Is there any other way to improve the performance Please Help me out. Thanks Puneet Minda Puneet I think what ReneeC is saying is that a 35sec load time is not typical. It is likely something specific that you are doing in your application. To get the help you need, you might want to describe your application a little better. After such time, one of these brilliant folks (like Renee) might be able to help you. ...Show All
Software Development for Windows Vista WF & WCF
Hi, I'm trying to find the best to cummunicate to my workflow runtime when using Windows communication foundation (ServiceContract and OperationContract)... My architecure is quite the same then in the "Expense reporting demo" sample... and i want to use ExternalDataExchangeService to interact with running workflow instances. Has anyone got ideas or examples on how to do that I can't find a way other then rewriting my whole ExternalDataExchangeService layer in the Service contract... Thanks, Hadrien Ok... So, i reply to myself : http://www.codeproject.com/useritems/WSTransferWorkflow.asp is a good starting point... ...Show All
Visual Studio Object data source in a different project
Hi, This is my first go with Crystal that comes with VS 2005, although I've used Crystal and VS 2003 previously. I'd like to use business objects as the source of my data. These business objects are in another project, which is a library of bo's. This library is referenced in my UI (Windows Forms) project. I read the tutorial starting on page 354 in this document http://www.businessobjects.com/global/pdf/dev_zone/cr_vs2005_walkthroughs.pdf That seems like it would work for me, but my objects are in a different project and so do not automatically appear under the "Available Data Sources" in the Standard Report Creation Wizard. What do I need to do to access objects in another project Any help appreciated, Mike ...Show All
Internet Explorer Development Cannot enable script debugging in IE6
XP pro, SP2 VS2005, JIT Debug is enabled for Native, Managed and Script IE6 - ah, there's the rub Tools - Options - Advanced...I cannot clear the checkboxes for the Disable Script Debugging options. Well, I clear the checks, Apply the change, close the dialog. Re-open the dialog, and the checkmarks are back. Doesn't matter if IE6 is restarted, or the system rebooted...the checkboxes refuse to remain unchecked. Any ideas Getting desperate! TIA I'd like to thank you all for your many responses. (for the slower ones...that would be sarcasm) Should anyone else experience this problem, try uninstalling your spyware program. Once Spyware Doctor was removed, I was able to enable script deb ...Show All
Visual Studio Express Editions Can't paste from VBE to Lotus 123
I can't paste from VBE to Lotus 123. I copy to the clipboard Clipboard.SetText("xyz") but the paste icon in Lotus 123 is grayed out. I can paste into other programs and I can copy from L123 to VBE but not from VBE to L123. I can also copy and paste from other programs to L123. nobugz wrote: Odd problem, Clipboard.SetText() makes the string available in 3 different formats. Except an old-fashioned one, try this: Dim data As DataObject = New DataObject() data.SetData(DataFormats.OemText, True, "nobugz waz here") Clipboard.SetDataObject(data) Thanks for the effort but it didn't help. ...Show All
SQL Server A transport-level error has occurred when receiving results from the server.(provider:TCP Provider,error:0-The handle is invalid
Hi, I am using SQL Server 2005, while trying to retrieve data from the database; I am getting the following error: A transport-level error has occurred when receiving results from the server. (Provider: TCP Provider, error: 0 - The handle is invalid .) But I am getting this error randomly. Can some one help me out Waiting for your response Sudhakar Hi Sudhakar Please can you be a little more specific. Are you getting this error in SQL Query Analyzer Are you getting this from some sort of Access or .NET front end application Or is it from an ASP application if you provide a little more info im sure we can work this out. Barry ...Show All
Windows Forms adding a User Control programmatically to a panel control.
'DMan1' showed me how to add a panel to a TabPage programmatically. I can find that panel in QuickWatch -->> TabControlRight.TabPages(0).Controls(0) When I had previously added the panel to the tabpage at design time, I was able to add a custom User Control of mine to the panel by just dragging it over from the toolbox. How do I do that now that I have just added this panel to the tabpage So how do I add the custom User Control onto the panel now Thanks, -Greg I'm still trying to figure this out. If the TrackControl looks like this in the MainformDesigner.vb, how do I get this same user control to show up on the panel which is on the tabpage, which itself is on the tabcontrol, ...Show All
