Angie28's Q&A profile
SQL Server Rollback transaction in trigger end batch, any workaround?
Hallo, I have a situation where I would like the execution to continue after a trigger has rolled back the transaction. This will end the current batch when the trigger returns. It is all documented behaviour http://msdn.microsoft.com/library/default.asp url=/library/en-us/acdata/ac_8_md_06_4qcz.asp What I am trying to find out is a way to get the batch to continue and in this example the print statement to execute. Removing rollback tran from the trigger is not really an option since it moves the responsibility to remove invalid data to the calling object. Assume a trigger on TestTable that will raiserror, rollback tran and return inse ...Show All
Smart Device Development listchanged event on BindingSource
The list changed event on and I binding source is fired only when i execute de endedit method and i have made previusly a change in the binding list(moved,delete,inserted etc..). Does anybody know a way to notice that a change its made in the bindingSource list and after that i could call the canceledit method to restore my list. notice that if I call the endedit method the cancel edit wouldnt restore my bindingsource becose the changes have alredy be applied to mi bindingsource. Thanks for your help. The problem is that the BindingSource datasource is a ResultSet so that resultset couldn’t ...Show All
.NET Development High performance sockets and SslStream
Hi guys, I'm involved in a project where we need a high performance comms engine, capable of communicating with several thousands of clients simultaneously. My question is, would using SSLstream for normal channel encryption be fast enough i.e. is it recommended for high performance comms I was thinking of alternatives, one of which being: Use a TCPClient and SSLStream to authenticate the server, perform symmetric key exchange, either with the sslstream, or by using RSA on a raw socket. I'd then switch to a raw socket and use the symmetric key (probably 3DES or Rijndael) for normal channel encryption. I know this is a bit of a pain in the ...Show All
Visual C# Updating Database
Hi I am receiving an error message "Error 1 'System.Data.DataRow.DataRow(System.Data.DataRowBuilder)' is inaccessible due to its protection level ",when i try to update the database programtically through datagridview control placed in my from. I want to edit and update a database at run time while changing the corresponding cell values of my datagridview control. Please,provide me the appropriate code snippet with a brief note.... The DataRowBuilder class is not intended to be used directly from your code. The class is sealed and doesn't have a public constructor. Because this class doesn't have ...Show All
.NET Development BackgroundWorker problems
Ok.....I have a while loop that executes an increment on a counter for a couple thousand times. I want to be able to show the progress on the counter using a progressbar. Now, I am executing the while loop in the DoWork method of the background worker and updating the progressbar in the ProgressChanged method and when i call RunWorkerAsync then things go wrong. My problem is that the progressBar updates properly and the count increments...however my form's UI is unresponsive...it registers click events on the cancel button but it waits until the backgroundworker completes before it actually does what it has to do. If i introduce a Thread.Sle ...Show All
Visual C# problem with XmlWriter and MemoryStream
hello friends i am able to write a xml file on the disc. but when i use MemoryStream in the XmlWriter.Create() method. I m not able to read back data from the stream ...please correct the code that i have written. private string GetContentMessage( object o) { string str; int size; byte [] myBuffer; TestClass test=( TestClass )o; MemoryStream objMemoryStream = new MemoryStream (); XmlWriterSettings objXmlWriterSettings= new XmlWriterSettings (); objXmlWriterSettings.CloseOutput = false ; objXmlWriterSettings.Encoding = Encoding .UTF8; ObjXmlWriter=XmlWriter.Create(objMemoryStre ...Show All
Visual Basic Capturing the functions from my DOS Program
I have some functions return in C++ and made an executable file. Now i am calling the exe from command line and geing the ouput out in an text file. What i want is that i need to get the output of a single function which is there in my C++ code through VB how can i do this I believe if you experiment with this you can do it if your return datatype is an integer. Exiting your main routine with a Return value where value is an integer should do it, if I remember correctly ...Show All
Visual Studio How to listen keystorkes in VS.Net IDE
Hi, I'm writing a add-in for helping our development team. Something like live templates, templates will be stored in a xml file with keyname. Like forloop, ifcondition and so on... So when the developer types forloop in the codewindow, then a tooltip should appear on the window, saying press some key to fill the template. For doing this i tried using add-in, but in VS 2003 only LineChanged event is available for texteditor events in DTE. So I don't know how to track the keystrokes happening in the current window. Please let me know the solution or alternative way to handle this or any workarounds. Regards, Saravana Kumar B Samo, I desc ...Show All
Windows Forms Rogue browser control - AxSHDocVw in Windows Forms App
Hi, I seem to be getting some crazy behaviour from the SHDocVW internet browser control in my app - whenever i change the visibility or location of the parent form, the browser control seems to pop out and sit in the top left hand corner of the screen - you only notice it if you make the form visible again. Also, if you load a different& ...Show All
Windows Forms Data binding on a form (C#).
Hi All, I have a form on which every field except one is user enterable. This field is the key (Id value) that gets its value from calling an oracle stored procedure. In my code I use the btnadd_click event to assign the value to the Id (this.editAgencyId = ....call stored procedure) This works fine when I have a single page to my form. But&n ...Show All
SQL Server Return rows from XQuery
Hello, running the following code: declare @x xml set @x='<ManuInstructions ProductModelID="1" ProductModelName="SomeBike" > <Location LocationID="L1" LocationName="Name 1" /> <Location LocationID="L2" LocationName="Name 2" /> </ManuInstructions>' SELECT @x.query(' for $location in /ManuInstructions/Location return data( $location/@LocationID ) ') as LocationID I get the following result: LocationID ------------------------------------------------- L1 L2 (1 row(s) affected) How can I get two rows instead , ie.: LocationID ------------------------------------------------- L1 L2 (2 row(s) a ...Show All
Visual Studio How to get the Target name that is current been processed
I want to know how I can get the Target name value that the Excecute method is executing. Hi, I don't think you can get this value directly. I would imagine that was by design. But if you really need it I imagine you could use the BuildEngine.ProjectFileOfTaskNode to get the location of the project file, and read the target tag that contains the task located at BuildEngine.LineNumberOfTaskNode and extract the name. Why do you need this value Sayed Ibrahim Hashimi www.sedodream.com ...Show All
SQL Server How to design a report for nested items dynamically
Hi, I want to build a report for nested items. Is it possible For eg, I have a data heirarchy like this, Item A depends on Item B and C, Item B is depend on C and D and so on to nth level. In the report initially all top level items will be shown, If user expand top level item it should show its dependencies. But the problem here is I do not know the level of dependency at design time. As per my knowledge we need to specify the level at design time for the report. Is it possible to design such a report dynamically. Any help would be appreciated. Thanks, Deepak ...Show All
SQL Server SQLBindParameter SQL_C_TYPE_DATE HY003 Error
I'm trying to use ODBC to send data to SQL Server from VC++. When I try to setup the parameters for sending a date to the database by calling SQLBindParameters(), I get the error HY003 "Program type out of range". This indicates that the 4th parameter, ValueType, is not correct. But I'm hard coding it to a known valid value. Actually, I'm copies code strait from the Microsoft Help and still getting this error. Specifically, here's the lines of code: DATE_STRUCT dsOpenDate; SQLINTEGER cbOpenDate = 0; SQLBindParameter (hstmt, 3, SQL_PARAM_INPUT, SQL_C_TYPE_DATE, SQL_TYPE_DATE, 0, 0, &dsOpenDate, 0, &cbOpenDate); ...Show All
Visual FoxPro Combine records into 1 text box using ALLTRIM
I have a table that has City, State, & Zip in separate fields in a table. I want to combine those fields to fit in a single text box on a form. So far I have learned that I need to add this ALLTRIM(City) + ", " + ALLTRIM(State) + " " + ALLTRIM(Zip_Code) . I thought I could put this in the expression builder but I get an error saying "The data source for this object must be a variable reference." What am I doing wrong Thanks! Thanks so much! This worked great. ...Show All
