Poetjevel's Q&A profile
.NET Development TransactionScope, ADO.NET, and Timeouts
Hi! I've been having trouble using the TransactionScope to wrap multiple database queries into a transaction. What happened was, that the queries took too long to finish and the transaction timed out. Of course, this is the expected behaviour. What I didn't expect, is that the data was committed to the database anyways. I built a small test-app to see what happens. At first, I thought it was because I opened the database connection before starting the transaction. That's why I built two methods, one opening the SqlConnection before creating a TransactionScope, and one the other way around. Both simply add some entries to the database and wait a little to cause the timeout. And in both cases, the result was identical. What I noticed was, th ...Show All
Visual Studio Tools for Office VSTO - VS2005 Excel Addins issue
I am attempting to use VSTO for a client solution involving a financial application. I am using the release version of VSTO shipped in Dec 2005. The user has sent me a workbook with the analysis pack addin and another third party interpolation addin that you can find here: http://64.233.161.104/search q=cache:3Pd_nMh3qyMJ:www.codeproject.com/macro/InterpolationAddin.asp+excel+interpolation+adding&hl=en&gl=us&ct=clnk&cd=1 The problem is manifesting itself when opening the workbook within the VS2005 environment. It appears as though the addins, which are enabled for the workbook and function in the workbook OUTSIDE of VS2005, are not working INSIDE VS2005. I attempted to look for the Excel addin manager ...Show All
Visual Basic Enter Key and a Listbox
I read all of the post about the enter key. How do you get it to work on a listbox I tried this in the listbox's keyup event with out any luck. If e.KeyCode = Keys.Enter Then Button2.PerformClick() End If Davids Learning Yes I have put it in both ,key up and key down,both are present Private Sub EmployeeList_KeyDown( ByVal sender As Object , ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me .KeyDown If e.KeyCode = Keys.Enter Then MsgBox( "HA" ) Button2.PerformClick() End If End Sub Private Sub EmployeeList_KeyUp( ByVal sender As Object , ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me .KeyUp ...Show All
Visual Studio 2008 (Pre-release) LINQ syntax in VB.NET
I've been looking into this LINQ thing, and it's looking good. Thumbs up! I watched the videos on Channel9 with the Great Dane Anders Hejlsberg (ok he lives in the US but I like to think of him as Danish) - godt gaet Anders og co! I really like the syntax in C# where you turn the query around when compared to SQL, so it is like FROM {x} WHERE {y == 1} SELECT {z}. This I understand was done because of IntelliSense, which is great. Now I have learned that the VB.NET implementation is not turned around, it's more like SQL, and I wonder why... Are we gonna lose IntelliSense over this /Klaus Enevoldsen Welcome to the wonderful world of type inference. It even works with generics and anonymous types... ;) ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Mesh, and mesh optimization.
Hello, ID3DXMesh object contains an attribute buffer. It is possible to optimize the mesh with D3DXMESHOPT_ATTRSORT. This would make an attribute related indices and vertices streamed. So it is possible to draw a subset seperatly, However, how does an unoptimized mesh's subset can be drawen seperatly You can set the entire vertex buffer, but how do you pick the correct indices from the index buffer(How does ID3DXMesh picks those indices) Thanks. If you don’t use D3DXMESHOPT_ATTRSORT then you basically get a linear search of the entire attribute buffer. If you do use D3DXMESHOPT_ATTRSORT then things are arranged in a way so a simple lookup table can be used, which is created when s ...Show All
Visual C++ C2440: '=' : cannot convert from 'const char [45]' to 'LPCWSTR'
I am creating a simple Win32 form with a button for File Open dialog. OPENFILENAME ofn; [snip] ofn.lpstrFilter = "Lua Files (*.lua)\0*.lua\0All Files (*.*)\0*.*\0" ; This fails. c:\documents and settings\patrick\my documents\visual studio 2005\projects\craft_gold\craft_gold\craft_gold.cpp(228) : error C2440: '=' : cannot convert from 'const char [45]' to 'LPCWSTR' In a sample application with same headers the function compiles and it works. If I try to create a TCHAR with value "Lua Files (*.lua)\0*.lua\0All Files (*.*)\0*.*\0" , I get the same error. Removing Unicode with #undef UNICODE makes no difference. How can I get this to work Thanks in advance. ...Show All
Visual Studio Communication between tool windows in VS AddIn
Hi There, I'm writing a Vs 2003 add in which suppose to create two tool window. The first one is a search window and the second one suppose to display the searhc results. Is it possible for one tool window to open another one Thanks, Ron Sure. You need to keep a global EnvDTE.Window variable and the first time you call CreateToolWIndow and make it visible. Next times you just make it visible. Toolwindows are not destroyed when you click the "x" button, they are made invisible: if (g_objWindow == null) { g_objWindow = CreateToolWindow(...) } g_objWindow.Visible = True ...Show All
Visual Studio No topics could be found that were relevant to the F1 request
How do I debug this Only happens for VS2005 but works for VS2003. The Flinks.HxK file was changed from: <HelpIndex DTDVersion = "1.0" Name = "F" Id = "FLinks" Merge = "Yes" Sort = "Yes" Title = "Dynamic Help and F1 Index" Visible ="No" LangId ="1033" > </HelpIndex> to: <HelpIndex Name="F" DTDVersion="1.0" Visible="No"> </HelpIndex> More info (specific to documentation built with Sandcastle)... F1 works on simple types but not on their members. It also fails on generic types. E.g.: on the code fragment below, hitting F1 on the yellow highlight ...Show All
SQL Server My SQL is not working!!! My Hair is gone is the topic - FK creation not being called and more
I have 2 problems: 1) When I run this, etch time I keep getting the error saying that constraint isn't found when I try to drop because my creation of the constraint at the end for some reason isn't creating it or being run 2) The first insert doesn't insert anything, although I get no errors ALTER PROCEDURE Categories_I 3) I also get this when trying to run just the first 2 insert statements together Msg 2627, Level 14, State 1, Line 7 Violation of PRIMARY KEY constraint 'Category_PK'. Cannot insert duplicate key in object 'Category' ALTER PROCEDURE [domainname\myaccountname] . [Categories_I] AS BEGIN /* delete contents from Category table and reseed ...Show All
Visual C# How to enable "New Data Breakpoint" in C#.Net
I am using MS team edition of 2005. I have developed a C# Windows application project. When I am running the project in Debug mode and try to set a break point in 'New Data Breakpoint', it is disabled (grayed out) in both the main debug menu and the break points window. Could any one help me how to enable this Thanks in advance. Regards, Santosh. Hi Santosh Do you means you always can't set break point as I often set new breakpoint by click at the left side border of the coed window, could you explain it a little more Best regards! ...Show All
.NET Development Xslt question
I wanted to display the word book in French or English, depending on the selected language. Xml: - < Glossaria xmlns = http://test/Glossaria > - < Translations > - < Translation id =" Book " > < Screen Language =" E " > Book </ Screen > < Screen Language =" F " > Livre </ Screen > < Description Language =" E " > Title for the book section. </ Description > < Description Language =" F " > Titre pour la section de livres. </ Description > </ Translation > </ T ...Show All
.NET Development FileSystemWatcher watcher.NotifyFilter issue
Hi all, I am using the example from the MSDN Library for the FileSystemWatcher class with only a single change watcher.NotifyFilter = (NotifyFilters.LastWrite) ' Or ' NotifyFilters.LastAccess Or _ ' NotifyFilters.FileName Or _ ' NotifyFilters.DirectoryName) that is - I am only watching for changed events...(to text files). My problem is that when opening and saving the file the event is being executed 3 times for no obvious reason. I have read everything about the class notify filters etc. but cannot see anything wrong, can someone help I have disabled Windows Desktop Search/AntiVirus (security department not happy) etc etc etc but still get three executions - all one after the other. Can anyone shed ...Show All
Visual Studio Express Editions Benefits page failing to provide any benefit
I am trying to get to the registration benefits page ( http://go.microsoft.com/fwlink/ LinkId=52054) after registering for VSWE and get this: https://connect.microsoft.com/downloads/downloads.aspx SiteID=40 Page Not Found The content that you requested cannot be found or you do not have permission to view it. If you believe you have reached this page in error, click the Contact Us link at the bottom of the page to report the issue and include this ID in your e-mail: d22b3b84-23f2-45cb-bb2e-a257b654d689 How do I log into the benefits page Thanks CM I have the same problem. I emailed the page and then procceeded to follow all the steps they told me to try. Still is not working. ...Show All
SQL Server Conditional running total question
Hi there, I have a problem with trying to get a total of a conditional value. My data output looks as follows: HEAD OFFICE BRANCH (group1) (Group 2 below) Ford Mustang 2001 Blue Excellent Toyota Raider 2005 Red Good BMW 5.30 i 2006 Blue Excellent Mazda MX5 2003 Yellow Good WESTERN CAPE BRANCH Ford ...Show All
SQL Server Simple AS 2005 migration question (Time Dimensions)
I am updating work done on cubes under AS 2000. In AS 2000 a Datetime field could be linked directly to a Time Dimension from which the levels inside that dimension could be selected. This included being able to break a date into fiscal quarters. It was not necessary to divide up the field containing the full date and time into Day, Week, Months, year columns. In AS 2005 it seems I must break the date up into Day, month, and Year then link these fields to time dimension and specifying whether they are fiscal or calendar. Is there is a way to have the same intelligence as AS 2000 where the date partitioning is done for you without breaking the field up Can someone point me in the right direction Any help appreciated ...Show All
