andrew jones14's Q&A profile
.NET Development How to call a static function automatically?
Hi, I have seen this before in a reference book, but now I can't find the syntax again, I have searched the forums and the web to no avail... How can I automatically call a static function What I mean is this: class foo { static Bar(); } How can I have Bar() called automatically I can rig it like this: class foo { static bool tmp = Bar(); static bool Bar(); } How can I accomplish this without this 'hack' Also, could someone please fill me in on when exactly this function is called Is it non-determinable like initializing a static variable in C++ Thanks If you only need one " ...Show All
Visual Studio Team System Branch from a label - why didn't this work?
I have a semi-automated build process that's building my product and labelling the main branch at each build. For example, I have a label: AFF-20060706-0043@$/Development/Products/ProductName/Main Now, I want to create a "1.0" branch for this product so I can proceed with development of v.Next features. So I selected the $/Development/.../Main folder, right-clicked & chose Branch... In the dialog, I chose Label as the branch-from version, then chose the above label from the find label dialog. When I attempt to perform the branch though, I get an error: No items match $/Development/.../Main in the label AFF-20060706-0043@$/Development/.../Main Huh If I examine that label in the Find Label dialog, I can c ...Show All
Visual C++ How to minimize / hide GUI app so no window appears or flashes
I have an existing MFC app that I have had to modify to make it support unattended command line invocation. One of the requests is that when running in command line mode they don't want any windows to appear. I'm hoping they are willing to live with an icon in the TaskBar, although if I could get rid of that too it would be great. So far I can (almost) keep any windows from showing if I call pMainFrame->ShowWindow(SW_SHOWMINIMIZED) somewhere in MyApp::InitInstance after the call to ProcessShellCommand. But the main window flashes its outline for a fraction of a second. I'm trying to prevent ANY window from showing. I tried setting the main window's style to WS_MINIMIZE | WS_DISABLED and clearing the WS_VISIBLE bit in ...Show All
SQL Server Absolute Beginner in SQL 2005 EE, needs help.
Hi everyone. Using C# 2005 EE with SQL 2005 EE I am really new to SQL, got qns here. Can my program with SQL database run correctly on another com using win xp home edition, with only C# 2005 EE installed Is it compulsory for every table in a database to have a primary key Can I extract a data from a specific cell in a database table(click button get data) How do I go about doing it (the simplest n straight forward method) Many Thanks in advance. Regards, dragoncells. It slipped my mind that you are the moderator, lol. Suggestions: Images: Currently cannot post picture, a picture tells a thousand words. Add in a section for discussion of popular third party components(e ...Show All
.NET Development OLEDB + SQL
I'm importing an excel worksheet into SQL Server VIA a Import Procedure i created in VB.NET (2003). The excel worksheet's first column has a mix of Integers and Strings. When I populate the datagrid (which i'm using for testing purposes to preview the data before it is entered into the SQL Server Database), I see the Strings, but I don't see the integers. the strings are int he format of "M00000" and the integers are in the format of "000000". What would be the reasoning to this and is there a way to fix it Things I've tried: Converting and Casting dlgOpenExcel.FileName = "" dlgOpenExcel.ShowDialog() strFileName = dlgOpenExcel.FileName If strFileName = "" ...Show All
SQL Server Sharing Dimensions
I'm trying to share a few dimensions between two cubes so when I'm on the cube wizard building the second cube, I don't check the shared dimensions as new dimensions, but I select them afterwards when the wizard asks me to choose the shared dimensions. Until here, everything shoul be just fine, but when the wizard finishes I can't see the shared dimensions on my cube... do I have to build the same dimension twice with a diferent name (eg. DimCustomer - DimCustomer1) Hello. If this is SSAS2005! Go to the dimension usage tab, in the cube editor, in the BI-Dev Studio. Righ click on the dimensions, in the window down to left, a choose add dimension. You can also right click on the dimensions where you ...Show All
Visual Studio Custom build
Hi, I am trying to write a custom build step where c# code is generated to implement an interface specified in a different .cs file and then compiled into the same assembly. I followed the example described in http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=238441&SiteID=1 but this doesn't quite work when the generated .cs file is built into the same assembly. When I add a new method to myInterface.cs, the implementation gets generated ok but I get the error that my class does not implement the new interface member - If I build the project a second time it works ok. To clarify, I have myFile.cs interface IFoo partial class Foo : IFoo and I want to generate myFile.implementation.cs that contains the ...Show All
.NET Development Declaring an Event in a class causes memory leak?
I think this one is for gurus. I am creating a class with an Event, then I instantiate the class and dispose of it. VB seems to be wasting 16 bytes each time. Any help I'm desperate!! Example Class: Public Class Myclass Public Event Status(ByVal pText As String) Public Sub New() End Sub Protected Overrides Sub Finalize() MyBase.Finalize() End Sub End Class Example Form That Instantiates / Clears the class This form only requires a textbox (multiline / accepts return) and a button. Imports System.Threading Public Class Form3 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim LClass As New LeakingClass LClass = Nothing End Sub Private Sub Form3_Load(ByVal se ...Show All
Visual Studio 2008 (Pre-release) Porblem with Certificate validation
Hi i have a service and client that uses certificate to validate the identity. when the client takes to the service i get the following error at the service side. The X.509 certificate CN=www.fabrikam.com, O=Fabrikam, L=Redmond, S=Washington, C=US chain building failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. The revocation function was unable to check revocation because the revocation server was offline. My Client App file is <endpoint address=" http://localhost:8000/Bancassurance/Authentication/Service " binding="wsFederationHttpBinding" bindingConfiguration="WSFederationHttpBinding_IAuthen ...Show All
Visual C++ .dll entry point
Hi folks, I've been porting my code over to VS 2005 from VS 2002, and have been confronted with what appears to be a new addition that has me stumped. I'm compiling .dll's and am getting errors when attempting to use them along the lines of: "The procedure entry point _encoded_null could not be located in the dynamic link library MSVCR80.dll" Now, MSVCR80.dll exists (I had to put it on the machine myself, though), so I figure this leads back to the linker in VS 2005. I've noticed a new option referring to Entry Point and also the ability to set the /NOENTRY switch. I've not specified an Entry Point, and nor have I specified the /NOENTRY switch. Obviously this probably explains what I am seeing, right Not specified an entry point. ...Show All
Visual Studio Express Editions Adding an sql connection to vb express
Hi, I was using sql express with vb express edition. Everything was fine. I removed sql express and installed sql server 2005. Now when try to add a connection from database explorer I get an error: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) I checked it was allowing for remote connections. I also checked in advanced tab of add connection ./MSSQLSERVER instead of ./SQLEXPRESS but i still get this error. But I'm not sure if it saves that options because when I rec ...Show All
Visual C++ Which One(Managed C++ or Native C++)
Hi everybody i am starting a new project and i ma in doubt about my programming language, should i use native c++ managed c++. i should use following thing in my project: wlan communication. direct input. direct show ( previewing) direct sound (capture wave) using usb. so know please tell me which one give me more freedom to do my project. Core c++! On the other hand, your choice is dependent on software plan and time you want to spend coding. In both cases though I think Windows offers the API for media and communications both managed and core. valikac ...Show All
Visual Basic 2005 IDE Service Pack/Patch ???
Will there be a service pack or set of patches soon for the Visual Basic/Visual Studio IDE soon I've been sending the bug reports everytime a bug/crash occurs in the IDE and I'm hoping these help. What adverse publicity Start at http://minimsft.blogspot.com/2005/11/hey-shareholders-vs-2005-is-fantastic.html and follow the links. I think you'll get the idea. For my own part, I've found that a small project on 2005 works OK, but get anywhere near a real life application and problems increase exponentially, mostly due to a complete lack of understanding of Fusion and the interaction between loaded modules. ...Show All
.NET Development Remote running
Hi, is it possible to run an VS2005 application which lies on a server Because I've tried to but I've couldn't make it work. Thanks. Yes you can. With click once deployment, or simply by running the application from its location. http://msdn2.microsoft.com/en-us/library/wh45kb66.aspx http://msdn.microsoft.com/library/default.asp url=/library/en-us/dv_vstechart/html/vbcodeaccess.asp ...Show All
Visual Studio Team System Custom Policy for Non-C# Code
Our project is currently using TFS for some .NET based projects. We will soon be starting new projects using other technologies, such as Oracle PL/SQL, Java, HTML,etc. We will continue using a single tool for our source code control, i.e. TFS, even though some of the new projects will be developed by tools other than Visual Studio. We would like to make use of the code analysis policy to verify the quality of code being checked-in. However the existing code analysis policy is for C/C# code. My questions: (1) Are there existing policies developed for other languages, e.g. HTML, Javascript, PL/SQL, etc (2) If not, how does one go about developing these policies Thanks, Si. Mario, I think he's asking about ...Show All
