HugoC's Q&A profile
Smart Device Development First chance exceptions while building
My program is working but I get following information while building. A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll What to do I got this error on my first attempt to compile simple 2 line application on Vista business Dim FS As FileStream = File.Create( "C:\log.txt" , FileMode.OpenOrCreate) Dose any one have any clue what persmissions I need. I am a ...Show All
Visual C++ Ensuring symbol order in object files?
Is there a way to get the C++ compiler to generate .obj files that maintain the order of the symbols as they appeared in the .cpp file If so, is there also a way to ensure that the linker also preserves the order A simple example of the behavior I'm seeing from the compiler/linker: .cpp file contains int foo1; int foo2; int foo3; int foo4; when I dump the symbols from the .obj file I get this 00B 0000000C SECT3 notype External | foo3@@3HA (int foo3) 00C 00000008 SECT3 notype External | foo4@@3HA ...Show All
Windows Forms Exception Handling
A Try-Catch block in 'OnThreadException' does not execute the 'Catch'. Instead an unhandled exception 'Send Report' dialog pops up. What am I missing or doing wrong The code looks like this: static void OnThreadException( object sender, ThreadExceptionEventArgs t){ try { Exception e = t.Exception; string message = e.Message; if (e.InnerException != null ) message += Environment .NewLine + Environment .NewLine; while (e.InnerException != null ) { message += e.InnerException.Message + Environment .NewLine; e = e.InnerException; } MessageBox .Show(message, "Application Error" , ...Show All
Visual C# How can I make the IDE create correct code?
I implement a component, but I can't get it's paraent (a control which contain the component). So I want to get the paraent from constructor's parameter. But the IDE can't create corrent code for my new constructor. How can I make the IDE create correct code I want to let the IDE automatic create the correct code, because I want to get the paraent in Design Time mode. example: The illegal code: # region Component Designer generated code /// <summary> /// Required method for D ...Show All
Visual Studio Report: Prevent textboxes from moving
I created a report that has a table and some textboxes. I need the table and textboxes to be in a specific location on the report. The table varies between 1 and 6 rows. This causes a problem because the textboxes below the table move according to how many rows on in the table. Does anyone have any suggestions on how I can prevent the textboxes from moving location Thanks, Marc I found a solution.... I had one report where the table did not cause the textboxes to change location and another report where the table changed the textboxes location. I opened the .rdlc file in notepad and ...Show All
Visual Studio XMI and Design Patterns
Hi, A model (Class Diagrams) is exported to XMI format. Now,in the class diagrams,each class is stereotyped to follow a design pattern say Observer Pattern (take 4 classes are participating in a single Observer Pattern). If there are 2 or 3 sets of classes (i.e. there will be 8 or 12 classes) which follow Observer Pattern within the same XMI file then how can we know which class is related to which other 3 classes (Say in set 1, class c1 is related to c2,c3,c4 but not related to other sets). I intially thought of using the relationships between the classes (association, generalization/specialization,dependency,interface implementati ...Show All
Visual C++ using DLLs
After I maked a DLL for example d.dll and I added to new project,when I want to declare a type from that namespace for example d::someclass *new_type = new someclass () ; the compiler generate this error: error C2871: 'd' : a namespace with this name does not exist how can i correct that error ( for add a DLL to a project i select references > add from solution Explorer and choose a DLL file ) thaks Is someclass actually declared under the d namespace or is it just within the d dll. Try accessing someclass without the d:: qualifier. ...Show All
SQL Server SQL authentication traffic for Mixed mode
Hello, SQL server 2000 authentication mode has to be set as mixed mode because the application - called Great Plains has to do that way for some legacy reson. I am wondering whether the authentication connection strings destined to SQL server for authentication will be encrypted(not in clear text) because it inclues the user credentials. Thanks for your comments here. certificate configured by a user is the one which is installed on SQLServer box. Perhaps description from BOL will explain things better Thanks, Ruslan Configuring SSL for SQL Server To configure SSL, first install a certificate on the Databa ...Show All
Visual C# RTM Web refactoring... Serious problems!!
I am amazed that the refactoring support in VS2005 is in this state. It is utterly useless. How can they claim to have Refactoring support for web projects I have a Solution that contains one web project and two library projects. It is NOT a complicated solution (~150 .cs files and maybe 100 .aspx and .ascx skin files). And when I try to use ANY of the refactoring tools that have been provided in Visual Studio 2005, it takes an eternity (over 2 minutes) and I normally give up on it... This includes, Find References, Rename, etc... No matter what I do, it iterates through EVERY aspx file in the web project ! ! I choose a method and selec ...Show All
Visual Studio Express Editions XML...add new XML elements to existing document
I asked this earlier, but didn't get an answer. I'd really like to figure this out. It seems like it shouldn't be too hard to do. I'm making an application to keep track of recipes. I'm able to add two recipes, but when I add a third, it overwrites the last one in the file with the new one I'm adding. Can anyone give me any suggestions on how to do this Here's my code. Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click Dim newdoc As Xml.XmlDataDocument Dim olddoc As New Xml.XmlDocument Dim xtwcurrent As Xml.XmlTextWriter xtwcurrent = New Xml.XmlTextWriter("C:\recipe\ ...Show All
.NET Development ConnectionString
Hello, I have a connection string in my config file, that I use to connect to SQL server. But it requires the password. How can I add this sensitive data to the connection string in my application. Thank you. Place your connection string in web.config and encrypt it in place . Microsoft details it here in the section entitled "Step 3. Encrypt Your Configuration File Data" ...Show All
SQL Server Meta Data Management / Dependancy Analysis
BI perspective, meta data management is quite crucial. In SQL 2000, as far as I know we didn't have a great support for meta data. Has that changed in SQL2005 What about dependancy analysis For example if I drop a column from a SSIS data flow what would be affected Is it possible Thanks Jamie As you say someone will come up with something soon. It is going to be a valuable tool. Clients enquire this type feature when we try to sell MS DW solution to them. Maybe Darren and Allan can come up with something hint hint :-) Thanks Sutha PS - Jamie, I haven't done that mail yet ...Show All
Windows Forms Is there a way to use a Web UserControl (.ascx) as the body of an email
I know that this can be done in ASP .NET I was wondering if there was a way to use a Web UserControl (.ascx) as the body of an email, to send html template based emails though a console/winforms application. The LoadControl method fails to load the ascx file in a console/winforms app. Is there an alternative way of creating pre-defined HTML templ ...Show All
Visual Studio Express Editions Create a TableLayoutPanel at Run Time
I’d like to create a TableLayoutPanel at Run Time. I have been successful in creating the panel, but I have not been able to program the height and width of the cells. The code snippet below shows what I am attempting to do. I have commented out those statements that are not working to show what I have tried. I attempted to anchor the TableLayoutPanel to the left and right side of the form. Because these had no effect, I set the table width equal to the form width. I made a couple of attempts to set column(0)’s width, but these gave me run time errors. I obviously don’t understand how to format the TableLayoutPanel and those ...Show All
SQL Server logging the DDL stmts
Hi : I am using .cmd files to execute .sql files. sqlcmd is used in .cmd files to execute the .sql stmts. In .cmd file the sqlcmd line of code is as follows: sqlcmd -i .\..\..\sql\tables\create_employee_table.sql In .sql file the ddl stmt is as follows: CREATE TABLE [Employee]( [EmployeeID] [int] IDENTITY(1,1) NOT NULL, [NationalIDNumber] [nvarchar](15) COLLATE Latin1_General_CS_AI NOT NULL, [ContactID] [int] NOT NULL, [LoginID] [nvarchar](256) COLLATE Latin1_General_CS_AI NOT NULL, [ManagerID] [int] NULL, DF_Employee_rowguid] DEFAULT (newid()), [ModifiedDate] [datetime] NOT NULL CONSTRAINT CONSTRAINT [PK_Employee_EmployeeI ...Show All
