AnandAsir's Q&A profile
Visual C# Does c# transaction include SQL After trigger?
I performs a series of update/insert actions in with a c# transaction. Some of the actions have AFTER trigger in the SQL database. I have the following questions: 1. If one of the trigger fail, would it cause the transaction to rollback all actions 2. If one of the action fail, would the transaction rollback all trigger also Thanks If you are talking about a SqlTransaction object then yes on all accounts. SQL will basically make the changes temporarily to the tables and run the triggers as normal. Only if no errors occur does it effectively save the changes to the underlying DB tables.  ...Show All
Visual C# Deleting objects
I'm using a treeview and it points to a Employee class so I can display info about the employee selected. Here are some code snips. Classes: public interface AbstractEmployee public class Employee : AbstractEmployee class EmpNode : TreeNode { private AbstractEmployee _emp; public EmpNode( AbstractEmployee aemp) : base (emp.getName()) { _emp = aemp; } public AbstractEmployee getEmployee(){ return ...Show All
Windows Forms right mouse click on treeview
can anyone show me how to display a context menu after a right mouse click on a specific node. This is what i have been able to acheive so far If e.Button = MouseButtons.Right Then TreeView1.SelectedNode = TreeView1.GetNodeAt(e.X, e.Y) If TreeView1.SelectedNode.Text = "Categories" Then ...Show All
SQL Server Can we encrypt a report in reporting services?
Can we encrypt a report in reporting services thanks in advance Hi Chandra, At what point do you want to encrypt the report The actual renderered report The report definition The data that makes up the report Reporting Services does not have special encryption for a renderered report. Instead, the technologies that RS uses have built in encryption. SQL Server, IIS with SSL, File shares where a report may be stored, encrypted email, etc... ...Show All
Visual C# Tabcontrol.tag
textBox1.Text = TabControl1.SelectedTab.Tag; That code doesnt work for some reason, could someone please tell what the working code is ".Tag" is a field that all controls have, into which you can place a reference to any object - it isn't the text for a tab. What you want is SelectedTab.Text, I think. ...Show All
Visual C++ StackOverflowException in Managed C++ wrapper
Hello, I have some C++ code in a dll and I wrote a .NET wrapper for it with MC++. In the managed class I have a handle to the C++ code: public __gc class NInfoCmdClntCLR { private: ClsNInfoCmdClient *native; public: // ... } I also declared the ClsNInfoCmdClient class as follows: class ClsNInfoCmdClient : public NInfoCmdClient { public: // constructor and destructor ClsNInfoCmdClient() {} ~ClsNInfoCmdClient() {} // implementation of virtual methods in parent class void NiccCmdStateChanged( NiccCmdState eNiccCmdState ) { NInfoCmdClntDLL::RaiseStateChangedEvent( eNiccCmdState ); } void NiccNotifyError( strin ...Show All
Visual C# Using a C# dll in VB6
Hi, I would like to know if it is possible to use a dll that has been created in C#, in Visual Basic 6.0. If so it would be great if you could let me know how I can make this possible. Thanks & Regards, Frenz Yep! it's possible... You just have to create your C# class and compile it to a dll, then use regasm.exe for assembly registration and typelib generation... regasm YourAssembly.dll /tlb:YourAssembly.tlb This command makes the appropriate registry entries and generates a typelib (.tlb) from the .NET assembly so that it can be referenced from VB 6 and just use the referenced library just as y ...Show All
Windows Forms Databinding with ComboBox Lookup
I have a customer form that is databound to my customers table. I have it set up where I can change the record position forward or backwards one record, however, I would also like to have a Combox box at the top of the form with all the customers names in it to allow the user to immediately jump to that customer record. How would&n ...Show All
SQL Server What is the ADO DataType for nVarchAR(max)
I can't seem to get nvarchar(max) to work with ADO 2.8 using sql native client. I am creating a stored procedure and every time i attempt to add a parameter to the command object of type nVarChar(max) I receive the error "Parameter object is improperly defined" here is the code to add the parameter cmd.Parameters.Append cmd.createparameter(@piComments,adLongVarWChar,adparaminput,,me.comments) adLongVarWChar is the ado data type i am using to map to the new nVarChar(max) but it does not appear to be working. Is this supported in ADO I am using the sql native client connection to connect to the database as foll ...Show All
Smart Device Development XML Programming on Pocket PC
Please tell me ways to program application on Pocket PC by .NET Compact Framework, I can navigate XML Data by clicking buttons First, Previous, Next, Last to view XML record. Thanks for your help I already have - link above contains full source code at the bottom of the page, please check it out. If you need more, please see this: http://www.google.com/search hl=en&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=XML+Compact+Framework+sample&spell=1 ...Show All
Windows Forms is there any way to force a control to receive focus?
i have a custom control inherited from panel and i need to be able to handle Enter/Leave events for it..any idears First off, yes, nested controls should raise Enter and Leave events all the way up the parent hierarchy. If this isn't working for a given scenario, it is a bug. Secondly, in your drag scenario, you would want to h ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Meshes intersection
There is one method in DirectX API to try intersection between meshes . All functions I see are for mesh and ray combination. If not I'd like to know one good method. The problem with including generalized collision detection is that different games will need to emphasize/deemphasize different things. For example, does the game take place indoor or outdoor Is it a flight simulator, a shooter, a strategy, an RPG, an adventure, or a racing game Each of these have different requirements from their collision detection library. The basic algorithms for collision detection are well known ...Show All
Visual Basic update the form details of vb express edition in ms access2003
Hii m8s can u guide me in updating details of vbexpress2005 form in msacess2003 table am not sure whether this is the right place to post this question so excuse me if it is not the right place and direct me to the right forum thnks in advance bye Possibly this isn't the place to post. I'm unsure because I'm not clear on what you are asking. Please read the suggestions at the top of the forum on how to get the best out of your request. I hope that will assist you in the formulation of your question. Thank you and may you receive the assistance you need! :) ...Show All
Visual C# How to have my webcontrols come with images in them
Hi people, I would like to create a webcontrol that has its own icons built into it (basically, the images go with the code as a single file). I thought that a resource file would do the trick but the compiler complains about converting system.drawing.bitmap to system.web.ui.webcontrol.image. Any suggestions/ideas Thank you very much! You can just add the images to your project and set the build action to embedded resource. A great blogpot of Drew you can find here: Deploying Images with Custom ASP.NET Controls . ...Show All
Visual Basic CREATING MODULES
I AM TRYING TO USE A MODULE TO CALL SEVERAL FORMS IN VB2005 EXPRESS. THE PROGRAM LOOKS LIKE THIS: MODULE MODULE1 DIM form1 As New Form1 DIM form2 As New Form2 Sub Main() MsgBox( " This is module" ) form1.Show() ' trying to call form1 form2.Show() End Sub End Module Public Class Form1 &n ...Show All
