tReXx's Q&A profile
Windows Forms DataGridViewButtonColumn problem
Hi, I have used the following code to display text in the DataGridViewButtonColumn in a grid: private void Form1_Load( object sender, EventArgs e) { DataGridViewButtonColumn buttons = new DataGridViewButtonColumn (); buttons.HeaderText = "Sales" ; buttons.Text = "Sales" ; buttons.UseColumnTextForButtonValue = true ; buttons.AutoSizeMode = DataGridViewAutoSizeColumnMode .AllCells; buttons.FlatStyle = FlatStyle .Standard; buttons.CellTemplate.Style.BackColor = Color .Honeydew; buttons.DisplayIndex = 0; dataGridView1.Columns.Add(buttons); } This is the same code which was provided by MSDN. This code is not working and the text is not displayed in the grid. ...Show All
Visual Basic getchildrows help
I need to open a new excel sheet for each row in "Customers" that has childrows in "Invoices" then get invoiceschildrows from "InvoiceDetails" and export the invoicedetails information to excel. I'm very unsure of the syntax of using getchildrows. examples would be very helpful. Thanks! This is what I have so far Dim XL As Microsoft.Office.Interop.Excel.Application Dim xlwb As Microsoft.Office.Interop.Excel.Workbook Dim iddatatables As DataTable = Me .RcsDataSet.Customers For Each row As DataRow In Me .RcsDataSet.Customers Me .InvoicesTableAdapter.Fill(RcsDataSet.Invoices) For Each crow As DataRow In Me .RcsDataSet. ...Show All
Software Development for Windows Vista Error while running application on VISTA
we are developing some multimedia application, everything is working fine on XP and 2000, but on Vista I'm getting the following error when I'm calling a COM server method with a BSTR parameter: "Duplicate Memory Free operation. Get a stack trace and report bug against the calling app (not against OLE Automation). File: d:\rtm_edw\com\oleaut32\typelib\oautil.cpp, line 602" Anyone could help me Robert Bacs wrote: I tried various combination, without ::SysFreeString in the COM server also in the main application, but I'm getting the same result. Below is the the code that works on XP and 2000. STDMETHODIMP CComClass::SetUrl(BSTR newVal) { AFX_MANAGE_ ...Show All
Visual Studio Check out stored procedure
I'm using Visual source safe 2005 and SQL 2005. I create new solution and project to control my database objects as storeds and tables.Please help me: 1. How to add my storeds and tables to the source control under file .sql . 2. When I check out a file on sourece control (the file is correlative with a stored in database) to modify, the stored will be locked untill I check in the file I the stored will not be locked, other user can change the stored by connecting directly to database 2. If I change something in script file (. sql file), source safe will update automaticaly back to database If It is imposible how can I do it thanks Joe, SourceSafe can control stored procedures, but it i ...Show All
Software Development for Windows Vista Removing service subscriptions for non-guaranteed events?
I'm writing a workflow service to watch for file changes, which implemented the following interface (note: correlation attributes not shown for clarity): [ExternalDataExchange] interface IFileSystemWatcher { event EventHandler<FileWatcherServiceEventArgs> FileSystemEvent; void Watch(string directory, string filter, WatcherChangeTypes changeTypes); } I have derived an activity from CallExternalMethodActivity to set the subscription up on the service by calling the Watch method (internally in the service this creates a FileSystemWatcher and stores it in a hashtable with other details about the subscription), and another from HandleExternalEventActivity to handle the FileSystemEvent event. It's all working fine, the events are ...Show All
SQL Server How "WHERE" clause can be used in MDX query?
Hi, I am writing MDX query to retrive a set of data based on selected range of date. I have written a MDX query but it is not filtering . My code: SELECT NON EMPTY { [Measures].[Fact Table Count] } ON COLUMNS, NON EMPTY topcount({ ([Date Time1].[Date Time1].[Date Time1].ALLMEMBERS ) } ,1000)DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( [Date Time1].[Date Time1].&[ 2006-01-25T05:53:07 ] : [Date Time1].[Date Time1].&[ 2006-02-25T15:53:56 ] ) ON COLUMNS FROM [Cube Analysis]) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS This code should display only data with selected range of date but it displaying all data. Can a ...Show All
SQL Server How to limit the MDX dataset for the last six months
I have the following MDX query and I'd like to put in another condition that the " [Account Period].[True Prescription Date].[True Prescription Date]. ALLMEMBERS" has to be GREATER than OR EQUAL TO last six months. Eg. using today date as 21-Nov-2006 and the dataset should only include the records from 21-May-2006 onward. SELECT NON EMPTY { [Measures].[Pharmacy DW Count] } ON COLUMNS , NON EMPTY { ([AgencyID].[Agency Id].[Agency Id]. ALLMEMBERS * [Account Period].[True Prescription Date].[True Prescription Date]. ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION , MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( STRTOSET (@DrugProtocolCode, CONSTRAINED ) ) ON COLUMNS FROM ( SELECT ( STRTOS ...Show All
.NET Development Using FtpWebRequest in .NET 2.0 via C# - Occasionally get "Server committed protocol error"
On doing an FTP file upload from the XP Embedded PC in our product to another internal embedded processor (which is connected via ethernet and is part of the product) we occasionally get an exception System.Net.WebException: The underlying connection was closed: The server committed a protocol violation ... at System.Net.FtpWebRequest.SyncRequestCallback(... The behavior I see on the wire when this happens is after we do a USER request we get "Response: 230 User \b\206B\240 logged in". This happens the first 2 times with 2 different (but consistent) "garbage" strings as user names. The third time and on succeeds and returns a space " " as the user name (we login as "(none)") . ...Show All
Visual Studio Team System getting varied results
Hi I am load testing a web based application..we at this point only require the response time in case we have 200 user hitting the link at the same time ....so wat i did wasrecorded the script in fiddler imported it to vsts and then configurd tha load test for the same .....i used a step load starting with 20 users and in every 60 sec 20 users were added till it reaches a maximum of 200 users ..i did not add an server or counters it was a local run however i made a connection pool of 100...igot error in connection wait time now if i change the connection pool little bit i get varied differences in the results specially the respone time which is my priority at the moment.Now here i have 2 concerns:- 1)connection pool is always set at ...Show All
Visual C++ The issue of using resource-only dll.
Hi, I know using resource-only dll is very useful for L10N. I also know I must add a .rc file into the project but let it be excluded from build to get benefit from code wizard. Does this mean the original executable file contain no any resource now If this is true, how to display the icon and version information in the shell Any idea Thanks for your reply. ...Show All
SQL Server Suggestions for SQL 2005 Setup
OK we currently have a single SQL 2000 Server for our DW with a DR SQL 2000 Server. We are wanting to create a setup where we have a Failover Cluster of SQL 2005 here at the main office with a DR SQL 2005 system at our DR site. My question is... How would you all do the failover and stuff How many servers would I need and what would be the job/role for each server. Some things to take note we are implimenting a SAN in our network and we are also implimenting a Virtual Server system on our network. To my understanding you do not really wish to run SQL Servers on a Virtual machine if possible. So I am already planning on making the SQL Servers Physical systems. We are also planning on putting the DB's on the SAN and have the SAN replicate a ...Show All
SQL Server How to countrows from subreport and present on mainreport
I have a main report i want to count the total rows from the subreport: for each main record, i may have multiple child rows, these child rows are presented in subreport. I want to show in the master footer how many total number of child rows. subreport is in table1_group2(embedded in group2 groupheader) subreport only has a table control, in it i am populating all child rows. Thank you all very mucy for the information. ...Show All
Visual Basic Debug Class Library from Windows Application
Hi, I have a Class Library developed in Visual Studio 2005. I want to test it using Windows Application.. I wrote Windows App also.. If I want to Debug Methods in Class Library from Windows App, How can I do it right now I added Two Projects under same solution and selected Windows App as Start Project.. But debugger is not going to Class Library.. Suggest me. Thanks Hey, Don't add Compiled DLL as a Reference to the Windows Project. Add Class Library Project as a Reference. Windows Application -> Project Properties -> Add Reference -> Projects Hope it helps! ...Show All
Smart Device Development Button or image on today item
Hi all, With the help of the sample project memwatcher, I have created my own today item (actually I removed everything from the project which was not neccesary and called it "my own" ). But instead of adding a progressbar on the today item with the following code: g_hStorageProgressBar = CreateWindow(PROGRESS_CLASS, TEXT("Storage Progress Bar"), WS_CHILD | PBS_SMOOTH, CW_USEDEFAULT,CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,g_hWnd, NULL, g_hInst, NULL); I would like to add a clickable image or button, so that I can for example launch another application. With WM_LBUTTONUP I can already launch an app. but with WM_LBUTTONUP the whole today item is clickable and I don't want that. Does anybody know how ...Show All
Visual C++ std::map link error
hi, every body, i created a standard c++ project in vc 6.0, and i must checked "Ignore all default libraries" in projects-->settings-->link, when i use std::map<int, int> and compile it, occured follow errors: dump.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Lockit::_Lockit(void)" ( __imp_ 0_Lockit@std@@QAE@XZ ) VisionMedia.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Lockit::_Lockit(void)" ( __imp_ 0_Lockit@std@@QAE@XZ ) tell me which library must be imported, i've not found it in MSDN. thanks very much MSVCPRTD.LIB (debug) or MSVCPRT.LIB (release). However, checkig " ...Show All
