SanthaMind's Q&A profile
Windows Forms add 2 DataTables into 1 DataGrid
hi, I have 2 dataadapters that fills 2 datatables i want to show them both in 1 datagrid How do i do it I think detail steps to combine two tables depend on the logic how you want to combine them. If you just want to create a new table with all columns in those original two tables, use following code for example DataTable dt = new DataTable(); foreach (DataColumn column in northwindDataSet.Customers.Columns) dt.Columns.Add( new DataColumn(column.ColumnName,column.DataType,column.Expression)); foreach (DataColumn column in northwindDataSet.Employees.Columns) { if (dt.Columns.Contains(column.ColumnName)) continue ; dt.Columns.Add( new DataColum ...Show All
Visual C++ need help with vC++ 2005
Can somebody tell me how to run programs made with MV C++ 2005 cuz when I try to fing out how to run the Hello world code thing I cant find a run program putton or anything. Note: Im a 15 year old trying to learn C++ and maybe C# so try to keep the anwser simple please C++ is not simple. If you must have something simple then start with something else. I don't want to discourage you from learning C++. I has been frustrating for me that my nephew would not learn it. He is now in college and wants to be a rocket scientist but his interest in programming has been limited. It is exciting when people your age pursue C++. I mainly want to say that I hope you don't always have to have a simple answer, because you will soon enc ...Show All
Visual C# On pressing F10 or F11 debugging is ending
Hi, I am using VS 2005 with SP1 , C# In my solution , i put a break point and it is getting hit. But, when i press F10 or F11 unable to continue further, just ending the debug with error : The program '[5892] AdminLoader.exe: Managed' has exited with code -532459699 (0xe0434f4d). I tried looking at all settings and dignostic attributes but everything is fine. Any Ideas kumar I am not getting any stack overflow neither any exception. Application is working fine, i just want to debug to put extra code for enhancement. I even created test app in my manchine , debug is working perfect in that project. No unmanaged code is written in the class which i am trying to debug. My application i ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Code4Fun Framework Timer compile issue
Hi, I am attempting to make use of the QueryPerformanceCounter timer, as detailed in the Coding4FunTutorial. After following the steps, add a new folder, copy the dxmutmisc.cs file to the project. I get 133 errors most saying "The type or namespace name DirectX does not exist in the namespace Microsoft( are you missing an assembly reference )" ANy direction would be appreciated. Thanks Jeff You need to add DirectX references to your project. Do this by going into the project explorer/solution explorer window, find "references", right-clicking it and selecting "add references". Then select all DirectX assemblies that you need. -Niko ...Show All
Visual Basic C# to vb .net (2005) help
help me to convert the following c# code in vb .net (2.0) do { while (bl_counts[--incrBitLen] == 0); do { bl_counts[incrBitLen]--; bl_counts[++incrBitLen]++; overflow -= 1 << (maxLength - 1 - incrBitLen); } while (overflow > 0 && incrBitLen < maxLength - 1); } what is the meaning of while loop without curly braces in c# awaiting reply. Thanks Javfarary Thanks for the help, I got the while loop working in vb now. thanks and what about this code... if (windowFilled++ == WindowSize) { throw new InvalidOperationException("Window full"); } if the condition is true then only windowFilled++ Please convert it to vb. Thanks Javfarary ...Show All
.NET Development Is it possible to hide select enumeration values from intellisense?
If I have an enumeration in it that has values that I use internally as well as values I want users (clients) to use, is there a way that I can hide mine from intellisense Is there an attribute to do this Actually, it does work on a per enum value basis... Tried it and it worked. < Flags (), Description ( "Use OR to set a flag. Use AND to test for a flag." )> _ Public Enum asrTraceLevel < EditorBrowsable ( EditorBrowsableState . Never )> [ STRUCTURE ] = 1 < EditorBrowsable ( EditorBrowsableState . Never )> CONDITION = 2 INFORMATION = 4 WARNING = 8 [ ERROR ] = 16 CRITICAL = 32 End Enum ...Show All
SQL Server Problems Creating Report
Hi, I have only recently started playing around with Reporting Services (2005), and I am having some problems creating a basic report. What I want to display is a table which shows product names in the first column, sales for a specific period this year in the second column, and sales for the same period last year in the third column. The 'specific period' is determined by specifying a start week and an end week which I have set up as parameters. I have managed to produce the first 2 column with no trouble. However, for the third column I need to subtract 52 weeks from the parameters and use them as new parameter in the third column. Can anyone offer any suggestions Dave Ok, I manage ...Show All
.NET Development Socket listening and Accepting
Hi, I've recently tried experimenting with socket listening but am having a few problems... The code I'm using is the following: Private Sub Socket_ConnectionRequest( ByVal sender As Object , ByVal e As AxMSWinsockLib.DMSWinsockControlEvents_ConnectionRequestEvent) Handles Socket.ConnectionRequest Socket.Close() Socket.Accept(e.requestID) MsgBox( "Accepting connection from: " & Socket.RemoteHostIP) End Sub I'm trying to make it so that every time a user connects, it Accepts their connection, but what's happening now is it is only accepting one connection and denying the others. Is there any way I can fix this Please help! I've updated my code to VB.NET ...Show All
Visual C# advice needed on using lock()
currently i'm coding class that involves buffered file writing. scenario is pretty usual: you instantiate class, set properties, when needed call class methods. my class internally processes passed to methods string values and stores them in MemoryStream buffer. if buffer exceeds the specified value FlushBuffer() method is called, buffer is written to file. what i want to do is to run FlushBuffer() method in separate thread to not 'freeze' or slow-down operations that are running in the class caller thread since file io is relatively slow process. but this involves problems. if thread with FlushBuffer() method is running while the user calls class method that should process and store some string value in the buffer then some prev ...Show All
SQL Server Calculated Measure does not appear in all the drilldowns
Hello, I created a hierarchy [Time].[Year-Month] that has the following -Year --Period ---English Month I want to return the headcount from the 1 st Period only. This works fine. I did it by making a new measurement called LastActive by using the LastNonEmpty aggregate function. I then made a calculated measure called BeginHeadCount as the following: ([Measures].[LastActive], [Time].[Period].&[1]). This works OK, sort of. When I browse the cube, and I put the [Time].[Year-Month] hierarchy on the columns I don’t see the BeginHeadCount for each English Month, but I do see it for the totals. For example, I see the BeginHeadCount for the Year, then I hit the + and drill-down to the Period, I see it ...Show All
Visual Basic Command Line Switches
Okay, A really easy one here. I want to pass a single command line switch to my application, where if there is a specific switch it will show one form, if there is no switch or an unrecognised switch, it will show another form. Just need to know how I would go about finding out what switch was supplied - see, easy!! Thanks in advance OK, I've just found another way of doing this. There is a system array, my.application.commandlineargs, which contains the switches. I plan to put in my Saver_load event and if my switch is there I do me.close() then show my new form ...Show All
Visual Studio endless loop while debugging in Visual Studio 2005
Problem with debugging exceptions in Visual Studio 2005 When we are running our winform application and an exception occurs, Visual Studio 2005 breaks in debug mode. Of course this is normal, but somehow we end up in some kind of endless loop. This behavior occurs when we make a call from our client to our server using remoting hosted in the "ASP.NET development server". Client side we catch exceptions this way: AppDomain .CurrentDomain.UnhandledException + = ... and Application .ThreadException += ... What happens is that VS breaks and displays a yellow line on the line catching the exception, and then we hit F10 to continue step by step and all of a sudden automatically the call to the server ...Show All
Smart Device Development Wince 6.0: Problem in Audio Driver..
Hi, I'm working on WinCE6.0 on Visual Studio 2005. My target board is DM6446 EVM (DaVinci). I'm working on Audio Driver (MDD-PDD model) in WinCE 6.0 After loading the the audio driver in kernel bootup i'm getting following message continuously: " SwMixer: WaitForBuffer failed. Audio driver missed interrupt " Please help me in resolving this Thanks, -Ganesha ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Dynamic Vertexbuffer
Hi people, I am working with a dynamic vertexbuffer and I am wondering what the best practise is to fill the buffer with data. I have two different approaches to tackle this problem but as I cant figure out what is the best solution is I need your help. Option1: Create a vertexbuffer with flags dynamic and write only and keep a seperate array of vertices. If I want to update the buffer I can update the vertex array and then set this array into the vertexbuffer. Option2: Create the vertexbuffer, again with the dynamic flag, and just get the set and set the data from the vertexbuffer. Option1 needs double the space space but might be faster as the get function is not needed. Option2 is the other way around. Please tell me which option you wo ...Show All
Visual Basic Problem registering active x control
I have vb.net application that uses vb activx dll. I need to programmtically register this dll I use following code Dim ProcStartInfo As New System.Diagnostics.ProcessStartInfo ProcStartInfo.Arguments = ""C:\vb Code\activXdll\actdll.dll"" ProcStartInfo.CreateNoWindow = True ProcStartInfo.WindowStyle = ProcessWindowStyle.Hidden ProcStartInfo.UseShellExecute = False ProcStartInfo.FileName = "C:\WINDOWS\system32\Regsvr32.exe" System.Diagnostics.Process.Start(ProcStartInfo) I still keep geting Com exceptions till I manually register it using Regsvr32. What wrong with above code Well the problem was when I use above code my vb.net application throws exception th ...Show All
