outcast1881's Q&A profile
SQL Server Failover not work when Principal server is down
Hi, Here is my testing environment: Database server: SQL Server 2005 Developer Edition with SP1 Application: An application developed by Visual Studio 2005 using C# (.Net framework 2.0) and ADO .Net 2.0. Principal server: computerA Mirror server: computerB Witness server: computerC Mirroring mode: High availability with auto failover Connection String: Data Source=computerA;Failover Partner=computerB; Initial Catalog=test_mirroring;Persist Security Info=True;User ID=sa; Code used for failover: while (true) { thisDataSet = new DataSet (); try { thisConnection = new SqlConnection (connectionString); thisAdapter = new ...Show All
Audio and Video Development Question about chapter change event
I appended following code to standard "Chapters" project (in main.js): Diagnostics.listeners.add("file"); Diagnostics.trace.autoFlush = true; addEventListener("chapter", ChapterChangeEvent, false); function ChapterChangeEvent(evt) { Diagnostics.trace.writeLine("Old Chapter:" + evt.oldValue, "", 1); Diagnostics.trace.writeLine("New Chapter:" + evt.newValue, "", 1); Diagnostics.trace.writeLine("---", "", 1); } After I ran demo project and clicked only by "Chapter 2", "Chapter 3" buttons. In result I see following log file: Old Chapter:0 New Chapter:0 --- Old Chapter:0 New Chapter:1 --- Old Chapter:1 New Chapter:0 -- ...Show All
Visual C# Help with PrintForm PowerToy
I downloaded the Print Form powertoy for Visual Studios. My problem is that I have a form with is scrollable, but when I print the form out the printer stops printing about halfway down the form. I suspect that it may have something to do with the the current focus of the form, but even after adding the "Scrollable" option to the code it still does not print the entire form. Here is my code: private void toolStripButton1_Click(object sender, EventArgs e) { printForm1.PrinterSettings.Copies = 2; printForm1.Print(this, Microsoft.VisualBasic.PowerPacks.Printing.PrintForm.PrintOption.Scrollable); } The other question was that the examples in the included docs are in VB, and sense I am using C# I was wonderin ...Show All
Visual C++ Unhandled exeption
Hello, I'm getting crazy with all of these error in my codes. this time a faced with a unhandeled exception. code: hr = g_pJoystick11->SetDataFormat(&c_dfDIJoystick2); definition of ( c_dfDIJoystick2 ) in the dinput.h : : const DIDATAFORMAT c_dfDIJoystick2 Error: An unhandled exception of type 'System.NullReferenceException' occurred in tre.exe Additional information: Object reference not set to an instance of an object. I am really confused with these errors. please give me a way to escape from my codes errors !!!!!!! Thank You, Hanif Hello, But why it works in vc++6 but it do not work here. please tell the solution what should i do . an it give ...Show All
Visual Basic Outlook profile choice
Hi, Our client has a user with two Exchange email addresses / profiles. The user uses the default address for personal email and then the other address for business mail. The user uses my VB.Net application to create new Outlook emails containing a To addresss, body, attachments etc. but when she sends the email, it uses the default personal profile mentioned above (i.e. the From address is the wrong one), and not the business email address. (Outlook is already running when she creates the email, and the requirement is that it must allways remain open.) Is there a way that we can programmatically specify the profile / From email address that should be used Thank you Lesego Lesego, In VB.NET 2.0, we always use ...Show All
Smart Device Development Need to instantly detect socket disconnect.
I am developing a Pocket PC app which allows the user to take the PDA around a parking lot while entering information on a form and saving. When the Save button is clicked I want to not only save it to the PDA but send the information to a laptop sitting in the user's vehicle. This laptop listens for a connection request. I know how to transmit and receive files using sockets but I need to be able to instantly detect when the PDA has lost the connection with the laptop (losing the signal by putting a building in between the PDA and the laptop, for instance). I want the PDA to inform the user that the signal has been interrupted and keep trying to connect to the laptop before sending the file. As soon as the connection has been re-establish ...Show All
SQL Server EASY! Trim string?
I have values in a matrix takin too much space. Since they are just used as the matrix column header, cant i trim it or something. To display just the first 3 letters of the the attribute, and not the whole string Whats the code for that =Fields!Collision_Type.Value thats my field right now. Please help! thanks! Yes, you can change it to this to always show the first 3 characters: =Left(Fields!Collision_Type.Value, 3) Jarret ...Show All
Visual C++ VS .Net 2005, how to disable intellisense...
Hi I am really frustrated with the performance of VS .Net 2005. This is because I always see at the bottom "updating intellisense..." and it uses 60% to 70% of CPU. How to disable this updating of intellisense... Please this is making Visual studio unusable. Thanks Chandra I just want to join the chorus. The intellisense update is making my C++ project (hundreds of files, many hundreds of classes) unusable. Please restore the VS 2003 performance. ...Show All
.NET Development Reading data from networkstream
I normally read data like this, in a new thread on a while true condition while ( true ) { byte [] someData = new byte [Int16.MaxValue]; //ok so thats overkill! int theDataRead = 0; theDataRead = this.theNetworkStream.Read(someData, 0, someData.Length); while (this.theNetworkStream.DataAvailable) { theDataRead += this.theNetworkStream.Read(someData, theDataRead, someData.Length - theDataRead); } if (theDataRead > 0) { this.theDataManager.DoHandleData(someData, theDataRead); } } question is, am I doing it correctly or is there no n ...Show All
SQL Server Is there a way to 'peek' the items in a queue?
... or some other way to prolong their presence on the queue. The scenario I'm dealing with requires me to receive a batch of messages and fire them off (as a batch) to a legacy Unix application via TCP. What I need to do is keep those messages on the queue (or at least somewhere else in the database) until I know for certain that the legacy app has received them. Comments If your design calls for intentional message rollbacks, then you have a problem. This is never correct, and in addition is guaranteed to trigger poison message detection. The sender's transaction does not equate a transaction on the target. I.e. sender can SEND 3 messages in one transaction, target can RECEIVE 2 of them bef ...Show All
Game Technologies: DirectX, XNA, XACT, etc. SpriteBatch.Draw(..., float layerDepth) No Longer Works For Me
I guess that the deprecated BeginScene() used to automatically changed some device states in order to make it possible for layerDepth to work. But since that function is gone in Beta 2, I no longer know how to automatically depth order my textures. Is there a set of device states I need to be in to get this automatic sorting If not, I'll just write my own sorting code. Thanks! Terry A. King wrote: I have a question which sounds quite similar, or may offer a solution, to this. My question is how do I depth sort more than one SpriteBatch My initial test shows using : batch.Begin( SpriteBlendMode .AlphaBlend, SpriteSortMode .BackToFront, SaveStateMode .None); will correctly draw the sprites in the correct ...Show All
Smart Device Development VS 2005 and PPC 2002
Hi, is it possible to develop .NET CF 2 applications for PPC 2002 using VS 2005 What solutions do I have Thanks in advance. I don't think this is possible I'm afraid You can develop .NET CF apps on: WM5 devices WM2003 PPC Windows CE 4.2 (using the .NET CF SP1) ...Show All
Visual Basic Namespace-Level XML comments
How can I add an XML comment to a namespace When I type the usual ''' nothing happens. all I get in the tooltip is "namespace System.Drawing" Really I get this: Namespace Drawing The System.Drawing namespace provides access to GDI+ basic graphics functionality. More advanced functionality is provided in the System.Drawing.Drawing2D, System.Drawing.Imaging, and System.Drawing.Text namespaces. It doesn't really matter though, I'll just provide the end user with an instruction manual. ...Show All
Visual Studio Team System Whether my understanding right?
Hi, One silly question, but wanted to clarify in the begining itself. for the coded webtest, you can either write in the codedwebtest part or written outside can be added as a plugin right i am confused whether i am right. If i am wrong, kindly guide which part helps in whateverway. Thanks in advance - Vijay. In plugins you can override the PreWebTest or PostWebTest (for WebTest plugins) and the PreRequest or PostRequest (for Request plugins) handlers. In the coded test you can do the same things, one difference is that in a coded web test you can handle the request events for individual requests as opposed to them running for all requests as they will in a request plugin. You can even use plugins w ...Show All
Internet Explorer Development IE7 Crashes for Unknown Reasons
I have been getting IE7 crashes on a regular basis, on two different computers, after upgrading. Can't replicate the crashes, because they don't occur all the…but the info from the Event Viewer follows: On a P4–3.4E GHz computer with XP Pro & all current updates: “Faulting application iexplore.exe, version 7.0.5730.11, faulting module ntdll.dll, version 5.1.2600.2180, fault address 0x00018fea.” On Centrino 1.83 GHz Dell Inspiron6000 with XP Pro & all current updates: “Faulting application iexplore.exe, version 7.0.5730.11, faulting module unknown, version 0.0.0.0, fault address 0x61df7730.” Extremely annoying...so much so that I may go back to IE6. Anyone have any ideas ...Show All
