Anton Papst's Q&A profile
SQL Server Rowcount - Returning Rowcount from SSIS to a vb.net app executing the dtsx package
I have a vb.net application that executes a simple flat file to sql table dtsx package. I want to capture the rowcount to display back to the user to verify the number of rows that were inserted or updated to the table. I have a Row Count component placed between the flat file source(without errors) and the destination component. I have assigned a variable named RecordCount to the Row Count component. So far so good I hope : ) Now, I also use a variable to "feed" the package the flat file source. This works fine, but I cannot figure out how to retrieve the row count information and how to assign that to the variable RecordCount. Also, if anyone has any insight on the way to work with the OnProgress method in SSIS I would a ...Show All
Visual C# converting a string to date
I have a string that contains the a date in the format of "dd/mm/yyyy". I want to convert this to a datetime MyDate Can anyone show me the best way of doing this. Try this .sudetail .SuppF12 = Convert .ToDateTime (cRow [11] as string); I'm not sure what cRow is but ToString doesn't really convert one type of thing to another type of thing. Exactly what ToString() does is up to the maker of the class. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. MDX -> XNA: AlphaOperation is here, but what about AlphaArgument?
I'm converting from MDX to XNA and want to be able to control the alpha of an object through its vertices. I see that there's an AlphaOperation property in the RenderState, but what does the AlphaOperation operate on I don't see any AlphaArguments like there were in MDX, so I'm a little lost here. Thanks in advance. My XNA and MDX documentation seem to overlap, so I'm not 100% sure if this is accurate. I think the operation in the RenderState you're referring to is the AlphaBlendOperation, which controls how blending works globally. The alpha arguments you want (and the operation for that matter) used to be set on the device.TextureStates collection in MDX. This collection is no longer available on XNA's GraphicsDevice, ...Show All
Architecture DLL expertise
Is there a book or consolidated web resource that provides advanced details of DLLs Some of the things I want to study in depth: 1) binding an executable to a specific version of DLL (that is, to resolve the addresses of imported functions at compile-time). 2) pre-mapping of DLLs to different fixed addresses. 3) relocating DLL code, as it is loaded from disk, can make it potentially non-shareable between processes. What exactly causes this 4) Can a DLL referenced in C++ code with #import be either explicitly or implicitly linked, or does it only permit implicit 5) In C++, when is it appropriate to use "#import" My own guess, regarding question 5, is that #import has two purposes: 1) To allow the registry to ...Show All
Windows Forms DataGridView Column problem ...HELP
Hello, I have a DataGridView in a form on which i display data returned from a Search query. After the data are filled in the datagrid view, i add programmatically a button column. This so far works just fine. The problem is the following: if i perform another search query which returns different columns, the button column remains in the datagridview. Is there a way for this button column not to be included in the datagridview, when i change search queries. Thank you. dim cName as string = "Test" Me .DataGridView1.Columns.Contains( cName ) ...Show All
SQL Server What is Best way to Count the number of records in a table - Sql Server 2005
I have a table with 54 million records But it take lot of time when i am using Count(*) or Count (ColumnName). What is best way to Count the records in Sql server 2005 Regards Vasanth Do you have a clustered index Is it reasonable narrow If so, SQL Server will just count the index instead of the table. That's the simple answer.Here's the interesting aswer: Create a materialzed view on SELECT COUNT(*) on the table. Materialized views maintain the result data and change it whenever the underlying data changes. So you could go from 5 minutes for a table scan down to a microsecond reading the materialized view. The drawback is that insert performance will be affected. ...Show All
.NET Development SqlDependency and which rows actually changed?
I have a question about SqlDependency. When using the SqlDependency class to get a notification of a change to a table, what is the best way to actually find out what data has changed Is this even possible We are working on a stock trading system in which stocks are valued based upon notifications in the changes of the price, quantity, etc. Any light that you could shed would be helpful! Thanks a ton! Ryan Heaney rheaney@sgfallc.com Hi rheaney, You got any solutions of your problems. I am very crezzy to find out solutions because my project is also related to Stock Trading and i also faced that problem,but i couldn't find solutions so i removed that logic and bind my tradin ...Show All
Visual C++ Summary of types in Visual C++
Is there a cheat sheat somewhere that summarizes all of the various types in Visual C++ I am most familiar with standard C programming (e.g. char, int, etc.), and there are all of these Microsoft specific types in the language, and it's hard to find information on them. Thank you. What do you mean by "all the various types" - the type system in C++ is opened ended. For types that are authored by Microsoft then msdn.microsoft.com is a good reference point. ...Show All
Visual Studio Defining custom multiplicities
Hi all I need to define an embedding relationship between ClassA and ClassB that has a multiplicity 0..3, so that ClassA cannot contain more than 3 ClassB instances. It seems like this is not possible (I am using the June CTP). I can only select the predefined multiplicities, but not define one myself. Is this so, or is there a way to define other multiplicities I could solve the problem by setting up a rule restraining the number of ClassB instances to 3, but this doesn’t seem like an optimal solution since the multiplicity would not be visible when studying the domain model. Thanks, Louise You could also set an rule on the relationship between the two classes or on the attribute ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Recommended books for those of us getting started...?
I'm really getting excited about this whole XNA Game Studio and Xbox 360 Creators Club thing. I have always been interested in game design and development and this is exactly what I need to get my feet wet. Can anyone recommend some books to me I have never programmed in C# before, although I do have experience with other OO languages (mostly Java, a little C++, even less Objective-C) and I am also very familiar with good ol' ANSI C. So a C# language book is recommended. I'd also need books on the various API's involved (XNA DirectX whatever) as well as a book about game programming in general. Sorry for the "newbieness" of this question, and thanks in advance for your suggestions. I can help ...Show All
Visual C# Exchange data between two applications
I'm looking for a way to exchange data between two applications running on the same system, one in Delphi and the other in C# ( in the future the one in C# will become dll assembly in SQL Server 2005) What I rejected: - extern files, - shared memory (it needs kernel32.dll to be imported ) - MS Message Queue (default Windows installation has no msmq) I thought about using pipes or sockets, but sockets need separate listening-thread... I'm looking for better idea. Any suggestions Sorry for my english.. Regards KonRi i Think the easiest way is to use the network. there are hundreds of already written class . and its a 5 min implementation. i dont really know the impact in th ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Making Properties editable in the Properties Window
Hello everyone, I created a new GameComponent which has a XNA.Framework.Rectangle as a property. I added one of these objects to my Game instance, but can't edit the Rectangle property (it is grayed out). How can I write a property (or class) in a way that would make it editable in the Property Window One solution I found was to make a number of Int properties that redirect to be member variables of the Rectangle. This is a bit clunky, though. I would like to be able to expand and edit the Rectangle property instead. It is not specifically Rectangle that I am interested in, as I would also like to make classes that I have created be able to be edited as properties as well. Does anyone know how I can do this Are there any tutorials out the ...Show All
SQL Server Migrate AS2005 Cube to New Version of Source DB
Is it possible -- and how straightforward is it -- to migrate an existing AS2005 Cube (and/or at least it's dimensions) to an updated version of my source DB (SQL 2005) I had little choice but to establish a "dev-and-test" version of the source DB during enhancements that coincided with production analysis and reporting. Now that I've approved the "dev-and-test" version, I want to make it our production master for OLAP. As a note, I don't believe that any of the fields used in the cube have been modified. We've just added some new calculated fields (and sp's). I have little idea of whether this will be simple, hard or impossible. I'm planning to try, but wanted expert feedback first. ...Show All
Visual Studio Express Editions Drawing in PictureBox
Hi All, how can I draw 2 dots or rather points with the mouse inside a picturebox and in turn link them up with a line. What Systems should I import into the code area Pls advice. Many Thanks You will need to import the system.Drawing namespace and use the pictureboxes mouse click events to draw the points...you can then use Graphics.DrawEllipse to draw your points...and then use Graphics.DrawLine to connect the two points ...Show All
.NET Development SourceTable and SourceField
Hi I'm upgrading my code based on DAO to ADO.NET in VB2005 and got stuck looking for SourceTable and SourceField properties of DataTable fields. DAO.Recordset.Fields have .SourceTable and .SourceField properties which tell you the original table/field which provides the data in that particular field of the recordset. This is useful in my application where I am filtering users' queries to the database to see whether I want to allow them access to that particular bit of data. Although I can imagine that there are maybe other solutions to security issues, I've already built a whole system around this method, and would like for simplicity's sake just upgrade it without changing the methodology. Can anyone advise where to g ...Show All
