Tonito01's Q&A profile
SQL Server Accessing database in STANDBY mode while log shipping
Hi, I am testing with Log shipping, I have it setup and it is working just fine. The secondary database was restored with Standby mode and is readonly. I have no problem accessing and querying data from the secondary database but I noticed if changes are made to the primary and I am accessing the database when the restore step to the secondary runs it fails with the following error: Message 2006-07-31 09:40:54.33 *** Error: Could not apply log backup file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\LogShip\CI_REPLICATION_TEST_20060731131501.trn' to secondary database 'CI_REPLICATION_TEST'.(Microsoft.SqlServer.Management.LogShipping) *** 2006-07-31 09:40:54.33 *** Error: Exclusive access could not be obtained because ...Show All
Windows Forms Redirect console I/O to GUI
Hello, First of all i whould like to apologize if it isnt the correct place to post my question (my first post on MSDN forum). I was tryig to make class based on : http://support.microsoft.com/kb/q190351/ To redirect input/output from WinAPI/MFC to console application, trouble is: I didnt wrote the console app., therefore i cannot use fflush(NULL); after every single line/output, and without it pipe example given wont work. I know it can be done other way, so i need your help pointing me in right direction here Thanks in Advance. Can you explain a bit that what do you need to do because not all people who may help you but they may not know C++ to understand your requirement by seeing the ...Show All
.NET Development Declaring array of objects WithEvents
Hi, I have an array of objects. These objects have events that needed to be handled in the Form class. But, I am facing difficulty in declaring WithEvents for these objects, as these are not at the class level. Eg: I need to do something like I declare array of that class at class level When the button is pressed, then instantiate the objects in the array "WithEvents". I need to handle events in the form raised by each object within the array How to achieve this. Please explain. Thanks in advance. Regards, Noorul You will have to individually add a handler to each item in your array. Here is some code to demonstrate one option you ...Show All
Visual C# Stopping applications from running
I need to write a small application that will stop other applications from running. For example, I dont want NotePad to run on a specific machine. How can I chain in the OS to find out what is being run, and then abort it Thanks Ralph Krausse The managed way to do this in my Opinion is to query the running applications after a short interval from your application (Better Be Windows Service) using; Process [] pByName = Process.GetProcessesByName("notepad", "127.0.0.1"); or Process [] pByName = Process.GetProcessesByName("notepad", "ComputerName"); if(pByName > 0) { for(int i = pByName.length-1; i > 0; i--) &nb ...Show All
.NET Development how to format a number to string using "coma" 1000s
I have a float number 1234555.89 and I need to put in a textbox. How can I convert to string with comas like: 1,234,555.89 and add to text property. thanks in advance for your help, Edward the following code solves your problem textBox1.Text = String.Format("{0:#,###.00}", 1234555.89 ); ...Show All
Game Technologies: DirectX, XNA, XACT, etc. A newcomer with a question regarding music
I don't know if this is the proper place to make this post, so please humor me. I noticed most of these questions are very specific regarding XNA's abilities, but mine is more a "can you point me in the right direction " type question. I want to get involved with the creation of games using XNA, but my trade is music writing. Does anyone here know of a good place to offer free services writing music for video games I've tried to find small developmental teams making XNA games, but I haven't been very successful. Any help or advice at all would be wonderful. Thank you. Your best bet is probably http://www.gamedev.net. Making music is so universal, you shouldn't ...Show All
Visual Studio Express Editions A message of thank.
Hello. I have completed and finished my first 2 projects. I want to thank every one who who helped me, I can't remember all your names, but you know how are. I especialy thank Wellnowletssee who gave me a lot of help with my first project, and my thanx also to Andreas Johansson who helped me with my second project. Being an absolute beginner I realy do apresiate the help you all gave me. Thank you very much i deed to you all. Thank you. ...Show All
Windows Forms getting window client area coordinates in large windows
Hi! I need to acquire the client-area mouse coordinates in a window of a third party application. I have used GetCursorPos and ScreenToClient to get the mouse coordinates when the scrollbars are positioned at the top-left position. Unfortuanately the client area of the window who’s coordinates I need are usually much larger then the window itself. If you use ScreenToClient in the window when the scrollbars are positioned a few 1000 pixels to the right and down from the upper left corner you will get the position of the mouse pointer relative to the upper left corner of the visible part of the client area. Is there a way to get the difference between the upper left corner of the windows client area and the upper left corner of th ...Show All
Visual C++ Getting HWND from ActiveX control
Hello I am new to ATL ActiveX, and I was wondering how can you get a Windows handle (HWND) from within an ActiveX control that runs in the web browser I am not sure which handle can I get (the browser, the control, none...) And a second question, how can I respond to the control being loaded by the browser and discarded (moving to another page). Are there methods I can implement or any special interface Thanks Ran. I have found the answers: 1. To get the HWND use: HWND hwnd = NULL; HRESULT hr = m_spInPlaceSite->GetWindow(&hwnd); 2. To get notified that the control is created or removed use the FinalConstruct and FinalRelease methods that are generated by the wizard. ...Show All
Visual C# Buiding a Resource String File
Hi, I'm a bit new to C#, comming from a delphi environment, but have been through quite a numerous amount of tutorials and have learnt a good amount. But for now, i have the issue of trying to figure out how to make a resource string file in C# and use it. Second Question - How do i use ansi strings in C#. Such as 32 for space and 13 for enter and the such Hello All. Netmaster0000: I'm sorry but I have no idea about Borland C# Builder. You might try and see if you can find any user forums or newsgroups on the Web, and post this question there. As this is an MSDN forum, I would imagine that most folks around here use VS in one form or another. Do you mind if I ask why you are using Borland I only ask because, if poss ...Show All
.NET Development Out of Memory Exception
Hi all, I'm getting a very weird out of memory exception with very large MTOM responses using WSE 3. Basically any response > 30 megs in size is getting the error in StringBuilder listed below. It just started to occur and NO CODE has changed. It's like the latest security patch for .NET that was released started this or something, I'm not sure. Does anyone have any ideas on what's happening Thanks! James Hancock Exception Stack: [OutOfMemoryException]: Exception of type 'System.OutOfMemoryException' was thrown. at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity) at System.Text.StringBuilder.GetNewString(String currentString, Int32 requiredLength) at System.Text.S ...Show All
Visual Studio Access to report file denied.
A Deployed ASP.Net 2.0 website with Crystal Reports viewer (Visual Studio 2005) causes the error below. Apparently, during its load process in creates a copy in the temp directory, but can't read the file in just created. Can I redirect where these files to be created in a specified directory so I can isolate the permissions needed to read the report. Does one of the IIS services need permissions Error in File C:\WINDOWS\TEMP\EmployeeFull {4D249D66-7F13-401C-BFF2-9BC7E04934EF}.rpt: Access to report file denied. Another program may be using it. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated i ...Show All
SQL Server how to control the distance between the two matrix? or (matirx and table )
hi everyone: the report show two tables two matrixs how can i control the distance between them I want to set the same distance between the table and matrix or (table and table ) Younger, You could possible place your tables and Matrix each inside of a rectangle and then maintain the distance between your rectangle should get you to your desired results. Ham ...Show All
SQL Server Outer Join problems
This may or may not be due to my lack of knowledge on the use of outer join. I am getting the error: Server: Msg 208, Level 16, State 1, Line 1 Invalid object name 'IncidentId'. From my query: SELECT Incident_Incidents.RelatedIncidentId, Incident_Incidents.RelatedType, Incident.Subject, Incident.RecordId From Incident_Incidents, Incident left outer join IncidentId on Incident.IncidentId = Incident_Incidents.IncidentId where Incident.IncidentId = 12838 Any ideas Here is a sample of some real code; I might of have mistaken some of your field name. It looks like your trying to left outer join on a column name instead of a t ...Show All
.NET Development using ILGenerator.Emit() to create a call to a method of an array type
Hi there! I have the following problem: I create MSIL code using the ILGenerator class. The code to be created contains a call to a constructor or method of an array type. Sample: class C1 { public C1() { } // C1() public void foo() { C2 [,] c2 = new C2 [3, 4]; } // foo() } // class C1 class C2 { public C2() { } // C2 public void foo() { C1 [,] c1 = new C1 [2, 3]; } // foo() } // class C2() As you can see in the output of ildasm C1::foo() contains this code: .method public hidebysig instance void foo() cil managed { // Code size 10 (0xa) .maxstack 2 .locals init ([0] class MyTest.C2[0...,0...] c2) IL_0000: nop IL ...Show All
