mr hankey's Q&A profile
Windows Forms programmatically change datagridview pointer column size
The pointer column in a datagridview is manually sizable with the mouse. How can I set the pointer column width programmatically Thanks If I understand correctly, you want to programmatically set the width of the datagridview column correct if so.... this.theDataGridView.Columns[ indexOrColumnName ].Width = newWidthValueHere; ...Show All
Windows Forms piture array?
i have yet another problem. im trying to create an array of " System::Windows::Forms::PictureBox::Control"s to use as images but when i try to do anything with the images i get an exeption of "System.NullReferenceException" here is the code i am using: public : static array <System::Windows::Forms::PictureBox::Control^>^ picarr; private : System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e) { System::ComponentModel::ComponentResourceManager^ resources = ( gcnew System::ComponentModel::ComponentResourceManager(Form1:: typeid )); if (!test) { picarr[0] = gcnew System::Windows::Forms::PictureBox::Control( this ->splitContainer1->Panel2, "Player" , 12, 12, 10, 10); this ...Show All
SQL Server last 30 dates measures
Hi all, I want to do a top / order by query like select top 30 f.measure, d.date from fact f join date_dim d on f.date_key = f.date_key group by d.date order by d.date desc you get the picture, in MDX. I know I can use now() but how do I get the dd/mm/yyyy format and use strtomember to put this on the rows axis also, I cannot get order() to order the dates axis (or any other dimension for that matter) any ideas Thanks Hi, To convert the current date, you can use something like StrToMember ("[Period].[Calendar].[Day].&[" + format(DateAdd("d",-1,now()),"yyyyMMdd") +"]") "[Period].[Calendar].[Day].&[" - represents the structure of your date ...Show All
SQL Server Scrubbing data in a data flow task
I can only assume that I either did something very stupid, the examples are completely wrong, or I don't have the slightest clue what it is that I'm doing. I'm trying to do one of those incredibly complicated things in SSIS that was a brain-dead, point click operation in DTS. I want to strip characters out of an input stream from a flat file source before loading them into a table. I've defined my data flow task. I have my flat file source properly defined. I have my SQL Server destination properly defined. For the life of me, I can't figure out how to scrub the data that I want. My input is a csv file that has 22 columns of data. Column 22 contains data and if data was not present, there is a - in ...Show All
SQL Server How to provide drillthrough
How can I provide drillthrough on UI given that I use MS SQL SERVER 2005 , frontpage , pivot table & web component Our web application is designed already using office pivot table via web component of frontpage. hence the end users use our application by mean of the internet explorer. Does office 2007 include a new web component that gives me ability to show Drillthrough actions using the software tools I use already ...Show All
Visual Studio 2008 (Pre-release) XmlDataProvider - Recommend when using large files
Hello I really enjoy the binding features in WPF for the xmldataprovider, really useful. My only problem is further down the road there is no support in my mind for setting the XmlDataProvider with an XmlReader only an in-memory XmlDocument. After downloading the XPathReader from MSDN should there not by a XPathReader in V3 of the Framwork and an XmlDataProvider that streams data I can see my avalon app eating memory in occasions. What do you recommend. kind regards, Andrew Yes this is the approch I have taken and think is the only best alternative. I set my DataContext equal to an 'ObservableCollection<DataRowProxy>' with each DataRowProxy being a JIT read from an XmlReader. It's not perfect as a thousand ...Show All
Software Development for Windows Vista Where is the "Custom Properties" dialog?
Hi i just fell upon this tutorial: http://www.morganskinner.com/Articles/ActivityValidation/ I can see he uses some kind of property builder. How do i access that Regards Anders that dialog went away in one of hte beta 2 builds and is no longer available. You can define properties and/or dependency properties on your activity just like any other class. use the snippets for dependency properties to make it really easy (type wdp + tab + tab). Matt ...Show All
Windows Forms Concurrency violation help me please
hi i use vb.net 2005 and an access database i connect to one table and change many things on the table and then save it again i use the disconnected mode i disappointed i try to solve the concurrency violation like the msdn said (get a fresh copy of the table and merge it to the worked one)but it sometimes save and sometimes not !!!!! although im one user for the database help me thanks in advance. thanks for reply the database is Access database xp 1- the table structure contains autonumber field and 4 string fields and date field and this table has relation to child table one to many .. 2- the error messages says "Concurrency violation the update command affected 0 of the excpected rows" it appears some times and times ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Cannot create Xbox 360 game with Beta 2
Hello, everytime I try to create a new 360 Game, and windows game for that matter, I get this: Could not load type "Microsoft.Xna.Framework.COntent.ContentSerializerCollectionItemNameAttribute" from assembly "Microsoft.XNA.Framework, Version 1.0.0.0, Culture=neutral, PublicKeyToken=f48fa5f25d27e8ff". Any idea on what could have caused this error I reinstalled GSE, and I look for a similar error in the readme and came up with nothing. It happens on both of the project types. I reinstalled both C# Express and GSE, and I continue to get the same error. Any solutions ...Show All
Software Development for Windows Vista Using the WF rules engine editor
Hello there, I am working on a project where I am using the WF rules engine frequently. I have a set of rules that need to be implemented into the WF rules engine. But when I was implementing the rules into the rules editor (the dialog that came along with the WF) I found a problem. I need to write a rule like.. if ( ifCondition ) DoSomeWorks(); else if (elseIfCondition) DoSomeOtherWorks(); else DoDefaultWorks(); But I am facing trouble inserting this rule. the dialog does not allow me to insert the else if part. If I break down the else if part to another if-else group then the it will be too complicated when I have a long if-else if-else if- else if -....else chain. one more thing I found that the rule ...Show All
Visual C# COM object returning a null object reference to a C# client
My C# client has a reference to the com server that contains CPipingModelEx. Here is the method of the COM interface that is returning a null pointer: STDMETHODIMP CPipingModelEx::GetElement(IPipingElementEx **pIElement) { HRESULT hr = CoCreateInstance(CLSID_PipingElementEx, NULL, CLSCTX_ALL, IID_IPipingElementEx, reinterpret_cast<void**>(&pIElement)); return hr; } The CoCreateInstance method succeeds and I have a vaild interface created. IPipingElementEx **pIElement is declared as an [out,retval] in the IDL file. Upon return from this method, the return value in the calling method is NULL. Here is my C# client's call: PIPINGINPUTEXLib. PipingElementEx ipe = model.GetElement(i); ipe ...Show All
SQL Server What happens at midnight ?
Everyday at just gone midnight, my MSSQL server won't accept connections. About 25 minutes later, it seems to be OK. There's no third party backup software running on this machine which is MSSQL server aware. Has anyone any suggestions as to why this might be happening The client app trying to use the db reports 17/10/2006 00:02:04 Email2DBServer Cannot open database "Email2DB" requested by the login. The login failed. From OpenLocalDatabase and there's an entry in the event log Event Type: Failure Audit Event Source: MSSQL$EMAIL2DB Event Category: (4) Event ID: 18456 Date: 17/10/2006 Time: 00:02:04 User: NAVIGATOR-BATH\navigator-service Computer: NAVIGAT2A Description: Login failed for user 'NAVIGATOR-BATH\navigator ...Show All
SQL Server cursor select and variables
I have problems to place my variable into the select statement. DECLARE @DB_NAME varchar ( 64 ) DECLARE MR_ReqPro_DB_cursor CURSOR FOR select name from dbo . sysdatabases where name like '%MR_req%' OPEN MR_ReqPro_DB_cursor FETCH NEXT FROM MR_ReqPro_DB_cursor INTO @DB_NAME WHILE @@FETCH_STATUS = 0 BEGIN print @DB_NAME ; --works fine Select NAME , FILEDIRECTORY FROM @DB_NAME . MR_ReqPro . RQDOCUMENTS WHERE ( FILEDIRECTORY LIKE '%\\%' ); FETCH NEXT FROM MR_ReqPro_DB_cursor INTO @DB_NAME END CLOSE MR_ReqPro_DB_cursor DEALLOCATE MR_ReqPro_DB_cursor GO How could i use a variable like @DB_Name in my select the object against which you run a query cannot be ...Show All
Visual Studio Several DataSet as the report DataSource runtime problem
I have Crystal Report document based on several DataSets (DataSets are connected trough their XSD-schema). There are no subreports - only the main report with fields from 3 different DataSets. So at the run time I want to set the DataSource for this report, and I don't know how I can do it. Notice that DataSets are not persisted at the database. I have only DataSet objects. So, do you know how can I set these DataSets as DataSource Thanks. CORRECTION TO PREVIOUS POST: For absolute beginners using designer, this worked for me in VB create blank form create dataset drag datatable onto form to create datagridview (this makes form aware of dataset) delete datagridview and naviga ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA Framework.dll error after installing an application
I'm not entirely sure where this question should go, but I've written a version of Pong in C# using the XNA Framework and it publishes, installs and runs with no problems on my machine. However, if I send it to any of my friends, or to my laptop then I get various errors. In the Publish options there's a place for Application Files... and if I leave everything on "(auto)" then during the installation, I get an error stating that the Microsoft.Xna.Framework.dll needs to be installed. If I change the Application Files option to include the Microsoft.Xna.Framework.Game.dll then the installation proceeds without any problems, but the game doesn't start and instead causes an error and gives the regular XP send or don't send options ...Show All
