wolf777's Q&A profile
Software Development for Windows Vista Communication with the underlying transaction manager has failed
Does anyone has any idea I have to resolve this exception: Communication with the underlying transaction manager has failed InnerException "Error HRESULT E_FAIL has been returned from a call to a COM component. (System.Transactions) ------------------------------ Program Location: at System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32 propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier, Guid& transactionIdentifier, OletxTransactionIsolationLevel& isolationLevel, ITransactionShim& transactionShim) at System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[] propagationToken) " I've tried all the solutions from http: ...Show All
Visual C# static method - Is there any workaround?
I think most know we cannot declare a static anything in an interface. However, let's say I have this: public sealed class MyClass { private MyClass(string someText) { m_someModifiedText = someText; } private readonly static m_someModifiedText; public static MyClass Create( string someText ) { string modifiedText= ModifyText(someText); return new MyClass(someText); } private string ModifyText(string someText) { string modifiedText = someText; //do something to modify text return modifiedText; } public static string UsefulText { return m_someModifiedText; } } Now, this "sample" is just to keep it simple, but PLEASE just consider the concept rather than what the ...Show All
Visual C# SQl server authentication issue in C#
Hi Guys, I have a tool written in C# which connects to a remote SQl server 2005. Its working fine while I use "Integrated Security". However, I want to login the database using another credential instead of using the currently credentials associated with the tool. The reason for this was because not all the users using this tool have permission to access the database. So, I need sort of impersonation to allow any user using this tool to connect to the database. Is there any simple and efficnet way to do this Thanks. Thank you very much for you guys suggestions. I have figured it out that the login failure was due to my confusing "windows authentication account" with " ...Show All
SQL Server Remote update having a linked server takes forever to execute
UPDATE CD SET col1 = SR . col1 , col2 = SR . col2 , col3 = SR . col3 , col4 = SR . col4 , col5 = SR . col5 , col6 = SR . col6 , col7 = SR . col7 , col8 = SR . col8 , col9 = SR . col9 , col10 = SR . col10 FROM LNKSQL1 . db1 . DBO . Table1 CD join Table2 USRI on USRI . col00 = CD . col00 join table3 SR on USRI . col00 = SR . col00 Here, I'm trying to tun this from an instance and do a remote update. col00 is a primary key and there is a clustered index that exists on this column. When I run this query, it does a 'select * from tabl1' on the remote server and that table has about 60 million rows. I don't understand why it would do a select *... Also, we migrated to SQL 2005 a week or so back but before that ...Show All
SQL Server Exporting data to a fixed-width flat file
Hi, There's a lot of information on importing data from text files, but not a lot on exporting data to text files... I've checked but found no info on this. I'm trying to export data from SQL Server to a fixed-width flat file and wondering if I'm doing it the right way. I use a view as source (using a OLEDB connection manager) and I can see the data without problem. I defined a Flat File Destination (using a flat file connection manager). When setting up the flat file connection manager, I am asked for a file... Does this mean one should create manually a template file with the desired output format So I used a production file as template since we're replacing an existing process. After having set up everything, I run the SSI ...Show All
SQL Server Dynamically create text file as destination
I am trying to create a text file from an SQL query on a SQL table. I would like the SSIS package to prompt for the file name and path. The text file is tab delimited and the text qualifier is a double quote. Thanks, Fred Couldn't you create a package variable called FilePath (for example) of type string and then read into it through a script task Something like the following would give you an input prompt and then store the value into the variable created: Public Sub Main() Dts.Variables( "FilePath" ).Value = InputBox( "Enter your file path" , "Prompt" ).Trim() Dts.TaskResult = Dts.Results.Success End Sub Then, you could just set the Co ...Show All
Visual Studio 2008 (Pre-release) graying images
Is there a way to "gray" an image easily. Ideally, I would write <Image Source='myimage.jpg> <Image.Effects> <GrayEffect GrayFactor='0.5'/> </lmageEffects> </Image> where the gray factor goes for 0 (original image) to 1 (black and white image) Try using a FormatConvertedBitmap... <Image xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml "> <Image.Source> <FormatConvertedBitmap DestinationFormat="Gray16"> <FormatConvertedBitmap.Source> <BitmapImage UriSource="foo.jpg" /> < ...Show All
Visual Basic Why does my Leave-eventhandler execute twice?
Hello, I have a problem with my Leave-event handler - it fires twice. I have 3 text boxes on my form. The user will put numbers in the text boxes, but the numbers cannot be the same. So when the user jumps to the next text box my Leave-event handler checks if the text box, whixh was left, has a unique number. Below you can see the code - somewhat simplified: Private Sub TextBox_Leave( ByVal sender As Object , ByVal e As System.EventArgs) _ Handles TextBox1.Leave, TextBox2.Leave, TextBox3.Leave Dim CurrentTxtBox As TextBox = sender RemoveHandler CurrentTxtBox.Leave, AddressOf TextBox_Leave ' ...code for testing... CurrentTxtBox.Focus() AddHandler CurrentTxtBox.Leave, AddressOf Tex ...Show All
Visual C++ Winsock 10048 error
I have a stress test application which spawns 100 threads and then communicates through TCP to a server on the same machine. The connection code looks like: bool CSockConnector::Connect( const CInetAddr &Addr, CSockStream &Socket) { Socket.SetSocket(socket(AF_INET, SOCK_STREAM, 0)); if (Socket.GetSocket() == INVALID_SOCKET) { // printf("Cannot create socket: %d\n", WSAGetLastError()); return false ; } if (connect(Socket.GetSocket(), Addr.GetAddr(), Addr.GetSize()) != 0) { printf( "Connection error: %d\n" , WSAGetLastError()); return false ; } return true ; } As one can see the code is pretty clean. However I have the problem that some time ...Show All
Windows Search Technologies highlighting seach terms
Hi, How can i highlight the search terms in the results Thanks, Ariel Ariel, You can see highlighted search terms in email results if you install WDS version 3.0 and are using Microsoft Office 2007. Unfortunately, there currently isn't a good way to see highlighted search terms in all results. On the brightside (no pun intended) we are looking at adding the highlighting fucntionality in later versions of our search technology. Paul Nystrom - MSFT ...Show All
Visual C++ Handling with CListCtrl
Hai, ListCtrl 2 column contains 2 BitmapButtons and 3 column contains 3 BitmapButtons, while scrolling it flickers a lot. so how to handle it. void CGridListCtrl::DisplayItem( int nItem, int nColumn, CDC* dc) { char sBuff[300]; CRect rect; int sLen = CListCtrl::GetItemText(nItem,nColumn,sBuff,300); GetSubItemRect(nItem,nColumn,LVIR_BOUNDS,rect); ROWDATA* rData = (ROWDATA*) GetItemData(nItem); CRect tRect = rect; if (nColumn!=0) { tRect = rect; tRect.right = tRect.left; int nButton = rData[nColumn].nButtonCount; for ( int i=0; i<nButton; i++) { CBitmappedButton* pButton; BUTTONINFO* bInfo = rData[nColumn].pButtons; pButton = bInfo .pBitmapButton; tRect.ri ...Show All
Visual Studio Team System Sharepoint project lost
Hi! One of my projects seems corrupted. In Team Explorer, the Documents folder is emtpty (red cross), And when i try to "Show project Portal", I just get an IE window saying "The Web site that is referenced here is not in the configuration database.". We have a few more projects on the server, and they works just fine. What can have happened Where do I start the investigation Regards, Leif Hi, It sounds like someone deleted the web site. The 'The Web site that is referenced here is not in the configuration database' message indicates that WSS is unaware of the site's existence. Did someone restore the WSS databases to an earlier version The only time TFS will delete a s ...Show All
Windows Forms Treating ToolStripMenuItems and ToolStripButtons as one
Is it possible to somehow store a strongly typed collection of both ToolStripMenuItems AND ToolStripButtons Basically I want to collect all GUI entrypoints to Print/Export To Excel so that I can easily disable/enable them depending on the type of the active MDI child window. Thanks. Hi, Both ToolStripMenuItems and ToolStripButtons derive from a ToolStripItem class so I guess you could make a ToolStripItem generic collection: List < ToolStripItem > toolItems = new List < ToolStripItem >(); toolItems.Add( new ToolStripButton ( "My Button" )); toolItems.Add( new ToolStripMenuItem ( "My Menu Item" )); Andrej ...Show All
Windows Forms The same table 'Item' cannot be the child table in two nested relations.-Error
Hi All, I have some problem to construct xml.let me explain in detail. Using my xml schema to create a dataset. iam using same child node for multiple parents. system shows the above error message when i am using the typed dataset.below is my xsd. < xs:schema xmlns:xs = " http://www.w3.org/2001/XMLSchema " > < xs:element name = " OrdersInventoryData " type = " OrdersInventoryDataType " /> < xs:complexType name = " ItemType " > < xs:sequence > < xs:element name = " id " type = " xs:string " /> < xs:element name = " qty " type = " xs:integer " /> </ xs:sequence > </ xs:complexType > < xs:complexType name = " OrderType " > < xs ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Doing things the XNA way
Initially, I rejected the GameComponent framework in XNA. Becuase much of my low-level logic like collision and physics are compartmentalized outside of the game objects that use them, I couldn't understand how the GameComponent interface would allow me to work in this way. But then I read about how the Game.Services functionality allows you to place the compartmentalized functionality into "globally" accessible list. http://jsedlak.org/node/12 Now I'm refactoring my 2.5D game engine to use the GameComponent framework. I should be done in a few hours. Hopefully the refactoring will go without a hitch (it usually does in C# for some reason). Still, I'm leery of inheriting GameComponent all over the place. Implementatio ...Show All
