Bhavitavya B's Q&A profile
Visual C++ BUG? auto_ptr assignment crash in VS2005
I've just experienced a crash with VS2005 with the following: #include <memory> class Foo { public: Foo* MakeFoo() {return new Foo(*this); } }; void TestCrash() { Foo f; { // either of the next lines crashes std::auto_ptr<Foo> fooPtr1=NULL; std::auto_ptr<Foo> fooPtr2=f.MakeFoo(); } } This same sample doesn't compile on VS2003 as there is no assignment operator for auto_ptr. Changing these lines to use the constructor form: auto_ptr<Foo> fooPtr1(Null) fixes the problem. It seems that auto_ptr is using the wrong constructor -- it's implicitly casting to an auto_ptr_ref type. Is this a known issue What makes you believe that Did you ever look at the operator auto_ptr_ref() ...Show All
SQL Server Expression
Hi, In RunningValue expression, can we able to put the DataSet name. Thanks Hi, Hammer, Can you look at the following problem.In this case what i have to use in the Runningvalue. Hi, In my report, i have 3 tables joined together.My requirement is the fllowing table Age male Female Total Cumulativetotal 1 40 10 50 50 2 20 5 25 75 .. .. total children 60 15 75 75 20 5 20 25 100 30 10 10 20 120 Total adults 15 30 45 45 Unknown age 5 5 10 130 Total 80 50 130 130 ...Show All
.NET Development XML socket problem? (C#)
Hi all, I tired create a XML Socket with using c#. My problem is display Exception : System.IO.IOException: Unable to read data from the transport connection: WSACancelBlockingCall ---> System.Net.Sockets.SocketException: WSACancelBlockingCall with my receive Function. Whether because my server is java I sure i can connect server, server and client is using the same port. I guess it is because time out How to fix the problem. Below is my codeing. Please somebody help me. codeing NetworkStream ns; StreamReader sr; TcpClient clientsocket; bool connected; Thread receive; string serveraddress = "127.0.0.1"; int serverport = 4002; private void Connect() { socketConnection(); if (connected) { receive = new Thread(new ThreadStart( r ...Show All
Visual Studio Change Order of Methods / Properties / Fields / Events
Hi all - Five minutes into my first use of Class Designer and I can't figure out something as simple as changing the order of diagram items... I've tried changing the order in the source code, but that doesn't seem to have any affect on the diagram. Any suggestions Thanks ~ jp I'm seeing now that it sorts them alphabetically and I can't seem to find an option to disable this, allowing absolute positioning. Good stuff... ...Show All
Visual C# how to give online updations for My own software?
I have done one desktop application in visual c#, i want to give online updations for that software . i need full flow and coding for this. there are multiple ways of doing what you are asking but no doubt ciickonce would be the most appropriate way of updating your application. I have done previously (this was for .NET 1.1) a webservice which checks for updates on the server based on what my client application has sent in terms of details for itself, so when the webservice looks at the details sent from the client, it will then try to go through the files on the server to find an update for the client software, if there is one then it will send it down the wire to them, the client then accepts this and writes data to disk and no ...Show All
Visual Basic Show and hide a form
I have a form (frmResults) that shows a list of results for a name search. I would like to keep it open but hidden after the user selects a record to view, which opens another form (frmMain) and hides itself. The frmResults' Load event fills a table adapter based on parms passed to the form (first and last name). I have a button on frmMain that returns to frmResults using My.Forms.frmResults.Show and Me.Close. Problem: when I try to return to frmResults I get this unhandled exception: "Object reference not set to an instance of an object." It happens on the line where the table adapter is filled. Is there an easy fix for this or do I have to pass the name search criteria around to get the results to show again T ...Show All
SQL Server Convert Milliseconds to HH:MM:SS
I am writing a report that Queries a SQL DB using 'SQL Server Business Intelligence Development Studio'. I have a field in the DB called duration and it is in milliseconds. I am trying to find an easy way to convert the format from Milliseconds to HH:MM:SS. Nearest I can get is the following for the field: =Int(((Fields!DURATION.Value/1000) / 60) / 60) & ":" & Int(((((Fields!DURATION.Value/1000) / 60) / 60) - Int(((Fields!DURATION.Value/1000) / 60) / 60)) * 60) The output is in HH:MM. One issue with this is if the MM is say :03, it prints as :3. I lose the leading 0 so 9:03 (9hrs and 3 minutes) prints as 9:3. Where as 9:30 (9 hrs and 30 minutes) prints as 9:30 as it should. Is there an easier way to do thi ...Show All
SQL Server Current Security Context Not Trusted When Using Linked Server From SAP
Hello, I am experiencing a head-scratcher of a problem when trying to use a Linked Server connection to query a remote SQL Server database from our SAP R/3 system. We have had this working just fine for some time, but after migrating to new hardware and upgrading OS, DBMS, and R/3, now we are running into problems. The target database is a named instance on SQL Server 2000 SP3, Windows 2000 Server. The original source R/3 system was also on SQL Server 2000 (SP4), Windows 2000 Server. I had been using a Linked Server defined via SQL Enterprise Manager (actually defined when the source was on SQL Server 7), which called an alias defined with the Client Network Utility that pointed to the remote named instance. This alias and Linked Server wo ...Show All
Visual Basic Databinding BusinessObjects
When I do my Databinding on my form I have an object called _tracking that has the values HowMuchWasPaid and DateOfPayment...But when i step though the code the values that are being assigned are the default values in my business object (_Tracking) how do I make this way work Me .txtPaidAmount.DataBindings.Add( "Text" , _Tracking, "HowMuchWasPaid" ) Me .dtpDateOfPayment.DataBindings.Add( "Value" , _Tracking, "DateOfPayment" ) When i do it this way it works fine Public Sub LoadObjectToForm() _Tracking.HowMuchWasPaid = txtPaidAmount.Text _Tracking.DateOfPayment = dtpDateOfPayment.Value End Sub I Want to use the DataBindings though....any help on what i should do ...Show All
Audio and Video Development iHD Simulator doesn't display video post-Windows Media Format SDK Install
After I installed the Windows Media Format SDK (9.5) for Windows Media Encoder 9, I noticed the iHD Simulator won't display video any more. The menus appear fine as normal but the background footage is completely black. The footage plays fine in WMP11. Any ideas Suggestion is to try the WMP 11 SDK: http://msdn.microsoft.com/windowsmedia/downloads/default.aspx Also, try using graphedit to play the video; that shares more code in common with iHDSim than WMP does. ...Show All
SQL Server SQL comparison
Hi there! can anyone help me out I need to compare a date from the database and the system date which will be coded in a store procedure in SQL... HELP!!!!! You may like to reconsider the answer given by Ali. DateTimes in NET are stored to a precision of 100 ns or 0.0000001 seconds whilst those stored by SQL Server in the SQL Server datatype DateTime are stored to the nearest 0.003333 seconds. Therefore you should not use a simple equality operator to compare them. Instead you should compare them based on the lowest precision argument, ie round the NET DateTime to the nearest 0.00333 seconds and then compare them. Regards, John Whattam. ...Show All
Smart Device Development TextAlign in TextBox
I have found some issue in the textbox,after i install the VS 2005 sevice pack 1 and NETCF 2 Service pack 1. The texAlign only show "Left" . Please help out! Maybe it is the same behavior as in VS 2003. There you have first to enable the Multiline property to align the text. Hope this works also in VS 2005. ...Show All
Windows Forms A real challenge!
I have a real challenge. My software is basic a front-end for a database that I created in SQL 2005. That’s the challenge: I don’t want to use the "BindingNavigator", instead of this I want to put the code myself to go to next record, first, etc, in the new icons that I created. But this is not all. Here is the biggest difficult. I have "TabControls" too. So when I click, for examle, next record, the application need to show me the next record, not only in the form, but in the TabControl in the same form and at the same time Did I explained clearly Thanks for those how at least will read this. Hello OmegaMan, Your help was very interesting, but those links you sended to me don’t answ ...Show All
Smart Device Development Control IR Port LED Directly
I'm looking for a way to turn the IR port LED on and off directly. I can do this indirectly by initiating an IRDA request, but I need finer control than that. Thanks for any tips. Hi, This forum is primarily monitored by Visual Studio for devices group. Please check this link for more appropriate forum for this type of queries. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=286724&SiteID=1 Thanks Srikanth Bogadapati. ...Show All
SQL Server how to call web service from within Script Component ?
Appreciate if anyone can show me the code to call a web service from Script Component I cannot use the Web Service Task. Because parameters to the webservice are from rows of data inside Data Flow Task. Thanks !! mf915 wrote: Appreciate if anyone can show me the code to call a web service from Script Component I cannot use the Web Service Task. Because parameters to the webservice are from rows of data inside Data Flow Task. Thanks !! Hi there, If you buy Donald Farmer's book ( http://www.amazon.com/Rational-Guide-Extending-Script-Guides/dp/1932577254/sr=8-1/qid=1171045629/ref=pd_bbs_sr_1/102-7891523-4086513 ie=UTF8&s=books )  ...Show All
