Territorial Musings's Q&A profile
Software Development for Windows Vista Why are so many important design time classes internal only?
I'm attempting to create an activity in a similar style to IfElseBranchActivity. This allows you to select the type of condition, and then set the properties on it. It does this by using a custom TypeConverter and overriding GetStandardValues which creates instances of the possible derived types, and then you can bind their properties. Now the first bit I've managed to do fine, but when it comes to binding the properties of the objects created by the TypeConverter, I get the error that only dependency properties can be bound. So I look at how the ConditionTypeConverted manages to create properties so that they get bound, and there are literally thousands of lines of code in internal classes like PropertyDescriptorFilter, and internal cl ...Show All
SQL Server sqlserver 2000 isolation level & locks
Hi , I am new to sqlserver family! 1) In SQLSERVER 2000 what is the default isolation level 2) DB: PUBS / Table: Employee Session1: Begin Tran Go Update employee set fname='thiru' where emp_id= 1 Session 2: Select emp_id,fname from employee <<< waiting.........>>> Session 3: select empi_id,fname from employee where emp_id = 2 1 record selected successfully Oracle returns the value for Session 2 query but SQLSERVER waits for the Session 1 transaction either to be comitted or rolledback. What happens exactly in sqlserver for session 2. thanks Thirumaran Concurrency Managers (implemented in the middle tier or the application itself) use this to dete ...Show All
Microsoft ISV Community Center Forums Does Share exist
I am trying to determine if a share exists or not. The issue I have is the following code returns an error 76 (path not found) if the share is not there or I have no rights to it. Therefore, the share might exist. Dim oFS As FileSystemObject Dim tShare As Folder Set oFS = New FileSystemObject iShare = "c:\test" Set tShare = oFS.GetFolder(iShare) Any suggestions how I can return "access denied" or an API that might give seperate errors when connecting to a share NM Cheers Andy that sort of put me on the right lines... the final solution I came up with was using WNetAddConnection2. This will create a connection to a share that you do not have rights to.. a litt ...Show All
SQL Server Change of Execution plan
Hi, We migrated our database from SQL Server 2000 to Yukon last week. Now, when we run our application it has slowed down. We analyzed some stored procedure and they seems to have degarded. The execution plan has changed. Now, this looks like there's lot of work if we have to tune each query w.r.t the new execution plan. Our application has around 4000 stored procs. Is anyone aware of some generic pattern or solution such that these exection plans problem can resolved Also, does the new execution plan ensure that the once we tune stored procs will perform better than SQL Server 2000. Need help on this, otherwise it seems we might have to move back to 2000. Thanks in Advance Ritesh ...Show All
Visual Studio Team System Process Template change
I want to remove a few workitems I do not use in my process template. For example. I have no reason to create a "risk" workitem. I know that if you alter this xml. And remove the entries for the workitemtype that you don't want created it will work fine for any new project created using this template. (see xml below). However I don't want to create a new project, we only use one project. Is there a way I can remove the ability to create certain workitem, ie "risk" in an existing project It should no longer appear when you right click on workitems and choose "Add work item" from ProcessTemplate.xml <task id="WITs" name="WorkItemType definitions" plugin="Microsoft.Pro ...Show All
SQL Server Barcode font "shrinks" during PDF export
Hi all, I'm using a free barcode font so i can create scannable tickets via reporting services 2k5. When I print the tickets, everything seems fine. But when i export to PDF though, it looks like the barcode font shrunk. All the lines are pulled together, making scanning impossible. Is there a certain setting or so that i can use to ensure the font's width -Update- The weird thing is: when i export it inside visual studio, the barcode is shown as it is supposed to in the pdf ! Thanks in advance! Hi, I am facing the same issue. Microsoft please reply. Regards and TIA, Ashish ...Show All
SQL Server How to create a assembly
Hi, I have one ClassLibrary three member functions.I have the dll for this...Can some one please tell me how to create a Assembly in .NET. I need to create a simple private assembly with the dll that i have. Thanks I am guessing that this is for SQL Server. create assembly AssemblyName from '<path>\AssemblyName.dll' go --Then you can declare the objects within using syntax like: CREATE FUNCTION [dbo].[DeployName](@ParameterName [nvarchar](4000)) RETURNS [nvarchar](4000) WITH EXECUTE AS CALLER AS EXTERNAL NAME [AssemblyName].[RootNamespace.ClassName].[FunctionName] GO Or do you mean what you have to do to build the code to make the assembly ready for SQL Server ...Show All
Software Development for Windows Vista Elevating an IE7 toolbar to Integrity Level: Medium
Hello, I have an IE7 toolbar that needs to write to an Access DB that resides in the Program Files directory. However, because IE7 runs in Protected Mode, the toolbar does not have access to write to the Program Files directory. So, I tried to move the Access DB to the ProgramData directory. Now, I don't get the Access Denied error, but the toolbar doesn't write to the DB that is in the ProgramData directory. Instead, it writes to some VirtualStore directory. Has anyone run into this Does anyone know how to elevate an IE7 toolbar so it runs with an integrity level of MEDIUM Thank you, The integrity level is for the entire process. You can try to use the following command line tool to lower t ...Show All
Visual C# Reading data from Access database
Hi, I have made an Access database , named IntermediateResults database, and connect it to my C# application using : Data --> Add new data source command, and I have wrote the following lines of code : string connetionString = Properties. Settings .Default.IntermediateResultsDatabaseConnectionString; OleDbConnection con = new OleDbConnection (connetionString); con.Open(); static IntermediateResultsDatabaseDataSetTableAdapters. DocumentsTableTableAdapter dTA = new StartWindow.IntermediateResultsDatabaseDataSetTableAdapters. DocumentsTableTableAdapter (); IntermediateResultsDatabaseDataSet . DocumentsTableDataTable dDT = dTA.GetData(); OleDbDataReader myDataReader = new OleDbDataReader (); but ...Show All
Visual Studio Tools for Office Highlighting code in an email
Hi there, In my office a lot of code is sent around embedded into the body of outlook emails. So a typical email could look like; Hi, I managed to hack it, here is the code <oooh>hack</hack> cheers, me Now what I would like to do is clearly differentiate the code from the message. On several forums (but not this one strangely) this is usually done by highlighting the code and then clicking on a symbol in the toolbar (usually #). This then wraps <code> </code> tags around the highlighted area, indents the text and marks the background grey. Is there any way I could roll this out into my office. I'd like to have a simple button on the toolbar that anyone can install, and then use. Please note t ...Show All
.NET Development Stripping diacriticals from string?
Is there a .Net string method that will strip diacriticals from strings That is, what can I replace ToNoDiacriticals with to get the following to work: string foreign = "Bia owie a"; if (foreign.ToNoDiacriticals().Equals("Bialowieza")) System.Console.Writeln("Works!"); Richard Hough wrote: Thanks Peter. Wow, that looks like a lot of work. I was checking out String.Normalize, as Hans suggested, and considered something like: string decomposed = foreign.Normalize(NormalizationForm.FormKD).ToCharArray(); System.Text. StringBuilder sb = new System.Text. StringBuilder (); foreach (int c in decomposed) { if ((c <= 0x0300)) || (c > 0x03FF)) sb.Add((char)c); } ...Show All
Internet Explorer Development A problem with IWebBrowser2:Navigate() under IE7
I have a problem with ie7, the method Navigate of interface IWebBrowser2 can't work as before. My application is a C++ one, there is a Browser control (BrowserObj1) which is created in the main thread, hosted in the main window. The browser control will direct to a html file ( index.htm ) using method Navigate of IWebBrowser2. There is a custom control (MyControl) embeded in a table of the index.htm. My control is a visible one which hosts another Browser control (BrowserObj2). Till here, all the codes work fine under both ie6 and ie7. Then, invoke method Navigate of BrowserObj2 in main thread, to load another html file (page1.htm). Now, the method Navigate fails to navigate page1.htm under ie7, and the return value is "the requ ...Show All
Microsoft ISV Community Center Forums VBA function having it's name's case changed in excel
I am just starting with VBA / excel though I am a moderately competent programmer. I created a function B4FirstBlank() (written exactly like that) that looks at a Range reference and finds the value of the cell before the first blank cell. It works fine but whenever I type it into excel it is rewritten as b4fIRSTbLANK() which doesn't do much for me in terms of readability. I get other strange rewriting of functions too, any guidance on how to sort this out much appreciated. Andrew Typically, the IDE uses the declaration/definition of the function to determine its case throughout the module. Check the definition of your function to make sure that it's formatted correctly -- if not, and you fix it there, th ...Show All
Visual C++ 'Parameter #2": Pointers cannot reference marshaled structures, Use ByRef instead - Help!!
I am using a third party API and I need to register a callback function that is embedded in an unmanaged structure. The callback function looks like this: typedef int(__stdcall *EventDetectedFunction) (long callback_parameter, const char* eventXML); The structure looks like this: struct Callbacks { EventDetectedFunction EventDetected_; long callback_parameter_; }; And the DLL function that sends the callback structure looks like this: int SetCallbacks( Hwnd handle, Callbacks* pCallbacks ); I am attempting to use this API in a windows form so that I can ultimately get the eventXML to display in a textbox. I can’t find an interop example that ...Show All
.NET Development ADO.NET Update Did Not Update DB
Hi, I am using C# and .NET 2.0 and ADO.NET 2.0 in Visual Studio.NET 2005 running on Windows XP. I am creating an application that reads from a SQL Server 2000 DB using OleDB connections, allow user to do some updates on screen, and then save those updates back to DB. The data I read, most of them I bind to DataGridView on my forms, but there is one form that I bind the data to various text boxes. I load the data into a DataSet, and I go through the DataAdapter and BindingDataSource to bind the data onto the controls. I am also using the OleDBCommandBuilder to build the sql commands. The problem is: when I try to save the changed data back to DB, when I make the Update call on the DataAdapter class, none of the data is updated. ...Show All
