Robert Davis's Q&A profile
Visual Studio 2008 (Pre-release) Binding ListView to infinite lists
Out of pure curiosity I decided to try the following on a ListView since I heard it uses the VirtualizingStackPanel. I bound the ListView's ItemsSource property to a getter property defined as public IEnumerable<int> InfiniteList { get { int n = 0; yield return n++; } } It only displayed the first item. How does the ListView populate itself from a databound collection I thought any collection implementing IEnumerable would be fine. Cool question. The problem is in your iterator. It is only returning one value and then it's done. I changed it to: public IEnumerable<int> InfiniteList { get { int n = 0; while (true) { ++n; yield return n; } } } However, my CPU just s ...Show All
Visual C++ compiler error C2248 in STL
After installing VC++ express I get the following comiler error on every file. It looks like an error inside the STL code. I have installed twice by net and by CD. C:\MSVC2005\VC\INCLUDE\ostream(581) : error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>' with [ _Elem=char, _Traits=std::char_traits<char> ] C:\MSVC2005\VC\INCLUDE\ios(151) : see declaration of 'std::basic_ios<_Elem,_Traits>::basic_ios' with [ _Elem=char, _Traits=std::char_traits<char> ] This diagnostic occurred in the compiler generated function 'std::basic_ostream<_Elem,_Traits>::basic_ostream(const st ...Show All
Visual Basic Open a form and show a particular record
Hi, I have a stored procedure that returns a record dependant on a value sent to it. I have created a form that shows the detail view of the Dataset from this stored procedure. How / where do I send the form the parameter (from another other form) so that the form opens on the right record Ta. John Thanks for your answer. I tried adding a new sub and got a " Public Sub New ( ByVal recordcriteria As String ) in designer gernerated type "Trial.frmName" should call initialize method." error Also, I cant see the fill method having such a form. Get a too many arguements error... I'm OK with passing the criteria, it's just geting the criteria into the adaptor/recor ...Show All
Visual Studio Express Editions input of textbox to a second form
sorry for asking all the time but.. ive made a small app (still early days for me) the 1st form (named setup) takes details including two names from textboxes ( saved as Aname and Bname) i'm tring to use them on the 2nd form (called game) ive look at the guide for multiforms and get alot of errors when copying guide method for integers (main one being "Error 1 'testgame.setup.Aname' is not accessible in this context because it is 'Private'.) and i tried setting the sub to public sub rather than private sub no change. the only guide i could find on msdn was for information to be passed from set information to textbox and all adaptions i tried failed thats right. ...Show All
Visual Studio Tools for Office Word ribbon customisation not working
Hi I tried customising the ribbon to show/hide a custom task pane (VSTO 2005 SE with Word 2007), as described in the walk-through - didn't seem to work, no custom "VSTO" tab was displayed when I ran it. I took the embedded resource route. Any hints on tracking down the problem Many thanks Paul. Hi I realised my mistake this morning - I'd got the tab id and button id in the XML set as the same value. This didn't trigger any warnings, but obviously stopped it from working. Thanks Paul. ...Show All
Visual Studio Team System Move from TFS Dual server configuration to Single configuration
Hi, There is a way to move from TFS Dual server configuration to Single configuration All the posts that I saw describes move from Single configuration to Dual one Also, does any one knows if there is any problem to change configuration (make a backup & restore) from server without service pack (TFS latest service pack) installed to server with service pack installed Thanks in advance, Shmulik. I have not heard of any issus with moving from dual server to single servr. Moving from Dual server to single server should be very similar to moving from singler server to dual server. The only reason it is not documented is, it is the first time someone has requested it. The steps will b ...Show All
Visual Studio Express Editions Updating Database Questions
Hi, I am trying to use SQL via Visual Studio C#, and have now started from scratch a few times. To prevent having to do this again I wanted to ask a couple of questions. 1) If I create a database and then need to add a column to the database, can I somehow refresh the connection so that the new columns show up in the Data Sources Can I edit what appears in the Views so that this new column would be in there too If I add a new connection I end up with a bunch of different database connections, all with different names... 2) I am trying to make a program that would save information to the database. If I release an update to this program in the future, am I able to update the program without erasing the database Is it possible for me to up ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Standardized Full-Screen Fade In and Fade Out Solution
hi, i've implemented an enhanced Screen class that does full-screen fade-ins and fade-outs automatically -- all a derived class must do is call a function and accomodate for the wait-time of any fades it invokes. i *strongly* feel that this kind of thing should be included in the XNA samples or the architecture itself, but since it's not, i did one myself. (hindsight) this post turned into more than i intended. it's more of a tutorial now, hehe... but get through it, and you'll have easy fade-ins/outs in no time. anyway, here's what i did -- hope it helps someone... NOTE: i'm a prototype developer, so comments are not my thing and the code may be incomplete and/or have bugs that i don't see at this early stage. i know i reformatted the tab ...Show All
.NET Development URGENT Problem with Greek Character from an Oracle database
Hello, I am having a serious and urgent problem with the character setings of an oracle database. The database is sitting in a solaris unix server and when we run the env command we have the following in the NLS_LANG parameter: AMERICAN_AMERICA.WE8ISO8859P1 (I do not know if this is helpfull). When I retrieve data from oracle database (through a VB.NET 2005 program)to a dataset I use a special font in order to see the greek characters (HELLASARIAL). But when I am trying to save these data to a TXT file the greek characters are like chinise to us. I tryed several encodings (System.Text.Encoding.GetEncoding(869)) but without success. Can someone tell me how to convert the oracle greek characters during the selection or during the saving to t ...Show All
Visual C++ a question about porting application from vc6 to vc2005
Hello, I am porting a very large application from vc6 to vc2005. All compiling errors have been solved. Now when I run the application, it stops at the initilization. (A less components needed application can run) Unhandled exception at 0x7c964ed1 (ntdll.dll) in Navigator.exe: 0xC0000005: Access violation. Call stack: ntdll.dll!_RtlRaiseStatus@4 () + 0x26 bytes ntdll.dll!__LdrpInitialize@12 () + 0x26b95 bytes ntdll.dll!_KiUserApcDispatcher@20 () + 0x7 bytes When I try to use dependency walker to start this application, the very end information is shown as below: 00:00:10.175: GetProcAddress(0x7C800000 [c:\windows\system32 ...Show All
SQL Server Variables in Script Task
I recieve the below error when I attempt to execute a Script Component in a Data Flow Task: The collection of variables locked for read and write access is not available outside of PostExecute. This is the code I used: Imports System Imports System.Data Imports System.Math Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper Imports Microsoft.SqlServer.Dts.Runtime.Wrapper Public Class ScriptMain Inherits UserComponent Public Overrides Sub Input0_ProcessInputRow( ByVal Row As Input0Buffer) Output0Buffer.AddRow() Output0Buffer.BillerId = CType (ReadWriteVariables( "CustId" ).Value, Int32) Output0Buffer.UserAccount = CType (Row.Column0, String ) Output0Buffer.UserS ...Show All
Visual Studio Express Editions join 2 projects
hello could anyone tell me if its possible to join two small projects together to make one project.. and if so, how would I go about it thanks Of course it's possible. Since these are user written projects there are no presciptions for how to merge your project, since you are the worlds expert on it. It should be easy IF you made well defined classes and had well defined interfaces to those classes. I don't know how many forms you have or how complex they are. All of these questions are factored into a merge Here's how to begin at least: Notice that a form actuall has three files. The Form (form1.vb), a designerfile form1designer.vb and a resource file form1resx.vb. When you copy a file from an old p ...Show All
.NET Development PropertyInfo.GetValue[need help]
Hello firends, I m trying to create a generalized objectArray sorting function whose prototype will look like this public object[] Sort(Object[], strPropName) The reason for creating such a Function is that I call some WebMethods of a webservice. Each webmethod returns an object[] but ,whose type differs. and i need to sort those object[]. i tried this public object [] SortObjectArray( object [] objectArrayToSort, string propertyName ) { int size = objectArrayToSort.Length; Type type = objectArrayToSort[0].GetType(); Object tempObject = System. Activator .CreateInstance(type);// this will act as temp obj for swapping during sorting for (int i = 0; i < size; i++) { for (int j = i + 1; j ...Show All
Visual Basic Login via Access Database help
Hi, I recently got VB 2005 and really like the new features. However, I am on an intermediate level learning Visual Basic. For a test project, I plan to create a login form that validates users through an access database located on a server. Basically, there is a set username and password in the access database and I want my program to execute the main program once the user is validated via the database. I was struggling on this for about a week, but I have no idea on how to do it. I can arrange the controls on my form, but I just need to know how to validate the users. Any ideas you need to strong name/type your assembly if you are running the app over the network. Take a look at this: htt ...Show All
SQL Server Creating a calculated measure that filters
Hi, Can I create a calculated member that will filter out based on a certain dimension eg, I have a customer dimension and a sales cube. The sales cube has the sales count measure. Can I have a calculated measure that will give me the sales count for all customers that are flagged as 'New' That way, I have a total count and a New customer count. Thanks, Brian This should be very easy to do in MDX if you have attribute NewCustomer in the Customer dimension. The expression then would be something like (Measures.[Sales Count], Customer.NewCustomer.[true]) ...Show All
