.NETPhreak's Q&A profile
SQL Server Recompile eveytime with sp_executesql
When you use exec() it will almost always generate a new execution plan (never reuse an execution plan), while sp_executesql will cache and reuse an execution plan based on the parameters sent to the SP. Is it possible to make the sp_executesql never cache the execution plan Or maybe recompile it every time I want the good things with parameterized queries (to avoid sql-injection etc), but I always want to generate a new execution plan. I have a table on which I make searches on username. If you do a search like 'brimba%' a certain execution plan will be made, but if you have alot of posts in the table and you do a search on 'b%' most probably sql-server will pick another execution plan. I have tried to add a WITH RECOMPILE to the ...Show All
Architecture Using Object Relation Mapping Tools
I am planning to use Object Relation mapping tool in our project, presently we zeroed on Nhibernate. Just before implementing i want to seek advice on the below points Any cons of using OR mapping tools Any known issues Any performance issues TIA, Sudheer. If you start with an object oriented domain model and want to add persistence: have a look at Persistor.NET . It is different to most OR mappers because the relational database schema is derived automatically and all mapping is done internally. Since no proprietary mechansim is used for enabling persistence you can include all .NET Framework classes and even 3rd party classes in your domain model to be stored. So many drawbacks of OR ...Show All
.NET Development The status of a running process
Does anyone know of a way to determine if a process running on the local machine is hung, or not responding I'd prefer to do this in C#, anyone Thanks to both for the input. The reason I asked for assitance is that I am building a customizable system monitoring tool, and I'm checking running processes and services, and running stored procedures to check the integrity of the data in database. Every xxx minutes - for each proc/svc/procedure, the monitor checks what it's supposed to and alerts someone to errors if there are any. Since I'm monitoring, I don't need access to the other process itself, only to know whether or not it is behaving normally. Since I can't call a function IsApplicationHung() or something, I need a more heuristic ...Show All
SQL Server measure using calculated member
I have fact and 2 dimensions. i have to create a mesure using calculated member. fact is having fkey ckey monthid hits responses CDIM is having Ckey ADateID MonthDim is having Monthid MonthName now i want a measure(XYZ) to be calculated using calculated member as Count of Ckey for AdateID = '20000101' for current member of monthdim. finally when i browse thru a cube it should display some thing like below. Monthid XYZ 200601 1000 200602 2000 Thanks in adv If you have a measure that is simply a row count of rows in the fact table called "Measures.FactRowCount" you can create the following calculation that would count the number of rows wi ...Show All
Visual Studio Express Editions Opening .Exe To Edit....
I wneed to open an .exe that I have created to edit. The problem is I don't have any of the files anymore. I just have the .exe Can u help me Well, If you architected your application into discrete components in separate DLL's, you could decompile the contents of the DLL and recompile it. (note, you will be doing this on a per method basis. Reflector does not decompile an entire application as a batch process). Alternatively, you can learn IL (a 6 month process if you are familiar with assembly or machine language) and use ILDASM and ILASM to dis-assemble your application, make minor changes and re-assemble it. However, don't even think about doing this if the following rendering of "hello world&q ...Show All
Visual Studio 2008 (Pre-release) XAML and Assembly References Problems
General Overview My solution contains 2 Projects RichClient, Namespace test.gui.definition This project will only contain an App.xaml LibraryProject is type of Windows Application (WPF) GUIDefinition Project ist type of Class Folder: UserControls (Namespace test.gui.definition.usercontrols) This folder contains customized UserControls Folder: Pages (Namespace test.gui.definition.pages) This folder contains Pages to display the UserControls and to handle the navigation Problem 01 How can I start a Page in Project GUIDefinition Pages/Login.xaml from the App.xaml in RichClient Problem 02 How can I import a UserControl GUIDefinition/UserControls/LoginControl.xaml in a Page GUIDefinition/Pages/Login.xaml ...Show All
Windows Forms How to grow rich in C# the event handler of a class in an inherited class
Hi, I’m writing a C# program (using Visual Studio 2005 Professional Edition). I have defined a class MyPanel in the following way: class MyPanel : Panel { … } In this class I have put a btn Button control, and I have defined the event handler: btn.Click += new EventHandler(btn_Click); … void btn_Click(object sender, EventArgs e) { … } Then, I have defined another class, inherited from MyPanel: class MyPanel2 : MyPanel In this class I would like to enrich the btn_Click event handler (the code of the base class should be executed anyway), but I don’t know why… If it were a method, as for example protected void InitializeControls() { … } ...Show All
Visual C# Converting date to system current date time format
Hello Can somebody help me for below problem In my .Net application I am using vb component having one method which accepts DateTime as a parameter. This value will be inserted into the database. The value to be passed to this method will be taken from some other database. Before passing this datetime variable I want to set the date format as a current culture system datetime format with ShortDatePattern. I used the below code to get the system short date format and to set that format to DateTime variable but the format is not getting changed to ShortDatePattern. Code :- string LstrSystemDateFormat = System.Globalization.DateTimeFormatInfo.CurrentInfo.ShortDatePattern; string LstrDateString = "15/01/2007"; DateTime Effec ...Show All
Windows Forms Visual Studio 2005 Hangs While Trying to Utilize Data Source Configuration Wizard
Visual Studio 2005 Hangs While Trying to Utilize Data Source Configuration Wizard. Why It was working when I left work last! The Access database has not changed. Is there another way to create a report datasource dataset beside the wizard Ok, it does appear that there has been one change in one column structure of a table in the Access 2003 database. I still cannot modify my data source or anything. I cannot open any of the datasets REGARDLESS of whether or not they have to do with the changed table or not. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. MATRIX UV Rotation
Hello... Hope someone can help me with this one:) My Problem is that i want to rotate the texture in the pixelshader efter D3D have done the fill in for the UV:s after the vertexshader, almost everything works good the texture rotates etc... BUT it doesent rotate in its center, the rotate origin is up in the left corner. Hope someone that is good at matrices can answer me why, and hopefully help me what to do:) here is some of the code.... sampler TexS = sampler_state { Texture = <gTex>; MinFilter = LINEAR; MagFilter = LINEAR; MipFilter = LINEAR; AddressU = WRAP; AddressV = WRAP; }; struct OutputVS { float4 posH : POSITION0; float4 color : COLOR0; float2 texCoord : T ...Show All
Visual C++ Pointer dereferencing causes crash, only in Release mode, x86 Assembly related
Hi. My application reads a file and suddenly it crashes when executing an x86 assembly command. The assembly command dereferenced a word pointer and suddenly crashed. The error message from Windows is : The instruction at "0x00421121" referenced memory at "0x041db000". The memory could not be "read". The instruction is a simple one : movd mm3, [esi] where mm3 is used to hold temporary values and esi is the offset of a DWORD within the file. If the application is build using Debug profile, it does not crash. Only when built with Release profile with optimizations does it crash. My guess is that the value of [esi] is 0xFF and when in Debug mode, this value is automatically replaced with 0x00 while in Release mo ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Fix mdx 2.0 on Microsoft Robotics Studio
there is a timebomb in the directx dll on 6.october if i was microsoft i say tanks fo the tip and implant physics api into xna best regards Please Read : Manage d Directx 2.0 Expira tion, moving to XNA in Robotics Studio http://www.microsoft.com/communities/newsgroups/en-us/default.aspx &query=please+read&lang=en&cr=US&guid=&sloc=en-us&dg=microsoft.public.msroboticsstudio&p=1&tid=1b4878e6-beac-4484-942f-92426aa078c8&mid=1b4878e6-beac-4484-942f-92426aa078c8 ...Show All
Silverlight (formerly WPF/E) Integrating JSON with WPF/E
I've been playing a lot with creating dynamic XAML lately and while I'm a big fan of XML it can definitely get in the way when large chunks of a WPF/E document need to be added. Since WPF/E integrates nicely with JavaScript and ASP.NET AJAX can be used, is there any chance that you're considering adding a CreateFromJson() type method so that we could feed dynamic JSON objects representing the XAML objects to the control instead of XML strings A perfect scenario is calling Web Services with ASP.NET AJAX and adding the XAML returned to a canvas. If calls are returned as JSON rather than XML, the message payload is minimized substantially and it's a lot easier and more concise to work with in many cases. It would be a nice tie-in to ASP.N ...Show All
Windows Forms Bindingnavigator and textboxes keep dissapearing :s
Hi, I got a major problem, I am working on a program,wich has 4 Tab pages,each have a binding navigator, but somehow one of the content of 1 tab is fully gone!Although the items still exist since VS doesn't give an error ... When adding a new navigator it also dissapears :s Any help would be appreciated,thx I have had the same problem occur twice. A bindingnavigator on a tabbed dialog page disappeared, both during design time and runtime. However, it appears that this happened because the "Visible" property mysteriously became "false". This happened to two separate bindingnavigators on two separate tabbed pages, just after I had been doing some design work on the database table adaptors. ...Show All
Visual Studio 2008 (Pre-release) BindingListCollectionView.CurrentChanged not fired if set Binding with Path
Hi, I bind to a DataSet. So I become a BindingListCollectionView. I use a combobox with IsSynchronizedWithCurrentItem=True and aListBox. I have a relation in my BindingCollectionView. Realtional Binding works, but: If I set in XAML: ComboBox: ItemsSource="{Binding}" ListBox: ItemsSource="{Binding Path="MyRelationName}" the CurrentChanged eventg of BindingListCollectionView will not fire anymore. Anybody who could help me Thanks, Chris Hi Christian, The behavior you described doesn't seem to repro in my July CTP machine. I uploaded my attempt to repro this here: http://www.beacosta.com/Forum/ThreeLevelMasterDetailADO.zip . I used the sample of my b ...Show All
