dimx's Q&A profile
.NET Development Strange behavior of TransactionScope in some special cases
Hi, Recently I’ve encountered a case when TransactionScope behaves in a way that I can’t understand. See code fragment below: public static void TestNotCompletedNestedScope() { using ( TransactionScope ts1 = new TransactionScope ()) { using ( SqlConnection cnn = new SqlConnection (connectionString)) { cnn.Open(); RunSomeSqlCommand(cnn); using ( TransactionScope ts2 = new TransactionScope ()) { RunSomeSqlCommand(cnn); //ts2.Complete(); } RunSomeSqlCommand(cnn); } //ts1.Complete(); } } public static void RunSomeSqlCommand( SqlConnection cnn) ...Show All
Visual C++ how to link microphone(hardware) with C++ programing?
i'm doing voice recognition using C++ programming And i have a problem with the linking the microphone to my program code to record a sound Can anyone help me thanks.... do u mean this code SpeechRecognizer . GetAudioInputs( [ RequiredAttributes As String = ""], [ OptionalAttributes As String = ""] ) As ISpeechObjectTokens but its look like for VB only. how about the C++ code is it this code also can use in C++ ...Show All
SQL Server How do I schedule JOB in sql 2005
Can anyone please help me for scheduling JOB in sql 2005. Thanks in advance. Raviraj you could emulate the agent by writing a batch script that calls some sql commands using sqlcmd , then use windows "scheduled tasks" to give it a daily job... though scheduled tasks isnt super reliable IMO it can pretty much get the job done ...Show All
Visual Studio Express Editions how do i set gradient backcolor on form
hi i'm new to programming. how can i set the forms backcolor to a gradient color. example blue on the top and white on the bottom. Thanks this would come from overriding the On/Background/Paint event. Since this is my first time doing something like this....try this: Protected overrides sub OnPaint(ByVal e as PaintEventArgs) Dim theBackground as System.Drawing.Drawing2D.LinearGradientBrush theBackground = new System.Drawing.Drawing2D.LinearGradientBrush(new Point(0, 0), new point(ClientSize.Width, 0), Color.Blue, Color.White) e.Graphics.FillRectangle(theBackground, ClientRectangle) end sub ...Show All
SQL Server Error: 7886, Severity: 20, State: 1.
Hi All I am seeing this error being logged in my SQL 2005 Ent machine A read operation on a large object failed while sending data to the client. A common cause for this is if the application is running in READ UNCOMMITTED isolation level. This connection will be terminated . It seems to be arising out of a read of a text column. Any info on this will be appreciated. Thanks K T Ah, you use 'nolock' hint. There are issues with using such hint. I suggest you take a look at the following KB. http://search.support.microsoft.com/kb/235880 ...Show All
Windows Forms Position of a treeview?
Does anyone know if it is possible to get the position of a treenode Mikael if tn is the current node in the treeview, then you can get the path to it from the root like this Dim str As String While Not (tn Is Nothing ) str = tn.Name & "\" & str tn = tn.Parent End While MessageBox.Show(str) Is it what you were looking for ...Show All
Software Development for Windows Vista Error: The calling thread cannot access the object because different thread owns it
I have declared a listbox as follows: internal System.Windows.Controls. ListBox ListBox; Then I have initialized a workflow: public void InitializeGetMyPhotosNotInSetWorkflow( string extras, string extrasValue, string perPage, string perPageValue, string page, string PageValue) { parameters.Add(extras, extrasValue); parameters.Add(perPage, perPageValue); parameters.Add(page, PageValue); try { if (( this .workflowRuntime = new WorkflowRuntime ()) == null ) { throw new System. Exception ( "There was a problem creating the workflow runtime.\nThe Application will now exit." ); } else { // Add the External Data Exchange Service ExternalDataExchangeSe ...Show All
Visual C# Retreive the Song information while playing the song?
I have developed an app that plays music. But, unlike WMP, the song information is missing from the UI. Is it possible to open the file, play it, and at the same time, retreive the Song Title, Artist, Bitrate, etc Thanks, ...Show All
SQL Server Stocked Procedu what is the group of the user currently executing the stocked procedure
Hi everyone, I'm looking for a way to know, from within a stocked procedure, which user is executing it, and if he belongs to a given group. Details: I'm writing a web application which is going to show document links to users. What links you see depends on what groups you belong to. Each document will have a group for read access, and another group for write access. My goal is to show only those documents you can read, and allow you to modify those you can write. Is there a function which tells if the current user belongs to a given group (for instance a group called "read_accounting_reports". The name of the group is going to be stocked on a field, in the same row as the document. I guess I could just lo ...Show All
Windows Forms access control given its name as a String
I have a text file containing in every line the name of a control and the values of some of its properties. I want to create a method which reads the file gets the name of the control and the value of the property and sets it. How can I do this Some day, one of the significant discoveries you'll make when working with Visual Studio is to find the "Show All Files" icon in the Solution Explorer window. Click it today. You'll find that there are mysterious (but interesting) files being created by the IDE. It takes a while to make sense of what they do and how they behave when you use the IDE. Once you get there, I think you'll find that what you're looking for in this thread is something that is al ...Show All
.NET Development Obtaining Computer Description
How would one go about obtaining the computer's network description I hope to also be able to retrieve it remotely, but if it can be only done locally then i can make a workaround and deal with it. Com had IADsADSystemInfo which would give the info on a Win 2K system...otherwise I can't find it within the .Net framework. The other option would be to find the specific registry setting and read it from there. Good luck. ...Show All
Visual Studio Express Editions MessageBox Issue
Hey, Still pluggin away here and learnin.....New question/error. When I attempt to use MessageBox.Show I get the following error: Error 1 'Show' is not a member of 'MessageBox'. I understand that it should work like: Result = MessageBox.Show(Message, Caption, Buttons) But it is not....Is this an Issue in VB Express How do I solve this Thanks in advance LDavis501 Tall Dude....Thanks for the response. I am a bit perturbed by the Option Strict ON. I understand its function and what it does and why, but what I do not get is in the following code I get an Option Strict Error: Code: Public Class Form1 Private Sub btnClose_Click( ByVal sender As System.O ...Show All
Visual Studio Team System Problem Sending Emails
Here is the error message from the event log. The strange thing is, if I restart the machine it will send all the email int he queue once the machine restarts but then gives this email if you attempt to send any others. The ability to send through the email relay from this machine has been verified. Any help would be appreciated. Event Type: Warning Event Source: TFS Services Event Category: None Event ID: 6011 Date: 7/14/2006 Time: 8:47:59 AM User: N/A Computer: SPOBMIBO01 Description: TF53010: An unexpected condition has occurred in a Team Foundation component. The information contained here should be made available to your site administrative staff. Technical Information (for the administrative staff): Date (UTC): 7/14/2006 1:47:59 P ...Show All
.NET Development question about decryption!!
How can one decrypt an encrypted text if one dont know the key but he knows the algorithm of encryption and lenght of key ...Show All
Windows Live Developer Forums Transparency
I tried to overlay transparent gif tiles over the map and they don't render transparent. They render white. Has anyone tried to put transparent gifs over the map There's an offered solution on this thread. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=804699&SiteID=1 ...Show All
