CECOOK's Q&A profile
Software Development for Windows Vista Cannot build assembly with COM interop, VS2005 + Vista beta 2
When I build an assembly using msbuild that has COM Interop, msbuild fails in the UnManagedRegistration target. c:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(2720,9): error MSB3216: Cannot register assembly <assemble name> - access denied. Access to the registry key 'HKEY_CLASSES_ROOT\<com class name>' is denied. I am running msbuild using an user with Administrator permissions. The OS is still set to request the user for elevated permissions. u need actually to start a cmd in Vista using 'run as' administrator, before this will happen. Its not enough that your user has adm. priviledges. ...Show All
SQL Server create a flat file on a remote server
Hi, In the new flat file connection dialog box, can i create a flat file on a remote server thanks. Yes, if you can access that server through a network share. Try using the UNC path, e.g. \\ServerName\ShareName\Folder\File.txt \\DGPC\C$\Temp\File.txt ...Show All
.NET Development insert row into table with autoincrement primary key
I have a table in a dataset with a column being autoincrement and primary key. My question is: How do i insert rows into this table been using DataRow Row = Table.NewRow(); and then setting fields and Table.Rows.Add(Row); But if i don't set a value for the id column it won't let me insert the row. Shouldn't the id column be updated automatically One thing you will want to do is set the autoincrement property to -1. this will insure a unique Key when your update is performed on the database. For example If I do a filtered read and it returns the IDs 1, 2, and 3. The data set will auto increment 4. When I do this write to the database if there is an ID of 4 you will get an exception. The big question is why ...Show All
.NET Development XML, Excel, VB.NET and some guidance ...
Hello, Is the a way i can acomplish these tasks : a. Within a windows form, open an xml document ( i use spreadsheet 10.0 com object ) from a specified location , b. Save it, also as xml, but somehow index it, so when i open it ( just like point {a} ) not to use the absolut path of the file ( C:\ Documents \ ... ) but rather this index. I chose this approach because the environment i work in is not organised, files are often moved, and so on. Also, for this i was thinking to create a service based on the fileSystemWatcher events ( changed, moved, etc ). I observed that class is able to determine, in case of a moved file, the new location. Please, if someone could help me, i would really appreciate it ! P.S. I promise to r ...Show All
Visual C# Best way of returning an image based on a string
Part real-world issue, part idle curiosity, this. I'm adding a static class to my project which will provide little images from the resources based on a string value -- specifically, a Type name from the various business objects -- to be displayed on tabs, list-views, that sort of thing. Anyway, it's currently implemented via a big ol' switch statement, thus: switch (typeName) { case "CompanyDataSet.Contact": case "PersonDataSet.Contact": case "CompanyDataSet.ContactDataTable": case "PersonDataSet.ContactDataTable": if (imageState == ImageState.Disabled) { &nbs ...Show All
.NET Development receive in different thread Cause troubles
hi, i wrote a class to send and receive data from a server, i intiate the receive method in a separated thread , when packet arrive i raise event, in the other class i consume it, so i have 2 questions 1. some times the server send packets too fast, and that cause trouble in reading data for the consumer class. some one suggested to use a delegate , for that i raise the event through a delegate but still cuase troubles, so what i suppose to do for that 2. i'm using the lock(this) keyword with the consumer method and thread.sleep() in the receiver now but i'm afraid this might cause losing some packets i thought to use delegate like winForm controls to make it thread safe by invoke it, but i don't know how to write this method ...Show All
SQL Server Business Intelligence Development Studio - Missing Feature
I am trying to use the Foreach Loop Container. When I open the container for edit on the Collection page, the Foreach Item and Foreach File enumerators are not listed in the drop down. I have installed SQL Server 2005 Developer Edition. If there something else I need to install I appreciate any help provided Jeff Check if you are affected by issue discussed in this KB: http://support.microsoft.com/default.aspx/kb/913817 ...Show All
Windows Forms How to get or read the last letter from a text box? - Vb.net or VS 2005
Hi I have a TextBox in a windows form to enter 10 digit number followed by 2 letters. (Ex: 304528929 GH ) I have a code (got from my other thread) to calculate the total of the above digits(3+0+4+....) and dividing the total by someother value to get the reminder . IT ALL WORKS FINE Also I have list of alphabets with equivalant value like below A = 3 B = 7 C = 1 H = 12 ........ ........ Z = 22 My question: If the reminder matches one of the above list , for example reminder from the above calculation is 12. So it matches with H = 12 . So If H is the last letter of 304528929 GH , then the user input is right. In Short : HOW DO I GET THE LAST LETTER (ex. 'H' in the above case) From the textbox and check w ...Show All
Visual Studio Tools for Office Range.InsertBreak generates exception
Hi All, I'm inserting a break in a Word 2003 document which has some XML tags. It works fine for most of the documents but errors out for some documents where the XML tags are placed haphazardly i.e. not in an orderly manner. The exception that is generated is as follows: "this method or property is not available because the current selection is outside of a block-level element" I get a COM exception when I try range.InlineShapes.AddPicture for the same document. However, im able to do some calls like range.paragraphalignment. Can anyone give me pointers TIA Pavan Hi Pavan If you're asking WHY this is occurring with some commands and not with others, it's because some are just format ...Show All
SQL Server How do I obtain the log file for a DTSX?
Hi everyone, I'm stuck with this silly thing but I haven't idea how to obtain the path for the log file specified in a SSIS package programatically. This snippet of code works fine: Dim pkg As New Microsoft.SqlServer.Dts.Runtime.Package Dim app As New Microsoft.SqlServer.Dts.Runtime.Application Dim pkgResults As DTSExecResult pkgLocation = "C:\Documents and Settings\40990880\Mis documentos\Visual Studio 2005\Projects\Proyecto de SSIS3\Proyecto de SSIS3\ProvaPrimera.dtsx" pkg = app.LoadPackage(pkgLocation, Nothing ) pkgResults = pkg.Execute() After execution I'd like to see the log file which is allocated in the same place than DTSX file. But how Using pkg.LogProviders.Item(0). ...Show All
Visual Studio 2008 (Pre-release) XAML Browser Applications - Do they need .NET to be installed in the client machine?
I want to develop a XAML application for my users to use through their browsers. Do they have to install .NET Framework on their computers What if I am designing a public website (say, web-site for a retail shop), how will .NET 3.0 help me develop the UI. Note: I am not talking about the back end or web-service design stuff here. just the UI experience Thanks Chad, The links you have provided are useful. Specially the comparison between "WPF", "XBAPs" and "WPF/E". ...Show All
Visual Studio Express Editions Visual C++ Express - can I compile a C code too?
I installed the MS Visual C++ Express. I have an existing C code. How do I create a C project for this If I can't do it, is there another MS Express that will enable me to do it Hi Where do you see "Project" and also "Properties" in the Visual C++ Express Edition. I see "File->New->Project". Pls clarify ...Show All
Visual C# Generic Multi-Dimensional Arrays Comparison
Hi, I need to compare multi-dimensional arrays in a function which takes 2 multi-dim arrays which can be any type(int, double, bool...etc). Comparison is done by Object.Equals() of each value in each index of the arrays. As a result, Generic and Multi-Dimensional is what I need to combine. Any idea I compare 1 Dimensional-arrays with the below code of mine: public static bool AreArraysEqualByVal<T>( IList <T> src, IList <T> dest) { if (src == null || dest == null ) throw new ArgumentNullException ( "source or destination array is null." ); if (src.Count != dest.Count) { Debug .WriteLine( "Array lengths were not equal." ...Show All
.NET Development Navigating XML with C#
Hello, I want to be able to go up and down the XML once I find the data element I'm looking for and retrieve it's associated data in other nodes of the tree. This is a TV lisings XML data set and here's a very small portion of it. < < xml version="1.0" > - <xtvd> - <schedules> <schedule program="EP0019520018" station="16123" time="2006-12-18T09:00:00Z" duration="PT00H30M" tvRating="TV-G" /> </schedules> - <programs> - <program id="EP0019520018"> <title>Green Acres</title> <subtitle>Oh, Promise Me</subtitle> <description>An error may mean Oliver and Lisa are not married.</description& ...Show All
Visual C++ /clr Error
// compile with: /clr #ifdef _MANAGED public ref class A { public: static void foobar(); // error C3280 }; #endif I compile the above in Visual Studio C++ 2005 with /clr and get error C3280. The documentation says if the /clr switch is set, it should compile as managed. error C3280: 'OSAPI::Net::Event::foobar' : a member-function of a managed type cannot be compiled as an unmanaged function So, why is a declaration in a compile unit that is built using managed code see this as compiling an unmanaged function Also, when the documentation says function, does the definition of function include method declarations I would say term "function" includes "member method declarations". ...Show All
