James Saull's Q&A profile
Visual Studio 2008 (Pre-release) 2 Way Binding
I'm attempting to do a two way binding to an Listbox. Each list box item contains several items. And has an Data Template similar to the following: < DataTemplate x:Key = " itemTemplate " > < StackPanel > < TextBox Text = " {Binding Path=Item1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged} " /> < TextBox Text = " {Binding Path=Item2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged} " /> < TextBox Text = " {Binding Path=Item3, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged} " /> </ StackPanel > </ DataTemplate > The list box itself is being programmatically bound to an ObservableCollection which con ...Show All
Visual Studio 2008 (Pre-release) DLinq query performance
Hi! I tried to do following : created database with table Order and insert 3000 rows in it. Then, i used sqlmetal to generate stuff. Then, i queried all orders with DLlinq and same thing with sqldataadapter. I used Sql server profiler to measure the execution time. And you know what - dlinq query took about 20 times longer than usual sql query (I didnt use stored procedures!). Is this normal and this is how thing are, or am I missing something here Thank You! This is how I query with SqlDataAdapter : DataSet ds = new DataSet(); SqlDataAdapter da = new SqlDataAdapter(); SqlConnection connection = new SqlConnection("server=localhost\\SQL2005;database=dt_rakendus; integrated security=sspi; Connectio ...Show All
Visual C# How this works
Hi , i found this code in a blog. but cudnt really understand its working, in the sense , why the output is "smile" despite the last assinment statement "test=S5280ft" can any one help me string text; text = "S5280ft"; unsafe { fixed ( char * pText = text) { pText[1] = 'm'; pText[2] = 'i'; pText[3] = 'l'; pText[4] = 'e'; pText[5] = ' '; pText = ' '; } } text = "S5280ft"; System.Console.WriteLine(text); i may sound really dumb...but i still am not able to understand why the CLR fails to know that the value S5280ft doesnt exist in intern pool any more. The following is MS description of how the intern method of string works. &qu ...Show All
Visual Studio Express Editions Empty Project Template's Missing
I know, I know, why should I care... According to this thread http://msdn2.microsoft.com/en-us/library/b4z62wxz.aspx VB Express should have the following templates built in (just like C# Express): Class Library, Console Application, Empty Project, Movie Collection Starter Kit, Screen Saver Starter Kit and Windows Application. On my system, however, the Empty Project template does show up in the C# edition, but not in VB. Why's that Probably I won't be missing a lot (hey, after all, it is an EMPTY project template), but sometimes those little things can really bother me. Oh, by the way, can I download the missing piece somewhere - just for completeness sake. And, no, it wasn't in the setup either. Thanks! ...Show All
SQL Server CLR Enabled
Can anyone tell me what this means and how to fix it I created a stored procedure in VS2005 and did a build. When I went to SQL Server there was the stored procedure but when I run it I get the error.... Execution of user code in the .NET Framework is disabled. Enable "clr enabled" configuration option I changed the 'clr enabled' property to 1 using sp_configure but I still get this error. Thanks Mike sp_configure 'something', value go RECONFIGURE go sp_configure 'something' go 'something' is a placeholder, yes. To see all possible configurable options you might try -- sp_configure test sp_configure 'show advanced options' , 1 go RECONFIGURE go sp_configure go -- EO sp_configure test This should list everyt ...Show All
Visual C# C# How do I create a pointer to an array of doubles for unmanaged code
Hello everyone. I hope that someone out there can help me. I have searched everywhere I can think of, but cannot find any reference to pointers to arrays and how they appear to behave differently to pointers to single values. I am attempting to talk to a C DLL whose signature is void SDA_Multiply( const SFLOAT* Source array pointer SFLOAT* Destination array pointer const SFLOAT Scalar multiplier const SFIX Array length where SFLOAT is a double and SFIX is a long My problem is that I don't know how to pass pointers to arrays in an unsafe environment. I understand that I need to use System.Runtime.InteropServices. I also understand that I need to ...Show All
Visual Studio Tools for Office loading a form in add-in through Reflection fails
I am creating a outlook 2003 plugin in VS2005 team edition. Normal form instantiation works and the addin shows up my custom forms just fine. however i am trying to dynamically load a form through something like: Assembly myassembly = Assembly.LoadFrom("e:\\sampleform1.dll"); ............. The above code gives an exception: {"Could not load file or assembly 'sampleForm1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)":"sampleForm1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"} i tried adding the setsecurity project from the "OfficeVSTOWindowsInstallerstaller" download ...Show All
Visual Studio Express Editions AutoIncrementing UniqueIdentifier column in SQL databse table giving NoNullAllowedException!
Visual Basic 2005 Express: In my SQL database table, I have a CustomerNbr column. In Database Explorer's table definition it has "UniqueIdentifier" as it's data type, and is set as the PrimaryKey. In the XSD Designer, this field is set as the primary key, AutoIncrement=True. DefaultValue is <DbNull>, but, it won't let me remove this! When I add a record to the DataGridView, it correctly puts a "1" in the CustomerNbr column, but, when I update the record, I get a System.Data.NoNullAllowedException! >ok I think we have something here. >The database table, customers, had a schema change. So Delete "CustomerNbr" and create another field called "Cus ...Show All
Visual Basic [VB.NET] How to merge many GIF Files into one file
I need to create a software that it merge many GIF File into one file container. My application has this form I want that when i click "Add File" it shows an OpenFileDialog and that add file's path in the ListBox And when I click "Merge File" It merge all GIF file present in ListBox And when I click "Split File" it split all GIF File present in a File Container and that It save GIF Files in the same directory of the File Container I tried to write the code but it change any bytes of the GIF Files when I merge :( and i don't know how to use Split Function in VB.NET [Off-Topic]I'm new in VB.NET and i don't know fine this new programming language Best Regards Flash You lost me ...Show All
Windows Search Technologies WDS 3.0 RTW gives error trying to index Outlook Express message store
When WDS 3.0 RTW tries to index the Outlook Express message store, I am getting the pop-up error: "Outlook Express could not be started. The application was unable to open the Outlook Express message store. Your computer may be out of memory or your disk is full. Contact Microsoft support for further assistance. (0x80004005, 183)" I have plenty of memory and the disk is not full. Does this version index OE Any idea how to resolve this Same problem. Windows XP HE and OutlookExpress V 6 with latest patches. 2GBs of system memory and over 40 GB free space on the C drive. I use Outlook Express to access hotmail and store messages I want to keep (and be able to search) in several Outlook Expre ...Show All
Visual Studio Report Header Footer not available
I'm new to rdlc. When I create a new report I can see no Report header or footer sections.. just the "body" How do I add a header or footer section please There is no reports menu that I can see ... I can get to Report properties. via right click of the Report name on the document outline screen or via the little box on the left hand top corner.. There I can see page header and page footer tick boxes.. but they are all disabled!! I'm familiar with access repots and I have also used crystal. So I do have some experience in report writing. Obviously I am missing something here. When I create a new report I get a body section that's all, no headers or footer sections...Is that nor ...Show All
Visual Studio How can I handle Build and Run events?
Hi there, I'm developing a custom package using MPF (VSSDK Sep 2006). I need to handle some usual events in VS: 1. Build - when user presses CTRL+SHIFT+B or Build command in the menu 2. Build & Run (aka F5) - when user presses F5 or Start Debugging command in the menu I want to handle these two events and ask my external compiler to just build the project or build it and if it's ok then run the compiled result. Can anybody advice me the appropriate solution for my task Maybe it will better to add my own menu near Debug and add 2 subitems to that menu In this case - how can I catch the CTRL+SHIFT+B and F5 shortcuts Thanks Hi Ole, Thank you for your response! I own my project - that is the custom package w ...Show All
SQL Server Problems with the SELECT ROW_NUMBER() OVER approach
Hi guys, I am using this approach in order to be able to do server side paging on the SQL server (why Microsoft, why can't you just put the limit vlause to work ). Anyway, here is what I am using... http://davidhayden.com/blog/dave/archive/2005/12/30/2652.aspx My code is somehow structured like this: WITH LogEntries AS ( SELECT ROW_NUMBER () OVER ( ORDER BY Day , Month , Year DESC ) AS Row , * FROM reptable where $LOTS OF CLAUSES$ ) select Year , Month , Day , $ALL MY DATA$ from LogEntries where Row between ( @PageIndex - 1 ) * @PageSize + 1 and @PageIndex * @PageSize This works like a CHARM. Problem is I've placed this under a stored procedure and I need t ...Show All
Software Development for Windows Vista Vista Logo Certification Questions
I've reviewed the Vista Logo Certification spec + test cases, and have the following questions: How do you decide what manifest settings are appropriate for a Service My service requires a LocalSystem account, but I don't understand if I should use asInvoker, highestAvailable or requireAdministrator. How do you preserve custom problem reporting if Microsoft requires all crash data be sent to Microsoft servers Authenticode signing causes problems when CRL checks get hung up. There is a known issue where if an authenticode signed service is starting during an install, the CRL check can take longer than the service startup timeout (30 seconds) and the install can fail. This happens when the Internet connection is sta ...Show All
Visual Studio 2008 (Pre-release) How To: Create Custom Client and Service Credentials
I read this article on MSDN, but it doesn't describe how you consume a custom ClientCredentials on the service side. I'm fairly new to WFC and am looking to create a custom ClientCredentials class that includes additional meta information about the user that can be used to determine what authority they have to perform a particular function within the service. Maybe a custom ClientCredentials class isn't the correct way to do this but I would like to make it as easy as possible for the client side of my services to just instantiate the client proxy and have it use my custom ClientCredentials so that on the service side that meta information will be available to make certain decisions about how to process the request. The article I am ...Show All
