sudhakarbhattu's Q&A profile
.NET Development CWinFormsView & Accept/CancelButton
I am hosting a .NET UserControl in a MFC CWinFormsView, and it works fine. I can however not find any way to specify Accept/CancelButton in this context. Please help ! You are getting dangerously close to having to re-invent the Windows Form form class functionality. Its Accept/CancelButton properties are implemented through the IButtonControl interface, implemented by a button. ...Show All
SQL Server email with trigger inserted row
I'm trying to create a trigger which, upon a row insert, an email is sent containing some of the inserted row information. Apparently the built-in stored procedure for email starts it's own session, so I can't use the local variables of the trigger. My solution was to create a temp table, copy the inserted row in, then refer to that from the email SP, then drop the table at the end. When I try to insert a row, it runs for a very long time, then gives an error message saying that it timed out. It was suggested I add COMMIT TRANSACTION in to force it to commit the data to the temp table. Doing this, it gives an error, saying "The transaction ended in the trigger. The batch has been aborted. Mail queued." In the table view, I'm forc ...Show All
SQL Server Can't see the SQL Server Express Instance on SQL Browser
Hi All, I am using SQL Server Express to connect to the network using VPN on a local machine. I have done the following.. a.) Enabled the remote connections for the Express Instance and rebooted the machine. b.) Connected to the machine with Express Edition locally and can also connect other SQL Server instances from it to verify connectivity. c.) Yes, SQL Browser Service is running. d.) Firewall is not turned on, so I do not have to configure any exceptions. Now here is the big problem: When I browse for SQL Servers on the network the machine does not show up on the list, i.e "macinename\SQLExpress". I had uninstalled and reinstalled the Express edition and rebooted the machine several times with no luck on t ...Show All
SQL Server Calculations in Mdx Query
How to show the vlaues of increase in salary for few departments along with other departments. Ex we have A,B,C,D departments having total salary of 1000 each A 1000 B 1000 c 1000 d 1000 Total 4000 If there was an increment of 2% for A and C deptment Then I want to see the results as Old_sal NewSal A 1000 1020 B 1000 1000 C 1000 1020 D 1000 1000 Total 4000 4040 Please help to write the mdx query to populate the above results. I am using Pivot table as client Thanks In advance Hello Paul. I have thought about the same problem. Will this work in a MDX-script Create Member CurrentCube.[Measure ...Show All
Game Technologies: DirectX, XNA, XACT, etc. SpaceWars example, don't understand a scope thing
Ok, i've been trying to solve this in my own game classes, and I'm wondering how exactly the SpaceWars game does it. for instance, if you look at Font.cs, and go to: public static void Draw( FontStyle fontStyle, int x, int y, string digits, Vector4 color) { float xPosition = x; FontInfo fontInfo = _fontInfo[( int )fontStyle]; for ( int i = 0; i < digits.Length; i++) { //Do't draw anything if its a space character if (digits != ' ' ) { //Look up the character position int character = fontInfo.Characters.IndexOf(digits ); //Draw the correct character at the correct position batch.Draw( SpacewarGame .ContentManager.Load< Texture2D >( SpacewarGame .S ...Show All
SQL Server What is the best solution for delivery of the big tables?
Hi! Well.. I've several big tables which take part in the merge replication (web synchronization is used) Is there any *painless* solution to delivery these tables to the subscribers Otherwise I've the snapshot with dozens of Mb.. Yes, the Parameterized Row Filters can be used, but sometimes it's necessary to get the whole table Thanks Paul if you are "replicating to sql server 2000" only check this option in the snapshot. If this is currently not selected it will save you lot of Hardisk space if you do choose this option if you have done so your only option left is to filter the publication. have a multiple publication-single subscriber topolog ...Show All
SQL Server Count of employees
Hi, We got of count of employees from measures against a date dimension. we need to get average count for a time period (ie..week,quarter,year ). and the formula for avg employee count: (empl-count on firstday of period+empl-count on last dayof period)/2 Date EMPCount for ex : 1-Nov-2005 2361 2-Nov-2005 2521 3-Nov-2005 2762 4-Nov-2005 2500 avg count for week in novemeber: 2361+2500/2. Kindly let me know how we can do this in SSAS cube. Thanks in advance Raj I think what you are getting is the distinct count for the week and I think what you are after for the DateHead measure is the count for the first day. By putting the Week L ...Show All
Visual Studio Team System Schema Compare
I have 2 questions about the Schema Compare functionality in DB Pro: 1.)On a DB that has replication enabled, and is being Published from, there will be extra replication triggers on the selected table objects (e.g., Articles) that SQL Server inserts at the time of setting up replication. Further more, given two databases with identical schemas, the replication related triggers placed on the included table objects will not be named the same. This appears to be because the strategy chosen by Microsoft to name the replication triggers includes GUIDs. That said, in my particular situation, there are Update & Delete triggers on these tables, too, that we have created on our tables. So, is there some way when doing a Schema Compare in D ...Show All
Gadgets Determining 64-bit OS
I have an app which reads from the registry to look for some registry keys written by a 32-bit app. When run on 64bit windows, the registry entries are under Wow6432Node. How do I determine if the user is running 64-bit windows. Thanks Dan I'm not really sure, but I guess you could check to see if the 32-bit Program Files folder exists ( c:\ Program Files (x86)). Probably not the simplest way, but the only way I can think of without messing around on 64bit Vista for a while :) Andy ...Show All
Visual Studio Express Editions Everything is gone when I added Tab
Please Help! I have spent the past few days building a complex form and writing all the code for it. Last night everything was perfect, it build and published fine, it was running smoothly and I was excited about moving on to another part of it. Today I go to add a third tab page to a tabbed container, when I named it, suddenly every item on every page of the entire form is gone(including the menu)! All the code is there, but nothing will display. Also nothing I do works and I have no idea what else to try. Thank you in advance for any help. Try checking the properties tab, or the document outline when in the designer mode of the form you are talking about, see if the controls are still there, they could be ...Show All
Visual C++ How do a create a new text file, and how do I insert an eof into it?
Hi, I'm looking to create a new text file. I am in second term C++ so we're not using the MFC or anything. We have covered opening, reading, closing ifstream and ostream objects from fstream.h , but nothing about how to create a file if one's not there. Is this possible Also - anyone know how to insert an eof into a file through a text editor or something in Windows I am given to understand the eof flag is represented by a ctrl-Z but I can't insert this using textedit. In the mean time I'm using a pipe symbol '|' as my eof flag which is much less elegant. Thank you o wise sages of the code. If I create the ifstream object to open the file and the file does not exist, the ifstream object returns a negative result. The code I ...Show All
Visual Studio Express Editions Publish Problem with Database
If this Post is in the Wrong area I am sorry. I have written a VB.NET 2005 program using a MS Access database and a Datagrid control. The program works fine locally as an exe but when I come to Publish it (using the Click Once method and publishing to CD/DVD) I get a problem. The publishing Wizard works OK and produces the publication files but when I run Setup.exe I get an Unhandled Exception error "Cant find the file C:\Documents and Settings\..\Local Settings\Apps\2.0\Data\............\data\my password.mdb I have not provided the full path as it is very long and includes long strings of characters & numbers). If i manually copy the database to that Directory it works my question is why is Click once not Copying the database HE ...Show All
Windows Forms Is it possible to capture events in a modal form
Hi, Does anyone know first whether or not it is possible to capture events from a form shown modally using .ShowDialog() If it is possible how can I do it Thanks, Nathan I couldn't reproduce your problem, the modal form's KeyDown event fired just fine. Don't forget to set the form's KeyPreview property to True. ...Show All
Visual Studio Express Editions Openin files
Hi i am extremly new in VB, so please treat me like a baby (!). I am trying to open a .txt file, and a book im reading is telling me to do it like this: Public Class Form1 Private Sub Form1_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load Dim FileName As String FileName = App.Path & "c:\NamesAndAges.txt" End Sub Now this isnt working its sayin "App not declared" can you please tell me how to solve this. any help is apreciated! Thanks, Fire_alive ok thanks! the above cleared the app declartion away, but now a have another problem with the rest of my code its saying " 'open' ...Show All
SQL Server Hoe to setup integration services on a cluster
Does anyone know how to install SQL 2005 integration services on a cluster machine I have an a-a cluster machine. Both nodes are using SQL 2005 naming instance. During the SQL installation, I did include integration services option as one of my setup items. The setup process was running fine but I can’t connect to integration services via MS SQL Server management studio. I see below errors: “Invalid server name "TESTServer\B123". SSIS service does not support multi-instance, use just server name instead of "server name\instance". Looks like I must use default instance for 2005 integration services. I re-ran the setup program and added a default instance on the same cluster node. (On that node ...Show All
