Kasper Wegmann's Q&A profile
SQL Server What should the maintenance plans be on your mirror server?
If your principal fails and your mirror assumes the main role and it is in Full recovery mode (which it has to be in Standard edition), then the log files will grow and grow until a transaction backup and shrink is executed. I have maintenance plans running daily (and hourly for transaction log backup/shrink) on my principal, but nothing on my mirror. Do I need to set up the same maintenance plans on my mirror server Thanks Ed Hi Ed. Database Mirroring works at the database level, not the server level (like clustering), so yes, you need to configure and run server-level jobs, data, etc. on your ...Show All
Windows Forms How to get multiple selected values and items from listbox ?
Hi people, how do i extract out the selected items and values from a multiple selected enabled listbox through C# code Andreas Johansson wrote: Ashraf Gawdat wrote: So how to get the selected VALUES in a ListBox in windows form I don't want the text, I don't want the index, I just want the values of the selected items. How can this be done Use the SelectedIndices property instead of SelectedItems. Sorry but it seems you didn't get what I mean. I want the VALUES of the selected items, not the indices. If I am using a ComboBox I ...Show All
SQL Server Xcopy deployment does not work, cannot create a proper MDF file.
I am trying to create a process where I create an empty MDF file and install it on another computer or copy it to another location. I am having a number of problems so far with creating, moving and opening the MDF file. I was not able to create an MDF file until I set the security on the folder with full access to everyone, and I set the User Instance = false. I can now create an MDF file after setting 'User Instance' to false but now I cannot move the file using database Xcopy deployment. I think you need to create the file with 'User Instance=true' to enable xcopy. I used the following conn ...Show All
Windows Forms Center text vertically
I have a user control in which I need to center a single line of text vertically. So far I have a textbox in the panel. The dock property is set to fill. However, the single line of text always displays at the top. How do I get it to be centered vertically When it is not set to multi-line, the text box only takes up one line of space. When it is set to multi-line, the text is displayed at the top of the box. Edit: As it turns out, it might be better to use a label. How would I get a label's text to be centered vertically and horizontally in a panel. When I set the Dock property to Fill, it doesn't change it size past what is needed ...Show All
.NET Development Prevent Assembly from being "Reflected" ??
Hello can we prevent assembly from being reflected by tools like "REFLECTOR" Can anybody help Regards Obfuscate your assembly. Visual Studio has one community edition obfuscator called dotfuscator, but if you want you can buy the full version from here: http://www.preemptive.com/products/dotfuscator Regards, -chris ...Show All
Visual Studio Tools for Office DrawImage and DrawLine and ActionsPaneControl
I'm programming Excel ActionsPaneControl as control with ownerdraw listbox on it. I'm drawing texts, filling rectangles for items (this is working) and trying to draw image and lines. But images and lines no works. I tried the same in WinForm and everything was correct. Some solution Thank You. Hi, You should be able to draw lines and use images in an action panes control, similar to what you do in Windows Forms. For drawing a line you will be able to use this code in the actions pane code: private void DrawLine() { System.Drawing. Graphics myGraphics = this .CreateGraphics(); ...Show All
Visual C++ VARIANT PARRAY
<Vi@discussions.microsoft.com> wrote in message news:581e6584-adef-4824-8694-b14ac4f8b5f7@discussions.microsoft.com > I have a c++ method that accepts variant array as a parameter. > when I pass the variant array from c# client , the value is assigned > to Variant.parray in c++ method but when pass the variant from vb > client the value is assigned to Variant.pparray. I want vb to assign > value to Variant.parray and not pparray,what do I do, any ideas > please. I believe you enclose the parameter in parentheses on VB side, like this: yourO ...Show All
SQL Server Bar chart and Pie chart
Hello guys, Does anyone has a good resource on "working with Chart Data Region" topic. I really appreciate if anyone provide me a resource that shows a step-by-step procedure to create a report using Bar Chart and Pie Chart data regions. A web cast presentation is more appreciated. Waiting to hear from you soon Sincerely, Amde Does the following Books Online topic help http://msdn2.microsoft.com/en-us/library/ms155847.aspx -- Robert ...Show All
Visual FoxPro Report to Excel
How can i send a report directly to a worksheet of Excel Do you mean convert an FRX to XLS You need a tool like FRX2Any http://www.frx2any.com/ or you can write a program yourself to avoid the FRX and just pass and format the data using COM automation. The faster way (within Excel row limits) is to copy to Excel, or copy to an intermediate format like CSV or old FOX2 if you have an older driver, then open in Excel using COM Automation and format/save the XLS file. To do COM Automation you instantiate Excel with: oExcel = CreateObject("Excel.Application") now you have complete access to the Excel Document Object Model (D ...Show All
Visual C# Need Help Learning C# after Java
I would like to learn about C# and .NET. I'm coming from a Java background. I know this question has been asked many times, but I couldn't find anything with the search. What sites can help a Java developer learn C# and how to use the .NET framework I'm not interested in Windows GUI programming, just Web programming. Also, I'd like to know more than the syntax difference between Java and C# and some discussion about .NET and the available libraries. Any help would be appreciated. Feel free to point me to a different forum if needed. Welcome! When it comes to learning about the main syntactical differen ...Show All
Smart Device Development File I/O
I'm trying to use file I/O functions to log debugging statements that I can view on the handheld. The code I got from msdn seems to do the trick except when I open the file on the handheld, PocketWord only displays the first character I write to the file. If I copy the file to the desktop, everything I wrote to the file appears as it should. My code for all of my file I/O is as follows: BOOL LogStartup ( void ) { HANDLE file; TCHAR szFileName [MAX_PATH]; memset (szFileName, 0, MAX_PATH * 2); wcscpy (szFileName, TEXT ( "\\folder\\logfile.txt" )); file = CreateFile (szFileName, GENERIC_WRITE, FILE_SHARE_ ...Show All
Visual Studio Express Editions Unknown Error "-1"
I am currently trying to create a new project using visual basic 2005 express edition. Whenever I try to create a new project I get the following error message.. Unknown Error "-1" Has anyone seen this before I have tried to reinstall a couple times but I still get the same error. I am running Win XP Pro. with SP2 and have installed all of the latest updates. Thx sf I believe you need to look at Visual Studio Pro. I don't think VB Express has the ability to do a Window Service with out the use of a lot of hard coding. As a student you should be able to get a good price on a copy of the Pro addition in either versi ...Show All
Windows Forms right-click event
where is right-click event on button and another cotrols I can't see it in events list... This answer is for .NET only. If you are not referring to a Windows Form (eg. this is MFC), then please ignore my answer. You have to catch the MouseClick event. This event catches both left and right mouse events (and middle button and 4th button and ...). In the click handler, the 2nd argument is a MouseEventArgs object whose Button property tells you which Button was pressed. void Form1_MouseDown(Object ^sender, MouseEventArgs ^e) { /* Determine which mouse button is clicked. */ switch ( e->Button) { c ...Show All
Visual Basic How to reload a form?
Hello guys, I'm trying to reload a form displayed by using a simple button. The sentence I was trying to use is: Form1_load() but I'm getting this error: "Error 2 Argument not specified for parameter 'e' of 'Private Sub Form1_Load(sender As Object, e As System.EventArgs)'." Can any of you please tell me what is that argument I'm not passing or any other way to reload my form using a button Thanks sooo much for your help...it will be much appreciated! Best regards from Costa Rica!!! Just a heads up for those of you wishing to completely reload the form including all controls. ...Show All
Visual Basic VB5 Project to VB.NET
I have a project written in Visual Basic 5.0. I need to convert it to Visual Basic .NET. I have Visual Basic 5.0 and Visual Studio 2003, but the project needs to be converted to Visual Basic 6.0 in order for Visual Studio 2003 to upgrade it. Would someone who has Visual Basic 6.0 please be so kind as to convert it for me If you can, please email me at david_kaye (at) yahoo.com for me to email you the project. It zips up to 253 KB. Thanks, David You can send it for me. May be I can help you. My email is tuansn@msn.com ...Show All
