jsale_endeavor's Q&A profile
Visual C++ How to watch a static variable of method in debugger?
I noticed today that I am unable to view the value of a static variable declared in a method in the VC++ 2005 debugger. I cannot view the variable both in the watch window and in the mouse over tooltip. Also in my project, this seems to affect other non static variable declared in a scope block in the same method. (stupid) Example: int addsub10(bool add, int val) { static int callcount = false; <-- cannot see in watch/mouseover callcount ++; if(add) { int foo = val + 10; <-- cannot see in watch/mouseover return foo; } else { int bar = val - 10; <-- cannot see in watch/mouseover return bar; } } If I remove 'static' from the first line of addsub10 then I can see the values of callcount, foo and ...Show All
Visual Basic adding handler to a button generated at runtime
everytime I try to add this code: AddHandler btnLogin.Click, AddressOf mybutton_click it gives me the following error: name 'mybuttom_click' is not declared. Here is the code that I am using to create the button: Imports System.Drawing Module formsLogin Public Function loginForm() Dim btnLogin As New Button With btnLogin .Location = New Point(55, 75) .Text = "Login" .TabIndex = 3 End With Dim btnCancel As New Button With btnCancel .Location = New Point(175, 75) .Text = "Cancel" .TabIndex = 4 End With D ...Show All
.NET Development SqlDataReader.Close or .Dispose results in Timeout Expired exception
Hi everyone, I have a project in VB 2005 that uses a data access layer (custom dev) to open and return SqlDataReaders. There is one method in my project where the call to SqlDataReader.Close() or SqlDataReader.Dispose results in a timeout exception. The code roughly looks like this Dim dr As IDataReader = Nothing Try dr = <call to data access layer> If (Not dr Is Nothing) Then Do While (dr.Read() AndAlso ...) ' Code here to read a string field from the datareader Loop End If Finally If (dr IsNot Nothing) Then dr.Dispose() End If End Try The code fails on the dr. Dispose line. Replacing with dr.Close() results in the same exception. The Data Access Layer looks like this: ...Show All
Visual C# can any body help me in reversing strings
this fuction help me to convert the arabic words to hexa .. and it doing the job 90% because it convert it in reverse this means that the true hexa for example is (062F0645) but the function returns it like this (0645062F) and this makes each word come in reverse order for example ... I love you becomes uoy evol I how can fix that public string ArabicHex( byte [] b) { string temp,s="",h=""; int i=0; while ((i <= b.GetUpperBound(0))) { temp= "00"+b .ToString("x2"); h = temp.Substring(temp.Length-2); if (h == "000D") { h = ""; } s = h + s; i += 1; } return s; } thanks in advance ...Show All
.NET Development A problem in restarting the service of MSSQLSERVER
I had the following problem in my application. I need to Restart MSSQLServer service before do the connection test. In some cases, I have to Restart the MSSQLSERVICE again after connection test. In the old version of MSDE2000, no problem occured at all. But in MSDE2000 SP3a, I got the following error when restart the MSSQLSERVICE for a 2nd time. But if I run the test program so as to execute RESTART and CONNECTIONTEST in pair each time, no error occured. Can somebody give some advice to avoid this problem Thank you! The error log says : 2007-01-11 10:30:26.45 server Using 'SSNETLIB.DLL' version '8.0.766'. 2007-01-11 10:30:26.46 spid5 Starting up database 'model'. 2007-01-11 10:30:26.51 server SQL server listening on ...Show All
Software Development for Windows Vista CoImpersonateClient() across Integrity Levels
Hello all, I have an app that runs elevated that talks to an unelevated app via COM. I want the COM servers in the unelevated app to be able to impersonate the elevated client to perform certain file operations with full admin rights. Whatever CoInitializeSecurity() parameters I have been trying to apply on the client does not give the server appropriate rights ending with ERROR_BAD_IMPERSONATION_LEVEL error when it tries to work with a file after CoImpersonateClient() call. I can foresee that something like a Mandatory Label SACL needs to be applied to the client, but I cannot find any documentation in that regard. Anyone has any ideas Thanx in advance, AlexC That's probably because you're getting an Ide ...Show All
Visual Studio TextDecorators in SwimLaneShapes
After modifying my dsl-definition I get an error transforming my templates. I can get rid of the error by deleting the TextDecorator on my SwimLaneShape, adding the decorator reproduces the error. After playing around with a new model, adding a DomainClass, DomainProperty, SwimLaneShape and TextDecorator I get this same error once I wired the TextDecorator to point at the DomainProperty on DomainClass. Does anyone have a clue on what might have caused this error and how to get rid of it TIA Error looks like: Error 1 Running transformation: System.InvalidOperationException: Domain relationship specified domain role belongs to doesn't match the type of link requested. at Microsoft.VisualStudio.Modeling.RolePlayerLinksCollection.GetLinks ...Show All
SQL Server SQL Server 2005 Business Intelligence Development Studio Not installed with Reporting Services
I have SQL 2005 reporting services installed and running, however I do not have the BI dev studio installed and cannot figure out how to get it installed. The report server is operating correctly since I have developed reports on another pc using VS 2005 and uploaded them to the server. How do I get the BI dev studio installed on the server The SQL Server Business Intelligence Development Studio is installed as part of the SQL Server Tools installation. If you did not install Tools along with SQL Server Reporting Services, re-run Setup.exe from your intallation media. One thing I should call out.. if you had installed SQL Express Edition prior to installing SQL Server 2005, you will need to uninstall SQL Server Tools as inst ...Show All
SQL Server Error calling CreateReportHistorySnapshot method.
Hello, I am getting an error when calling the CreateReportHistorySnapshot method from a custom assembly. The error is: Response is not well-formed XML. The data source is an XML file which is updated by the custom assembly before the call into the CreateReportHistorySnapshot method. Has anyone seen this problem before or have any suggestions The Data Source XML is well-formed by the way... :-0) The user that is running the createsnapshot method needs to be set as the DB Owner within SQL, this fixed the same problem i was having with this a couple of months ago. It is often the case with many of these areas, subcriptions is another area where db admin comes into play. If you hear o ...Show All
SQL Server help needed to drop a table!!!
hi, can any one tell me how to drop a table...i tried to delete using the command : drop table sample; but it displays an error stating that, Cannot drop the table 'dbo.sample', because it does not exist or you do not have permission. pls post the reply asap -Sweety sweet_salt wrote: hi, can any one tell me how to drop a table...i tried to delete using the command : drop table sample; but it displays an error stating that, Cannot drop the table 'dbo.sample', because it does not exist or you do not have permission. pls post the reply asap -Sweety Check that the account that you are using to run this query has the appropriate permission to do so. Check ...Show All
SQL Server tfs database
I have a VMWare Image that runs SQL Server 2005. This Image was running on two developer machines (M1 and M2) and each was updated locally. The .MDF and .LDF files in the DATA folder of one machine (M1) were copied to tape when the SQL Server services were shut down (they were not IN USE, but the files were not DETACHED or backed up from within SQL server). I want to now use these files to setup a replica on M2. Simply copying the .MDF and LDF does not work (SQL SERVER Service refuses to start) Any how (and if) it can be done it worked..; 1. detached all existing databases (all related to tfs only and not master etc) 2. took them offline 3. attached the new database fil ...Show All
Visual Basic Change F4 key function in DateTimePickers and Comboboxes
When the DateTimePicker is the active control on a form, pressing the F4 key opens the calendar. Is there possibility to change this keys to F12 its a hack but it works Private Sub DateTimePicker2_KeyDown ( ByVal sender As Object , ByVal e As System . Windows . Forms . KeyEventArgs ) Handles DateTimePicker2 . KeyDown Static f12 As Boolean If e . KeyCode = Keys . F12 Then SendKeys . Send ( "{F4}" ) f12 = True ElseIf e . KeyCode = Keys . F4 And ( Not f12 ) Then e . Handled = True f12 = False ElseIf e . KeyCode = Keys . F4 And f12 Then f12 = False End If End Sub ...Show All
Windows Live Developer Forums i use the following function to load virtual earth map, I wonder that after I load the map like this, can I change the map's
i use the following function to load virtual earth map, I wonder that after I load the map like this, can I change the map's postion after this function GetMap() { map = new VEMap('myMap'); map.LoadMap(new VELatLong(37.41, -122.00), 10 ,'h' ,false); } } i appreciate your help Hi Jakein! You can manipulate the map position using this function function PanMap(x,y,latlong) { if (x!=null & y!=null) { map.Pan(x,y); } else if (latlong!=null) { map.PanToLatLong(latlong); } } Then... PanMap(null,null,new VELatLong('YourLat','YourLon')); []'s ...Show All
Visual C# RichTextBox format to SQL
Why can't i add this row into SQL from a C# application, i also tried to do it in mysql query browser and it went perfectly. I supose that i have problems with the "\r\n" part and i don't what to do now. I know that \r\n means next line, but i can't undestand why it will work from mysql query browser and not from the application. this is the INSERT command "INSERT INTO `Problem` ( `Problem` ) VALUES('{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1053{\\fonttbl{\\f0\\fnil\\fcharset0 Microsoft Sans Serif;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs17 Testring writing text.\\par\r\n}\r\n\0')" >>I allready tried with .Replace(@"\", @"\\") but for some reason it wount ta ...Show All
Visual Basic VS renames the html name attribute.
I have an application (using Paypal) that requires the name attribute in an html input tag to remain as I set it. I have move than one input that requires the same name, but I but has a different ID so visual studio can assign a value. The problem is when I set the tag to "run at server" VS reassigns the name attribute to match the ID attribute, even when I specifically reset the name attribute in the code. Can anything be done to stop VS from changing the name attribute ADAC, You might ought to try posting this at http://forums.asp.net -- the issue you're running into is not driven from the VB IDE, and they'd be better able to answer your questions there. --Matt--* ...Show All
