Nuno_Salvado's Q&A profile
SQL Server TRUNCATE and disk space
I am extremely confused. I have inherited a sql server database and the mdf file is extremely large leaving only 1% of disk space left. I have truncated some tables using TRUNCATE TABLE <table>. I see some things saying that this will release space back to the OS. Although the table in sp_spaceused does not show it using up any space, there was definitely no data released. So I believe that the only way to clean up this disk at this time is to then run a SHRINK DATABASE, correct Thank you, -Lori Truncating a table will reduce the space occupied by the table in database but will not reduce the space occupied by the database on the disk. As you correctly state you need to use DBCC SHRINKDB to reduce ...Show All
SQL Server SQL Mirroring Witness
I have managed to set up mirroring on SQl 2005 however i have a come across a problem that i dont know how to resolve. Im running the mirroring with 'High Safety with automatic failover.' If i instagate a failover on the Principal Database, the mirror becomes the Principal, and vice versa ... great .. how ever .. i tried the golden test by making the principal server dissapear by yanking out the network connection, expecting the mirror to become the principal.....nope it just stays there in a disconnected / restoring state which isnt any good to man nor beast . I thought that the Witness should have dectected that the principal database had 'dissapeared' and would have made the mirror the Principal. Any pointers on where i might ...Show All
Architecture database watcher ... need suggestions !!
Hi all, i'm trying to develope a windows service which will listen on a database table (Oracle database) , when a record updated ,the service will store it on another database . (Sql Server database) the question is what is the best methodology to detect database update my idea is to run a query periodically and check the update is anyone have a better solution thanks. Hi Hosam, Sorry I missed that important fact, here is a url describing the differences between Oracle 10g and Sql Server 2005, it might be a bit biased though :) It has a section on the Oracle equivalent of Niotification Services. http://download.microsoft.com/download/a/4/7/a47b7b0e-976d-4f49-b15d-f02ade638ebe/SQL2005andOracle10gasDB ...Show All
Visual Studio 2008 (Pre-release) Button event problem n it's focus
hi My problem is that on my UI there are 1 listbox and stack plane inside a canvas . listbox contains the 3 buttons , each button has it's click event and method define in C# code. Focus intialize in the XAML page by defining Loaded="load" and in c# code i define load method ..in that i initialize the Focus on listbox. like listbox1.Focu(); when i run this application First focus is on listbox and it's items (i.e on 3Buttons) , I use remote to give input.but when remote focus is transfer from one button to other . when i click on this button event doesnt occure ..actuallly it looses focus from that button it's doing well when i use keyboard or mouse but only problem when i use remote for i/p. ...Show All
Visual Studio Express Editions cin a name & cout a name
Help!, am new to Visual Studio, my 1st attempt @ using this program. How do I cin a name & age and cout a name & age Is this what you need #include <iostream> using namespace std; int main( void ){ char name[256]; int age; cout << "please enter your name" << endl; cin >> name ; cout << "please enter your age" << endl; cin >> age; cout << "your name is:" << name << endl << "your age is:" << age << endl; return 0; } If so, find a book about c++ programming, read it through and you will find it very ...Show All
Visual C++ Docking Markers
Fellow application artists, Those docking windows in Visual Studio 2005 are pretty darn cool and useful. I like my screen real estate such that my main window gets as much screen as I can give it. I've seen the same feature in Visual Paradigm software but it seemed a little more sluggish to me. So my question is regarding those sliding tool windows that you can pin and have your client area resized, and you can position them so many different ways and still have them slide and adjust well, the same ones you use in Visual Studio 2005 for everything but coding. What are they called in Visual Studio speak, and do they have a pre-built Microsoft class I can use Building my world one semicolon at a time, Seth There's no specific term fo ...Show All
Windows Forms Slow performance of DataSet.Clear() in .Net 2.0?
I want to clear the DataSet and call GC to release memory from my application when the form is closed. ds.Clear(); ds.Dispose(); GC.Collect(); GC.WaitForPendingFinalizers(); However, I found that performance of calling Clear() is very slow for large DataSet in .Net 2.0, any workarounds or solution to this performance problem Thank you very much!!! I would remove the GC.WaitForPendingFinalizers() because it will cause the program to stop until all the trash is taken out. GC.Collect will get the job done in the background. ...Show All
Visual C++ GetDC() call
Hi All, Recently I worked with a code which someone else has written. The code is something as follows BOOL MyDialog::OnInitDialog() { m_pDC = GetDC(); // m_pDC is the member of the dialog class ..... } void RenderBitmaps() { // Many drawing calls m_pDC->SelectObject(bitmap); m_pDC->StretchBlt(....); } In some other functions it is using m_pDC as the device context for draw. Normally at that time, we will call "GetDC()" and from the returning pointer will call the drawing functions. the person who written the code was trying to reduce the code hence make the code faster. So can you see some hidden issue in the above said approach i.e making the DC Pointer as member In the code execution, I dint find any is ...Show All
Visual C++ Try This Code In VS2005
Here is a very problem i came through while writing a very simple program in VS2005 Professional Edition. Try the following code: #include<iostream> using std::cout; int main(); { int i=0; cout<<(i+1)<<" "<<i++; return 0; } The expected output is:1 0 However,the output comes out to be: 2 0. When i tried the same code on dev-cpp compiler the output is as expected i.e 1 0. I think the above code is not compiler dependent .So why is this problem with VS2005 compiler Kindly provide a solution to this problem and try to give maximum details. lali.b2 An excerpt from the the 1997 C++ Public Review Document published by the C++ Standards Committee (http://www.open-std. ...Show All
Visual Studio Express Editions concerning media player
renee where do I post pause button code ok . understood I,ll get back to you when I know how to format the code ...Show All
SQL Server Deleting, Updating and Inserting---is it LOCKING the table?
I have created a single Data Flow Task that reads a set of records from a source table and then makes determinations whether to insert, update or delete from a destination table. The data is basically being copied from one database to another with a small amount of data manipulation and lookups. The problem seems to be that when running the task, even a small amount of records read from the source table seem to take a long time for the task to finish. I feed the records into a Script Component (the brains) that sorts the records to three separate outputs. I use OLE DB Commands to perform the DELETE and UPDATE and an OLE DB Destination for INSERT. I thought that by using three separate database connections would help, but it just appears to ...Show All
Visual C# converting problem
What would I have to change in the following code to make it work At the moment when I try to debug I get the messages "Cannot implicitly convert type 'object' to 'int'. An explicit conversion exists (are you missing a cast )" and "Cannot implicitly convert type 'object' to 'bool'. An explicit conversion exists (are you missing a cast )" xarray[xnum] = Application .UserAppDataRegistry.GetValue(regxarray); yarray[xnum] = Application .UserAppDataRegistry.GetValue(regyarray); rightclickarray[xnum] = Application .UserAppDataRegistry.GetValue(regrightclickarray); leftclickarray[xnum] = Application .UserAppDataRegistry.GetValue(regleftclickarray); xarray and yarray are of type int, rightclickarray and l ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Drawing on only a portion of the screen (2D clipping)
I have 2D texture font that I'm drawing to the screen. I'm going to make a text box which the font can be drawn on top of. What I want to do is draw the text so that it only draws inside the text box, with any text that overhangs the text box being clipped. How can I acheive this in XNA Another example would be having a large picture insize a smaller gui panel with a scroll bar. Adjusting the scroll bar would show different parts of the picture while clipping the portions of the picture that extend outside the gui panel. There are a lot of uses for this functionality. Does XNA provide it easily A Rectangle clip parameter in SpriteBatch.Draw would be the perfect thing, but I don't see anything like it :/ I can imagine that your ...Show All
Software Development for Windows Vista Using a State Machine Workflow from ASP.NET and Winform
Hello, I am developing an application, where parts are accessed as an ASP.Net Page and some parts are used in an winform application. I am using the state machine paradigm to connect the two. In order to get the reuse I wanted, I have encapsulated all business functionality (including the workflow) into a business layer (dll) which is called from both presentation layers. Everything works well, except for the SQLWorkflowPersistenceService. It does not store any information into the PersistenceStore. Has anybody run into similar problems and can give me a hint if this use case is not supported or am I just doing something wrong Thanks for the help, Bjoern Hi Bjoern, maybe the exception wa ...Show All
SQL Server Lost Messages ?
Hi There What happens to messages that go to error I know that they are returned to the queue of the service that sent them, but the message it the queue is the error message and description. Transmission queue is empty. Where is the actual message that was sent In my case if the message went to error i must resend it. But there is no error when you send the message, transmission queue is clear, the error just comes back to the queue but i need the original message so that i can resend it after the error is fixed but i cannot find it anywhere Thanx Hi Remus Ok below is my logic, please note this is my activated sp that i am testing by running it manually. I force an error to be retur ...Show All
