brajeshkumar69's Q&A profile
Visual Studio Can I create ModelDocData and ModelDocView from the model domain class?
I serialized my model doing something like this: SerializationResult sr = new SerializationResult (); UseCaseSampleSerializationHelper .Instance.SaveModelAndDiagram(sr, obj1.ModelRoot, @"C:\TEMP\MODEL.XML" , obj2.Diagram, @"c:\temp\model.diagram" ); This work fine, after i want to deserialized the model and show it on one designer, but i haven’t any file ".diagram" on the solution explorer, only I have the model load on the store: SerializationResult sr = new SerializationResult (); UseCaseModel result= null ; Store store = new Store (); Type [] modelTypes = new Type [] { typeof (Microsoft.VisualStudio.Modeling.Diagrams. CoreDesignSurfaceDomainModel ), typeof (Microsof ...Show All
Visual Studio Express Editions Limiting result in a Label to two decimal places
Hi Everyone I'm new to Visual Basic and I just need to know how to limit the result in a label to two decimal places. i.e. instead of having 3.14159265 displayed, I want 3.14 displayed. Thank you to anyone that helps and I know that this is a noob question If I am unclear then just tell me and will explain in more detail Wow thanks for the quick reply thats just what I needed! Um.. now that I look at it I don't know how to use that.... Heres what I have in my code. And I want the TotBMI.Text value to be limited to 2 decimal places. Sorry I just didnt get how to use the other stuff. Private Sub CalcBMI_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles C ...Show All
Visual Studio 2008 (Pre-release) Position in Canvas?
Hello, how can i set the position of an element in canvas with code Thorsten TextBlock txt1 = new TextBlock(); txt1.FontSize = 14; txt1.Text = "Hello World!"; Canvas.SetTop(txt1, 100); Canvas.SetLeft(txt1, 10); myCanvas.Children.Add(txt1); ...Show All
SQL Server Creating a table from .NET
I need to create tables from a C# code. I made a stored procedure hoping that I will pass a table name as a parameter: @tabName. The procedure executed in SqlServer All Right but when I called it from C# code it created not the table I put in as a parameter but table " tabName ." Otherwise everything else was perfect: coumns, etc. Here is my stored procedure. set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[CreateTableTick] @tabName varchar(24) = 0 AS BEGIN SET NOCOUNT ON; CREATE TABLE tabName ( bid float NULL, ask float NULL, last float NULL, volume float NULL, dateTimed datetime NULL ) END What went wrong Thank you. To be honest, I wouldn't expect the SProc you've listed to work the ...Show All
SQL Server ADOMD.net 9.0 (client) and CubeDef.LastProcessed
What is this property (CubeDef.LastProcessed) supposed to return as it does not return the date the cube was last processed Does AMO provide this info more reliably TIA Dave Hi Dave, It's a bug - CubeDef.LastProcessed returns the last time the server was restarted as far as I know. See http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx FeedbackID=124606 ...for more details. Take a look at the comment posted by furmangg on April 28th on this entry on my blog for some code which does what you want: http://cwebbbi.spaces.live.com/Blog/cns!7B84B0F2C239489A!675.entry It's also available in the Analysis Services Stored Procedure Project here: http://www.codeplex.com/Wiki/View.asp ...Show All
Visual C# How can I replace all occurance of a string except when it's enclosed with a special tag?
Hello, Let's say I have a variable named: someVar which contains the following: href wow nice this <a href="cp.com">cow duck john</a> text etc And I want to replace: "href" with "link". I can't do: someVar.Replace("href", "link"); Because that will change: <a href="cp.com"> ! So, how can I replace all the occurances of "href" when it's not part of an HTML tag Please help. Tangfx, Your regular expression also has a problem if single quotes are used instead of double quotes. Perhaps altering it slightly to this href( !\s*=\s*( :\"|')) would be better. ...Show All
SQL Server Stop Processing on Key Errors AS 2000
I'am using MS AS 2000. I have added to my fact table keys which are not included in my dimension tables. Then I process the dimensions and the cube. I fully processed the cube and used the default process options (Stop Processing on Key Errors; 0). But the cube processed without an error. The invalid records in the fact table are just ignored. Why Thanks for any reply, Hi Cornelius Once you have reprocessed the dimensions you will also need to optimise the cube. Open the cube to edit it and select Tools->Optimise Schema. You should get a pop-up message saying that the dimension fields will now use a fact field. If it says that the dimension can't be optimised then you will still be doing an inner join query, which will exclu ...Show All
Visual Studio Team System how to resolve the cross DB warnings?
when i wrote the SP in database A,i used the like this insert into table select * from [Database B].[table] then warnings raised like below: Warning 1 TSD3025: The following cross-database dependencies could not be verified: [wsRStaging].[dbo].[ExemptCustomer], [wsRStaging].[dbo].[ExemptCustomer].[CustomerId], [wsRStaging].[dbo].[ExemptCustomer].[CountryName], [wsRStaging].[dbo].[ExemptCustomer].[GeoAreaName], [wsRStaging].[dbo].[ExemptCustomer].[CBNFlag], [wsRStaging].[dbo].[ExemptCustomer].[RegistrationID], [wsRStaging].[dbo].[ExemptCustomer].[deleteFlag]. Your database application might fail at runtime when [dbo].[usp_ImportLiveExemptCustomerData] is executed. E:\TFS Folder\System Architecture\wsRDB_Prod\Schema Objects\Store ...Show All
Windows Forms SerializationException "Cannot get the member 'Child_PropertyChanged'." when de-serializing generic collection
I have created a custom generic collection class with a signature like so: [ Serializable ] public class blGenericCollection <T> : BindingList <T>, ITypedList , IListSource , IXmlSerializable where T : blObjectBase , new () {blah blah blah} The child items that derive from my blObjectBase publicly implement INotifyPropertyChanged , as does blObjectBase itself. I'm getting SerializationException errrors when de-serializing the collection class (stack trace below) using BinaryFormatter . However, the child item classes serialize and de-serialize just fine, as does my blGenericCollection class when it is empty. But when blGenericCollection contains items - I blow up. (Side note: Xml serialization fo ...Show All
Smart Device Development Is it possible to subclass Menu?
Hi, Is it possible to subclass Menu in Compact Framework In full Framework it is, but in CF I get "The type 'System.Windows.Forms.Menu' has no constructors defined" compiler error. Tia, Jman jiitee wrote: I'm using CF 2.0. "Error 9 The type 'System.Windows.Forms.Menu' has no constructors defined" and this points to the constructor header public class MyMenu : System.Windows.Forms. Menu { ..... protected MyMenu ( MenuItem [] items) : base (items) { } } you're trying to call the base class's non-existent constructor with base(items). see if it compiles without ":base(items)" or if it compiles with just ":base()" ...Show All
.NET Development DataSet Nested Rows
hi, i have an xml file looks like that .csharpcode, .csharpcode pre {font-size:small;color:black;font-family:Consolas, "Courier New", Courier, Monospace;background-color:#ffffff;} .csharpcode pre {margin:0em;} .csharpcode .rem {color:#008000;} .csharpcode .kwrd {color:#0000ff;} .csharpcode .str {color:#006080;} .csharpcode .op {color:#0000c0;} .csharpcode .preproc {color:#cc6633;} .csharpcode .asp {background-color:#ffff00;} .csharpcode .html {color:#800000;} .csharpcode .attr {color:#ff0000;} .csharpcode .alt {background-color:#f4f4f4;width:100%;margin:0em;} .csharpcode .lnum {color:#606060;} 1: < Library > 2: < Book id ="1" name ="anything" > 3: & ...Show All
Visual C# Properties.Settings; ArrayList and a custom object
Hello, I am writing a Windows Forms application using .NET Framework 2.0 and Visual Studio 2005. I would like to use Properties.Settings class to persist a collection of custom objects, so I can created a property called Connections of type System.Collections.ArrayList using the Properties designer in VS. At run-time I populate an arraylist with instances of my class and then I set the Connections property to this arraylist. Then, I execute the Save command on the Settings.Default. The Save command does not generate an error, but no settings are persisted either. Do I need to do something special with ArrayList and my class (serialization, perhaps) in order for settings to be persisted correctly Many thanks for your help! ...Show All
Visual Studio 2008 (Pre-release) Drawing a Bottom Border
I want to have a bottom border which spans a single row and two columns. Is there any way to do this I tried playing around with the border object but didn't have any luck. Thanks! Can you be a bit more specific Where do you want the border, what object do you want it around Is this a Grid or something Thanks Neil ...Show All
Visual Basic Login Form VB 2005
Hi , i can’t make a loging form, checking a database users, i already have the users db, but how can i made th validation, a full step explanation it'll be great, please help me i already read a lot of books about vs2005, but i still with this trouble i'm usin Microsoft SQL server, thanks a lot!!! because you dont have the connectionString declared in the scope of that function/sub. you need to either create it in there or pass it in as a parameter or use the GetConnectionString() function you have to return it the connectionstring: Private Function DoCheckUser( ByVal username As String , ByVal hashedPassword As String ) As Boolean Dim success As Boolean ...Show All
Audio and Video Development Problem with 'content ID' while creating directory in 'persistent storage'.
Hello Everybody.... In the java script for creating a directory (FileIO_createDirectory), do we have to specify the content id also If we don't specify, whether the directory will be created or some exception will be thrown I am giving two examples below, please tell in each case what will happen. 1. FileIO.createDirectory("file:///required/app1",callback_createDirectory); 2. FileIO.createDirectory("file:///required/11111111-1111-1111-1111-111111111111/app1",callback_createDirectory); Hi Maybe it is like this : Persistant storage- ------------------------ | &nbs ...Show All
