sofakng's Q&A profile
SQL Server Aggregate() doesn't aggregate over an expression
We use CTP3 of SQL Server 2005 SP2. We have the following scope expression Scope ( [Date].[Calendar Year].[Calendar Year].Members, [Date].[Month].Members ); ( { [Measures].[Profit YTD] } ) = Aggregate ( PeriodsToDate([Date].[Calendar].[Calendar Year], [Date].[Calendar].CurrentMember) , StrToMember(Extensibility.Replace([Measures].CurrentMember.UniqueName, " YTD", "")) -- remove " YTD" suffix to aggregate over the corresponding standard measure ); Format_String ( This ) = "Currency"; End Scope; However, Aggregate() essentially bypasses the call to the SSAS stored procedure (Extensibiliy.Replace is a custom SSAS stored pr ...Show All
Visual C# Build a 'long' number from two int's
Hello, i'm wondering whether it is possible to "build" a long number from two int's. My aim is to make it platform independent, thus i can't use any shift operators. With them, i would do something like that: long number = (long)myInt | (((long)myInt2) << 32); Does anybody have an idea georg Combining two ints into a long is very much a platform dependent operation. You could potentially encapsulate this operation by first discovering the endianess of the platform (using BitConverter .IsLittleEndian) and then using appropriate shifting sequence. ...Show All
Windows Forms Setting PowerPoint slideshow as active window over a form
HI! I'm trying to realize a simple application that loads PowerPoint presentations over a mask, displaying the name of the presentation ad the time passed. The problem is that I can't manage to set PowerPoint slideshow as the active window. This is the code (I omitted what was not important): Private Sub playerpresentazioni_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load Me.Activate() Me.WindowState = FormWindowState.Maximized Dim filePath As String = startmenu.DirectoryPath & "PresentationToLoad\" & filePres filePath = Replace(filePath, " ", Chr(32)) Dim returnValue As Boolean returnValue = My.Computer.FileSystem.FileExists(filePath) ... 'initializing componen ...Show All
Audio and Video Development Pause\Play on 1 button on my popup menu
I have a popup that I want to have 1 button that is "pause" when he movie is playing but after pressed it turns into a play button...I know how to animate its state so that it shows "play\pause" graphics but in my script I need to know a good if\then command for this button. Case "menu_1" player.playlist.pause(); thats what it is right now and it pauses the video and switches to the "play" graphic for the button...just need a good if\then script for Case "menu_1" Thanx in advance! < cue begin = " ($playState=1) " end = " ($playState!=1) " select = " id('playPauseButton') " > < set style:backgroundColor = " blue " /&g ...Show All
Visual Studio Team System Tracing back a branch
You can create a branch on a folder from a label. However, when you look on the Branches tab in the properties for a folder in the Source Control Explorer it only shows the version from which it was branched. It would be nice if it showed the criteria that was used when creating the branch (that is the label, changeset, date...). As it is, there doesn't seem to be an easy way in the Source Control Explorer to determine what label is associated with the version from which the folder was branched. Hello, As far as I know, there is no way to determine whether you have created a branch from label or just from specific changeset. The label is used only at the moment of branch creation as means of determi ...Show All
Visual Studio 2008 (Pre-release) sample service doesn't work on Windows XP 64
Hello, I tried to make a windows service that hosts a WCF service. Naturally, I've tried the sample first. It crushes raising an error: System.ServiceModel:Incorrect function at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen() at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener) at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback) at System.ServiceModel.Channels.HttpChannelListener.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.DatagramChannelDemuxer`2.OnOuterListenerOpen(ChannelDemuxerFilter filter, IChannelLi ...Show All
Game Technologies: DirectX, XNA, XACT, etc. device.Lost not firing.
I'm having problems when i reset the graphics device after a resolution change. Here is how i have the reset and lost events set-up. //handlers for device events device.DeviceLost += new EventHandler(device_DeviceLost); device.DeviceReset += new EventHandler(device_DeviceReset); void device_DeviceReset(object sender, EventArgs e) { LoadResources(device); } void device_DeviceLost(object sender, EventArgs e) { UnloadResources(); } private void LoadResources(GraphicsDevice device) { //set anisotropic filter InitAnisotropy(); debugFont.Reset(device); effect = new BasicEffect(device,null); effect = Effects.InitBasicEffect(effect, device); } private void UnloadResources() { primitiveToRender = null ...Show All
SQL Server Splitting string and show in rows
Hello, I have a dilemma. I have made a report which show data from crm (3.0) What I want exactly is the following: I have a table on my report. In the table I want to show data from a field in crm. The data in this field look like this: 12345; 67890; 54321; 11223333; Now the thing is that I want to get this string and split it at the "; " characters Then I want the splitted strings showed in separate rows. I already have splitted the string with the following expression: =SPLIT(Field!new_numberfield.Value, "; ")(0) //The zero at the end stands for the array first entry This is working but showing only one substring. I it possible to do what I want Best regards, Fedor B ...Show All
SQL Server SQL Server July Books Online access issue
Hello After I installed SQL July Books Online and Samples neither Tutorials nor SQL Server Books online can be opened. When I try to open any of them (SQL Server Mobile Edition Tutorials, SQL Server Tutorials or SQL Server Books Online) I get a message: "Microsoft Document Explorer cannot be shown because the specified help collection 'ms-help://MS.SQLCC.v9' is invalid." Also when I try to use local Help I get 'Search failed. Exception from HRESULT: 0x800403BA' message. The Help Topics and Help Searches lists are both empty - 'Currently no topics have been found'. I tried to uninstall and then install again the SQL Server Books Online but nothing happened. I tried to do the same with the April's one as well. Same ...Show All
Visual Studio 2008 (Pre-release) Path fills
Hi, I'm writing a simplistic swf->xaml converter. Example output: <Path Data="M 186,411 C 183.3333,404.3333 184.3333,402.6667 189,406 C 192.3333,408 193.3333,409 192,409 C 190.6667,409.6667 189.6667,410.6667 189,412 C 189,412 188,411.6667 186,411 " Fill="#FFFFFFCC" Stroke="#FF000000" StrokeThickness="0.5" /> <Path Data="M 190,411 C 188,404.3333 189.3333,402.6667 194,406 C 196.6667,408 197.6667,409 197,409 C 189,413 188,414 194,412 C 194,412 192.6667,411.6667 190,411 " Fill="#FFFFFFCC" Stroke="#FF000000" StrokeThickness="0.5" /> Can I create fill with anything else than solid colors, e.g. how do I fill with a gradient brush Tha ...Show All
Software Development for Windows Vista Error while running application on VISTA
we are developing some multimedia application, everything is working fine on XP and 2000, but on Vista I'm getting the following error when I'm calling a COM server method with a BSTR parameter: "Duplicate Memory Free operation. Get a stack trace and report bug against the calling app (not against OLE Automation). File: d:\rtm_edw\com\oleaut32\typelib\oautil.cpp, line 602" Anyone could help me tried that too, isn't working... actually I removed all code from the SetUrl() method implementation and inserted only an ::AfxMessageBox() in order to see that the calling is made, but surprise there is no message box showing up after the call is made in the application. ...Show All
.NET Development How to identify stack unwind due to an exception?
I would like to know in a Dispose() method of a stack allocated object whether it is being disposed due to an exception that is unhandled in that stack-frame or from normal stack deallocation. e.g. class T : IDisposable { void Dispose() { if (IsException()) System.Console.WriteLine("Exception"); else System.Console.WriteLine("Return"); } } which can distinguish between: using (T t = new T()) { return; } and using (T t = new T()) { throw new Exception(); } I have looked in StackFrame, StackTrace, AppDomain, GC, CurrentThread, ExecutionContext for relavent state information but I just can't find any. Help! Many thanks, Duncan ...Show All
SQL Server Custom Desktop Application
Hi All, Today we are very pleased to announce the CTP release of Microsoft SQL Server 2005 Everywhere Edition Access Database Synchronizer (ADS) for which many of you been waiting eagerly. To download the product you can visit the SQL Server Mobile Edition/SQL Server Everywhere Edition product page or click on this link to Access Database Synchronizer reach the download page directly. Access Database Synchronizer provides a way to synchronize data between Microsoft Access database on a desktop and Microsoft SQL Server 2005 Everywhere Edition database on a device. For more details you can visit our blog - http://blogs.msdn.com/sqlservereverywhere/archive/2006/08/29/729730.aspx I urge you all to in ...Show All
Visual Studio Team System getting varied results
Hi I am load testing a web based application..we at this point only require the response time in case we have 200 user hitting the link at the same time ....so wat i did wasrecorded the script in fiddler imported it to vsts and then configurd tha load test for the same .....i used a step load starting with 20 users and in every 60 sec 20 users were added till it reaches a maximum of 200 users ..i did not add an server or counters it was a local run however i made a connection pool of 100...igot error in connection wait time now if i change the connection pool little bit i get varied differences in the results specially the respone time which is my priority at the moment.Now here i have 2 concerns:- 1)connection pool is always set at ...Show All
.NET Development SqlException (0x80131904): Could not find stored procedure 'sp_adm_clases 2, @id_clase, @nombre_clase'
Hello forum: I've a problem with a store procedure. I ran the stored in Sql Express and work well, but in my gridview not. Can you help please This is my code: < asp : SqlDataSource ID ="SqlDataSource1" runat ="server" ConnectionString =" <%$ ConnectionStrings:mandarinoConnectionString %> " ProviderName =" <%$ ConnectionStrings:mandarinoConnectionString.ProviderName %> " SelectCommand ="SELECT id_clase, nombre_clase FROM [Clases]" OnSelecting ="SqlDataSource1_Selecting" UpdateCommandType ="StoredProcedure" UpdateCommand ="sp_adm_clases 2, @id_clase, @nombre_clase" > </ asp : SqlDataSource > ...Show All
