VTS's Q&A profile
Visual Studio 2008 (Pre-release) anonymous types, why automatic properties i/of fields
Does anybody know why anonymous types are using automatic properties instead of public fields Why was such an approach choosen Why not just use fields Is there an article which discusses this cheers So, this will mean that the following code will be disallowed 194 var z = new { 195 text = "xxx" 196 }; 197 198 z.text = "PPP" ; ...Show All
SQL Server SQL2005 Log shipping roll change where secondary is readonly standby
Hi, I am trying to implement a log shipping scenario in sql 2005 where the secondary server is in standby mode with the ability to roll change during failover. With the help of BOL (ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/2d7cc40a-47e8-4419-9b2b-7c69f700e806.htm) I can implement my scenario in Recovery mode, but not in standby mode. I use the following sql to put my primary in standby BACKUP LOG [database] TO DISK = @filename WITH STANDBY = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\ROLLBACK_UNDO_database.BAK' GO which works, but then my restore job fails on the last step. How can I put my primary db in standby mode in such a way that the log shipping restore will work Thanks Andy ...Show All
Visual Studio 2008 (Pre-release) Dynamic Query - Select what?
Hi All, I have written some code to construct a dynamic query, but I am unsure how I would go about specifying what fields I want returned. My code is as follows ( I used an example from a blog and modified it to suit my needs ). I understand the filtering expressions, but I am unsure which bit specifies what I want returned. Any pointers would be great (At present I get the whole object back). ParameterExpression p = Expression.Parameter(EntityInfo.ModelType, EntityInfo.Name); Expression IdEx = Expression.NE(Expression.Property(p, EntityInfo.IdProperty), Expression.Constant(EntityInfo.IdProperty.GetValue(this,null))); Expression ValueEx = Expression.EQ(Expression.Property(p, Prop), ...Show All
Software Development for Windows Vista Rules Editor
I must be missing something simple but I have been unable to use the "System.Workflow.Activities.Rules.RuleConditionReference" within my workflow (CAG specifically). Everytime I select this option and click the ellipse to add a New Condition , the popup closes. If I enter text manually in the ConditionName field and hit enter, it will create the worklow.rules file with RuleExpressionCondition line. Next I try to add the expression by clickin on the ellipse and I get an error "An item with the same key has already been added". I have hand coded a rules file using other examples in hopes of it being recognized but with no luck. Am I missing something Jesse I believe I have identified a bug and a workaround ...Show All
Visual Studio BuildAction property for a ctc file does not contail the CtcFile property
Hi, I'm trying to remove the depenendency of my Package on a satellite dll. I did this by creating a resx file and adding all the necessary strings, ico, images etc. I proceeded to add the [MsVsShell. PackageRegistration (UseManagedResourcesOnly = true )] attribute to my package. I then moved the ctc file for the assembly from the satellite dll project to my main package project. The "Build Action" property for my ctc file, however, does not provide the "CtcFile" option. If I look at the Toolwindow sample the ctc file has this option. What is the correct way to migrate a ctc file from a satellite dll to the main package How do I get the "CtcFile" option to show up for the "Build Action" property. Thnx in advance. ...Show All
Visual Studio Problem with Help VisualStudio2003
Hello, i have a problem with the help system. i start a new vb.net project and i want to go to help. for example i select a button and then i press F1. no help is show. i see help on the register: i can type in a phrase to search but the message is "fur die aktuelle Auswahl ist keine Verknupfung vorhanden" (= for the actual choice there is no linking). it already worked. then the problem occured again, i installed the msdn help again but now there is no help. can you help me i tried all settings in the extra / option window. but no one worked! Thank you Michael Exactly the same problem here Michael. Have VS2003 MSDN april2003 both part of the same Enterprise edition. Al ...Show All
SQL Server Is WITH / Common Table Expression a syntactic sugar?
I tried to use WITH to factor out the shared star join portion from a sql statement as it's usually the most expensive part. However, examing the execution plan shows that the WITH clause is merely a syntactic suger that will internally be plugged back as derived tables where the same star join is executed repeatedly. Is the intermediate rowset produced by a WITH caluse ever shared during the query execution jeopardy: Maybe; it is certainly a gizmo that I have on my list to watch how it is used and to view how it performs. One of the first things that I thought of with this was to replace all of my "iterator" tables with a view based on a CTE. That ended up being in the "no way" ca ...Show All
.NET Development Connect to Stored Procedure.
Hello, I am using Oracl as my Database system. I am not able to connect to Stored procedure written in Oracle. But at the same time it is possible with SQL Server. So what are the ways to Execute stored procedure for Oracle Can you post your code What is any error message Are you using the OracleClient classes SqlCLient classes won't work for Oracle. http://www.microsoft.com/downloads/details.aspx FamilyID=4f55d429-17dc-45ea-bfb3-076d1c052524&DisplayLang=en ...Show All
Visual Basic Setup Produced By "Build, Publish" Gives Error After I Uninstalled VB With CD And 'Removed' All Installation CD Programs
Hello, I created a setup file from my application. I did this because I want to put my application on other PCs without installing Visual Basic. I basically want to just run the applicatoin on other PCs. What I did to create the setup file was within VB I clicked "Build" then "Publish." I then wanted to test the setup file on my PC, so I removed everything given to me by the VB installation CD! So, I uninstalled VB using the installation CD. But, I also had to go to the control panel to remove some of the programs that the installation CD gave me. I did this because the uninstall via the CD left things on my system that the installation CD gave me. When I was done, the control panel, remove programs listing ...Show All
Visual Studio Express Editions Inivsible Button
Hi, Could someone tell me how to make a button that isn't seen to the user, but still can be pressed If i use button1.visible = false then you can't press it. Thanks in advance, Josh Talldude, I found a way to do this that will fit my needs, but, now I have a new similar problem. 1. If i make a label with spaces it shows up as a grey rectangle 2. To fix the buttons I just took a screenshot, edited out the parts I didn't want in Paint, then used that as a button image. 3. Now I need a TextBox that you can type in, but transparent. I'll try the image editing thing, but I don't think it will work... -Josh ...Show All
Visual Studio Express Editions Save
How do I Save a file with out calling the dialog box, at the moment I can SaveAs the file(with dialog box) but what I'm after is when you click just save it just saves the file that is opened in its original format with any alterations that have been made. The program is a cut down version of a text editor. Okay, thanx dave. But how do i use the currentfile globally The code you gave, the currentfile is in the procedure level, am i right Coz all i want is to retain the filename everytime after i click the button open in the menustrip and use it for save. If that is the code, do tell me yeah I'm a rookie in VB.. I just want to keep on learning. Coz i enjoy coding! :) //EDIT: One more thin ...Show All
SQL Server Debugging stored procedures
I have complete error handling and printing the error after every insert or update statements or after calling another procedure. But somehow when executing the proc it is not printing the error. The query analyzer shows a general message 'Query batch completed with errors' All the logic seems to be working properly, but this message is bothering me. Why is this message displayed if everything is run correctly [or] is something wrong Example: [code] /************************************************************* ** Error Handling **************************************************************/ SELECT @rowcount = @@rowcount ,@error = @@error ,@short_msg = 'Error Creating MCTM. ...Show All
Visual Basic Splitting a string
I have a textbox as and input field for a SQL database search. If the user inputs a full name (first, "space", last name) I want to split this string into two values. Is there an easy way to do this I have a string.isindex searching for a space and if there is then I need to split the two values into two different variables. Thanks for the information. try the string split function: dim theSplitSeperator() as Char = { ' ' } dim theStringSplit() as string = theInputString .Split(theSplitSeperator) ...Show All
Windows Forms Multiple Lines for DataGridView Header Text
Anybody knows how to manually break column header text (in DataGridView) into multiple lines Ex: address line 1, I would like to see "address" in one line and "line 1" in another line. If I let the program auto break it, you would see "address line" in one line and "1" in another line, which is not something I like to see. Any help or pointers are appreciated. Bo Hi, How do you set the header text, in the property grid or programmatically If it's done in the property grid, generally the '\n' or '\r\n' will show up literally. But if you set the header text programmatically,(....HeaderText = "Address\nLine 1";) it will work fine. Hope this helps. ...Show All
Visual C# My DataSet Doesn't Work :S
Hi, In my project I have one DataSet ('Step') from this I have two tables ('Students' and 'PostCode'). I have set them up in both the same way. I can successfully call Step.Students.FindBy(PK) and the function will return either null or not null depending on the results it finds, which is what it should do. However my second table I call Step.PostCode.FindBy(PK) and it always returns null no matter what is in the database. It actually returns null for everything, select, count etc. It looks to me like the dataset isn't actually connecting, even though my GridView successfully shows the content of the table I originally thought the changes weren't being committed but even when I use AcceptChanges() it still doesn't work. One thought I have ...Show All
