Peter Richard's Q&A profile
SQL Server Problem with Transaction Logs
Hi, I have a big problem with transaction log. I need to reduce the transaction log file becouse, the have 25 GB, but when i run the statement for BACKUP LOG with TUNCATE_ONLY, dont work, becouse i have database mirroring installed. Please is very urgent. Your transaction log is divided into boundaries called virtual log files. Inside the tran log, there is a pointer that keeps track of where it is currently writing. When the log pointer reaches a VLF boundary, it can wrap around to the beginning of the file and start reusing space. When you run a shrink, it starts at the end of the file and removes space until it reaches a page in the log that is still in use, then it stops. So, basically, keep running your transaction ...Show All
Visual C++ Implementing an Interface for WebBrowser Control
I have an SDI MFC application, C++. I added the WebBrowser control to one of the dialogs. After adding the control, I double clicked on the control and a CBrowser class was created in my project. This class wraps the control with a CWnd derived class that exposes the main control functions. i.e. GO, STOP, NAVIGATE, other overridables. How in the world do I implement IDocUIHandler in the application so I can customize the UI of the control. (I want to get a callback for mshtml for GetHost for example) So far I added support for ATL in my MFC application.(based on documentation) Next I tried adding a basic ATL object so I could get to the Interface Wizard. (with the goal of generating some class/com structure I could use to imple ...Show All
SQL Server Showing different counts for the same dimension?
Hello, For the life of me I can't figure out the best way to do this. I have 2 fact tables, hosehold and account where several accounts roll into 1 household. Each fact table has several dimensions attached to it on of which is the "core" dimension. The "core" dimension indicates if a household or account is "core" based on several business rules. I need to be able to show counts of "core" households and ALL of their associated accounts and also "core" households and their associated "core" accounts ONLY. What's the best way to set this up THANKS! Thanks again for all your help! I set things up the way you indicated and I'm closer, ...Show All
Audio and Video Development Windows Media Player 11 Destroys ID3 Tag of Mp3 files (Caught Red-handed)
I have suspected this problem for a long time. But, have no proof until today. The bug in Windows Media Player 11 is that if you open a group of mp3 files and play it in "Now Playing", stop, don't close and don't touch WMP11 for 2 hours, you will find that all information in ID3 Tag of these mp3 files are destroyed. They becomes blank. At first, I have no proof. But, the problem have been replicated today. I caught it red-handed. WMP11 is a great improvement and a breakthrough right now. But, this kind of flaw is unacceptable. Someone on the development team should investigate this to solve this bug. Thanks. was the id3 tag bug ever fixed, i'm using the latest version as of today and it just happened to me...grrrr. All tag ...Show All
SQL Server Web Synchronization - completed synchronization starts again
Hello everybody, There is some strange behaviour i've recently noticed while watching synchronization progress in Replication Monitor on SQL 2005 Server Standard with merge replication configured. The merge process seems to repeat several times. This is the initial synchronizaion (reinitalization at the subsciber). Client is using Microsoft.SQLServer.Replication objects from .net framework assemblies. The synchronization starts normally (status is "Running"). The last message of selected session box shows (among other messages): "Beginning evaluating partial replication filters" then "Finished evaluating partial replication filters" and finally "Merge completed after processing xxx changes... etc ...Show All
Visual C# Select in access not return any results
Hi, I'm trying to make a select in access from C# but I do not receive any data my code OleDbConnection conn= new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+path+"\\alunos.mdb;User Id=;Password=;"); string sql="SELECT * FROM Alunos WHERE (((Alunos.nome) Like '*"+nome+"*') AND ((Alunos.data_nasc)=#"+data_nasc+"#))"; OleDbCommand cmd= new OleDbCommand(sql, conn); OleDbDataReader dr = null ; string [] dados= new string [3]; try { conn.Open(); dr = cmd.ExecuteReader(CommandBehavior.CloseConnection); if (dr.HasRows) { dr.Read(); dados[0]=dr["nome"].ToString(); dados[1]=dr["codigo"].ToString(); da ...Show All
Software Development for Windows Vista Issue when removing an activity
Hi. I have an app that embedds the wf, and I'm having a problem when removing an activity from the workflow. The exact same problem occurs with the Lab10 - Exercise 4 example. You add an activity of a given type (a Delay activity for example), then, using the "Remove" button from the toolbar, you delete the activity. Then, I'm trying to add an activity of the same type, another Delay activity, but when I drop it, it is not added on the workflow. I have to repeat the process to add that activity. Basically, the code used to remove the activity is this: activity.Parent.Activities.Remove(activity); Any clues Thanks in advance, Matias ...Show All
Visual Studio Team System Strange checkin policy error
I have setup a code analysis checkin policy on a Team project, I have a solution where I have migrated code analysis settings so I know they are as stringent as the checkin policy and a build of that solution has succeeded. However when I make a change to one of the projects in my solution and try and checkin after a successful build I get the following policy error: TF10139:The following policies have not been satisfied Internal error in Ensures that code analysis is run with a predefined set of rules This project that is having problems is one where I have significantly changed the contents of the .csproj file as it is in msbuild format. However the IDE build reports no problems. Any ideas Ma ...Show All
SQL Server Merge replication - examples for custom conflict resolvers?
I have gone through BOL and various online resources including this one and I can't find any examples on how to use custom conflict resolvers to generate a result row which is a combination of the rows to be merged. BOL says it can be done, but suitable examples are missing. I have found various posts requesting examples from up to a year ago, but can see no replies with relevant information In particular I would like to see examples of 1) A stored procedure based custom conflict resolver 2) A business logic handler written in VB .Net Here's hoping aero1 You might want to look at the additive conflict resolver. This will do something like concatenate or add the two values together. You ca ...Show All
Visual Studio MSDN Installation
This question is about installing the MSDN library that came packaged with Visual Studio .NET 2003 Academic Edition. I know this forum is labeled for 2005, but I didn't see one for 2003. Hopefully, this is still appropriate. The problem I am having is that after installing the MSDN library, I can't access any of the information in it. All the filter lists on search, index, contents, and dynamic help are empty, and all the results windows are empty, regardless of what I type. If I try to use search option, it just says "Unspecified Error". Does anyone know why such a thing might occur I've tried searching for help on the internet and these forum. But "unspecified error" is too ambiguous to get any help that relates to my ...Show All
Visual Basic Again make some text bold
Hi I have this code Do While objRdr.Read = True Me .Rich_kat.Text = Me .Rich_kat.Text & "Kategori id: " & objRdr( "katid" ) & " Kategori titel " & objRdr( "kategori" ) & vbCrLf loop Where i want to make "Kategori id " and Karegori titel " bold but in every line there are regards alvin Hi I try this: Do While objRdr.Read = True Me .Rich_kat.Text = Me .Rich_kat.Text & "Kategori id: " & objRdr( "katid" ) & " Kategori titel " & objRdr( "kategori" ) & vbCrLf Me .Rich_kat.SelectionStart = Me .Text.LastIndexOf( "Kategori id:&q ...Show All
.NET Development Declare a Type at runtime
Hi, This is probably a stupid question but I need to specify the Type of a variable when I will only know the Type name at runtime. For example, the following class takes a Type name as a string and it should define a dataAdapter variable based on the Type name. public myClass(string typeName) { // I need to define the Type of dataAdapter based on the typeName [typeName] dataAdapter; } mc1 = new myClass("ICustomerDataAdapter"); This will define a Type as ICustomerDataAdapter dataAdapter; mc2 = new myClass("ISupplierDataAdapter"); This will define a Type as ISupplierDataAdapter dataAdapter; Any id ...Show All
Visual C++ command line cross-compiling X86, X64 and IA64 with Visual Studio 2005
Hi, I can compile project in X86, X64 and IA64 with the Visual Studio 2005 without problem. But, when I try to compile with the command line (cl.exe, link.exe), I got this error when generating dll : module machine type 'x64' conflicts with target machine type 'IA64' And also, all the lib are (different) but with the same size witch it's impossible. I use the option /MACHINE:[X86|X64|IA64] with link.exe but I don't know witch option use with cl.exe to specify the target machine. Regards, Eric (I use Visual Studio 2005 team fondation with PlatformSDK 3.0 and Windows XP x64) Hi I am trying to install visual studio 2005 for cross compiling on command line. but found there is no option for ...Show All
SQL Server SQL Server 2005 SP2 Fails
I have a Windows Server 2003 Enterprise Edition SP1 with a couple of SQL Server 2000 instances on it and two SQL Server 2005 instances on it. I tried to install SQL Server 2005 SP1, but kept getting failures. I saw that SP2 fixed some of the issues with installation issues that SP1 had. So, I tried to install it. Some of the smaller components install successfully (VSS Writer, Backward Compatibility, SQLXML4, MSXML 6.0 Parser, Native Client, Support Files), but all of the base services fail to install (Database services, Reporting Services failed for two different instances). I've downloaded the SP2 from the Microsoft site local to that server and install from there. I don't have space problems on ...Show All
Visual Studio The binding handle is invalid with Web applications in Visual Studio RTM
Hi, When I tried to debug the Sample application with RTM, it gives the following error. Unable to attach. The binding handle is invalid To resolve this error I made changes in Administrative Tools a Services a Terminal Services. I had changed the properties of this service that is I had changed Startup Type as Manual and started the service and after that restarted my system. Now Debugging is working perfectly. Hope this helps Thanks mate. You are absolutely correct, same thing happend to me. I just set the Terminal Service "Startup type" to Automatic and then it allowed me to start the service. It worked like a charm! Oh BTW I was using Visual Web Developer 2005 Express ...Show All
