Huseyin Akturk's Q&A profile
.NET Development Cancelling an OdbcCommand in a backgroundworker
Hi, I'm trying to make OdbcCommands running in the background interruptible from a UI button. According to the documentation the OdbcCommand.Cancel() method does just that but the problem is how to invoke it, since it can only be called from the thread the command is running on and that by definition this thread is busy running the command. I tried outside a backgroundworker, using the example code supplied by MS : public void CreateMyOdbcCommand(string mySelectQuery, string myConnectionString) { OdbcConnection myConnection = new OdbcConnection(myConnectionString); OdbcCommand myCommand = new OdbcCommand(mySelectQuery, myConnection); myCommand.Connection.Open(); myCommand.ExecuteReader(); myCommand.Cancel(); } and it doesn ...Show All
Software Development for Windows Vista StateMachineTrackingService Missing
Hi I have tried in vain to get an instance of the StateMachineTrackingService using Beta 2. I have all the required namespaces but can unfortunately not get StateMachineTrackingService. Can someone tell me what I'm missing I can run some of the examples that use it. Please HELP I'm not sure exactly what you are trying to do here, but here are some ideas: 1) look at the ordering state machine which has examples in it for using the StateMachineWorkflowInstance class to view information on the workflow. 2) There are some bugs in this class in the Feb CTP. Try upgrading to beta 2.2 and see if that fixes them for you. 3) post your specific problem you are having and people will likely be more a ...Show All
SQL Server Filtering in Report Builder
Hope someone can shed some light on this. In our report model sales are linked per account number. Accounts are then rolled up to a facility. Each account has fields that contain numeric values that can be summed to a subtotal per facility. So for example if a facility contains two accounts and each account has 3 images then the total image count for the facility is 6. What we are trying to do is filter based on the total image count for a facility. ie only give us facilities where the total image count > 50 . In report builder if we pull in Facility and Total_Image_Count then set the filter it works as expected. Those facilities where the total doesn't meet the criterial are excluded. However if we include account numbers in t ...Show All
Software Development for Windows Vista XPS -> PDF
Anyone know of commercial products that will convert from XPS to PDF Is it still too early to ask this question That is good information. I'll watch for a beta version. In a year I expect several products to handle this conversion, but XPS might still be too new. ...Show All
SQL Server Conditional Order by?
Is there a way to do a conditional order by so that a user can give a parameter to a stored proc and it give back results sorted the way they want I want it so that the user can do 1 of 4 things, * sort by "title" ascending, * sort by "title" descending, * sort by "synopsis" ascending, * sort by "synopsis" descending Can it be done This is what I have but I get a syntax error: select * from Blah Order By Case when @orderId = 1 then title asc when @orderId = 2 then title desc when @orderId = 3 then synopsis asc when @orderId = 4 then synopsis desc end Any help is greatly appreciated! Thanks both for the replies, I didnt know it would be so detailed, I have ...Show All
Visual C# Hashtable get key for a specified value efficiently
Hi all, I may have got the subject wrong, so I appologize if it's not clear. I have an application in which I have to translate keys to values and vice versa. The current most efficient solution I see for this problem is to keep 2 Dictionary objects so I can translate both ways (it's no more than 1000 strings, so it's not very expensive in memory consumption), since I don't want to iterate over the Dictionary every time I make a translation. Is there a better way to do this In Java, we hold 2 Map objects for that, and I wanted to know if the .net has a better implementation. Thanks. Two dictionaries are the most efficient way in .NET and considering that you're using strings the memory overhead won't be too bad. How ...Show All
Visual Studio Tools for Office COM Shim Addin not working in Outlook with Application Verifier
I've created a managed extension addin for Outlook in C#, and then used the COM Shim Wizard to create the unmanaged shim. I registered the dlls, and the addin loads in Outlook fine. The problem is that when I run Outlook using the Application Verifier tool (with the "Basics" options enabled), I get a first chance exception (see stack trace dump) Both the managed extension Addin and the COM Shim were created from the VS Wizards and compiled, with no code modification. Does anyone know about this problem, and its posible solution/workaround From Application Verifier Log: < xml version="1.0" encoding="UTF-8" standalone="no" > <avrf:logfile xmlns:avrf="Application Verifier"> &l ...Show All
.NET Development SmtpClient.Send() problem results in "An established connection was aborted by the software in your host machine"
Hi, I'm having problems with SmtpClient.Send() where I end with an "An established connection was aborted by the software in your host machine" type error. My infrastructure people tell me that I should have access to the Smtp server so things should just work. I've been googling and searching forums but have yet to see a complete answer to what this error is trying to tell me. Oh and I've tried this in both a Web and a WinForm app on .Net framework 2.0 running on a clean install of XP Pro. Any opinions Thanks Scott. This is the code (massaged for security): protected void SendEmail() { MailAddress addressFrom = new MailAddress("sender@domain.com"); MailAddress addressTo = new MailAddress("recipient@domai ...Show All
Visual Studio HTML parser from Visual Studio 2005
Hi everyone out there! I'm writing a VSIP package using December SDK 4.0 CTP and I'd like to know if it is possible to access Visual Studio HTML parsing services (get the AST it obtains, get the compiler warning it generates, etc). TIA, Alan I don't think so. You can get the MSHtml as described in: HOWTO: Getting IDesignerHost and IHTMLDocument of WebForms from a Visual Studio .NET add-in http://www.mztools.com/articles/2005/MZ004.htm but that's all. Maybe someone from Microsoft can comment if Orcas will ease the support for Web/HTML forms through automation... ...Show All
SQL Server package and file location dependencies on deployment
My parent package calls packages stored in the file system. While developing, I would like to call packages in the project bin directory. In production, I would like to call packages in a different development. Is this possible I can change the package connection string with an expression that refers to user variables PackageLocation1 or PackageLocation2. I would like to do this automatically. Is this something that should be done at deployment time Or is there a run time value that I can check and conditionally use PackageLocation1 or PackageLocation2 Development and deployment is done on the same server, so the same enivronment variable value would be used in an indirect configuration. Same thing applies to a file configuration. ...Show All
SQL Server full uninstall of MSSQL 2005 Ent SP1
Hi, I am facing a serious problem with the unproper uninstall. I have installed MSSQL 2005 Enterprise and created an Active Directory at the server. I have removed the AD and wanted to uninstall SQL 2005. I was not able to uninstall it fully. I have reinstalled it several times, just to tryying to remove the registry entries. Is there a solution / tool or a document describing, how I can fully manually remove MS SQL 2005 from a server I have already installed SP1. Dejan Hi, after uninstall, I noticed on many places that registry entries have not been removed (several hundred places). I do not have a complete list (too many entries). After uninstall, I try to install MSS ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Tiled and linear texture memory formats
Hello, Digging the ResourceUsage Enumeration, noticed the flags "Linear" and "Tiled" for texture creation. I see that memory formats should be quite transparent in API for developers, but I cant really find exact docs on those two texture memory formats. Am I doing wrong search In practice you almost certainly don't care about the difference between the two flags. If you don't specify either, XNA will automatically choose a sensible memory layout based on the type of texture you are creating. We included those flags because we weren't quite 100% sure our automatic algorithm would always do the right thing, but I'm about 99% sure. It's one of those things where if you ever did run into a ...Show All
Visual C++ Accessing Data In An Already Loaded DLL
I asked a similar question a couple of days ago in the C# forum, but my question is revised now and concerns C++, since I'm pretty sure it can't be done in C#. Here is the scenario that I'm dealing with. I have ProgramA.exe on my computer that loads up LibraryA.dll when it starts. There are some classes and methods in LibraryA that ProgramA uses that I would like access to. For example, there's a class called ClassTest with a method called MethodTest() that returns a variable that pertains to some data in ProgramA. If I just load the DLL, I think it creates a separate data space for the program I'm using to access it, so I can't read ProgramA's data with the exported methods of LibraryA. I tried writing a DLL and injecting it into ProgramA ...Show All
SQL Server Checkbox
Hi, In the reports tollbox there is no Checkbox control,In my report i want to add the checkboc control,How to add checkboc control to the toolbox. Please help me. Thanks in advance Hi, Thank you very much for your reply.I want to display available columns to the users,so he can select the columns he want,we have to display those selected columns in the report body.thatswhy i want to display avalable columns to user.Without checkbox how to achieve this. Thanks inadvance ...Show All
Visual Studio 2008 (Pre-release) Using the client proxy
Hi, I have a created a service which I expose using a netTcpBinding endpoint. On the client side when I create an instance of the proxy, is it ok to maintain a reference to that instance for the lifetime of the client application Or should i use the proxy once, purge the reference and then instantiate it again when I need to use it Thanks in advance. Vikram Hi Vikram, I have a MS Office development application for Excel Worksheet. I have implemented an XLL for Excel Add-in using VS 2005 C++ managed code. As usual, functions which are registered and exposed to Excel are in the table. That xll is working. It takes parameters from Excel and calculates and the result is returned to the ...Show All
