csperler's Q&A profile
Windows Forms Ado.Net Concurrency Issues
I need sample code for handling database concurrency in Vb.net. If anyone want to share your knowledge in this subject...Help to me. Thanks.. ADO.NET maintains two copies of the table it extracts. Once you make changes to the dataset (or datatable) and hit update, it will have 2 versions, the first version was the snapshot of the data that ...Show All
Windows Forms Autoscroll
When I use AutoScroll, scrollbars never show up if the controls are outside of the container to the left or top of it, only to the right or bottom. How do I fix this Yes you can access autoscrollbars by using p/invokes to the Windows Shell functions. Check this link: http://msdn.microsoft.com/library/default.asp url=/library/en-us/shellcc/platform/commctls/scrollbars/scrollbarreference/scrollbarfunctions/setscrollinfo.asp But this is not something you need to do know. Still you might want to check my post on richtextbox & autoscrollbars to see a sample on how it works: http://forums.microsof ...Show All
Visual Basic Source Control Option Not Available
I have installed visual studio team edition 2005 and sour safe 2005 but there is no option in the studion in the file menu to add project to source safe. I have tried re-installing the source safe but could not find any solution. I have also tried selecting Source control plug-in in the tools menu but there is no plug-in available. If any one can guide me how to use source safe in the studio 2005. Thanks. Some Forums Postings to try things - I did a search on Plugin in this forum and came up with some postings which relate to registering DLL's for the plugin to ...Show All
SQL Server Result of FOR XML into variable
How can I get the result of a FOR XML select into a variable I have a table MyTable with multiple rows. I want to convert an entire row to xml, and hold it in a variable for a later insert as an xml field in another table. This doesn't work ... DECLARE @xmlvar xml SELECT @xmlvar = * FROM MyTable FOR XML AUTO, ELEMENTS Any ideas appreciated. Greg. You cannot do this in SQL Server 2000. You can only capture the FOR XML output on the client-side. This is however possible in SQL Server 2005. ...Show All
Visual C++ Visual C++ 2005 Express Edition and lots of errors in stdio.h
Hello Everyone! I have Visual C++ 2005 Express Edition (RTM) installed on Vista (October CTP). I have created new Win32 Console Application project, but I cannot compile it even when I did not modify any code. I gets over hundred of erros in stdio.h: ------ Build started: Project: EjectCD, Configuration: Debug Win32 ------ Compiling... stdafx.cpp c:\program files\microsoft visual studio 8\vc\include\stdio.h(194) : error C2065: '__nullterminated' : undeclared identifier c:\program files\microsoft visual studio 8\vc\include\stdio.h(194) : error C2143: syntax error : missing ')' before 'const' c:\program files\microsoft visu ...Show All
Visual C# Trimming a path
Hey howzit As you can see in the code below, this method returns the path, but I want it to return the filename...just the filename with no extensions or path characters. e.g. if the path was "C:\\david.pdf" i want it to return "david". Is there any easy way of achieving this public string OpenPDF() { //allow user to select PDF OpenFileDialog dialog = new OpenFileDialog (); dialog.DefaultExt = ".pdf" ; if ( DialogResult .OK == dialog.ShowDialog()) { string path = dialog.FileName; using ( FileStream file = new FileStream (path, FileMode .Open, FileAcces ...Show All
Visual C# Move rows from DataTable
Hi, I am using the DataTable.Select() method to populate a secondary table with data from a parent table in order to perform calculations on it. The thing is that one the calculations have been done, the data in the parent table is redundant so I would like to delete it (as the table can get quite big - 500,000 rows +). Is there a way to do this Thanks in advance, James Thanks, I've actually come up with a solution that works a treat. Just added a an autoincrement primary key to the parent table and then add those values to an array as they are selected into the secondary table, then delete each r ...Show All
Visual C++ Creating Strings
Hello, I've been wondering how is it possible to create a global String variable When I write "String^ str" it says: global or static variable may not have managed type 'System::String ^' 1> may not declare a global or static variable, or a member of a native type that refers to objects in the gc heap But when it's in a private operation it works. With Thanks, Gal Beniamini. You can't have global variables that are managed in C++/CLI. This is a restriction of the runtime. ...Show All
Windows Forms create a setup packge
How to create a setup packge including framework, reports and let user just clicks setup to install everything Sounds like another good argument for making the user responsible for a set of <u>minimum requirements</u> before installing our .NET software. ...Show All
Visual C# String question
In VB you can say textbox.text = "mytext and then.."+Chr(13)+"and then this" the result in the textbox is this mytext and then... and then this Is there a similar function in C# that will allow you to put return character into a string (or any character for that matter ) Thanks in advance Will You can use new line char like: "mytext and then.." + Environment.NewLine + "and then this" ...Show All
.NET Development Message framing and SSLStream
A bit of background: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=142895&SiteID=1 and http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=120007&SiteID=1 Will using SSLStream (or NetworkStream) with TCPListener/TCPClient solve message framing problems I don't think using SSLStream will solve your message framing problems at all. The class just abstracts you away from the overhead of creating a secure connection. The class takes whatever data you write to it and encrypts it before it is sent on the wire. Just as with plain text TCP, the packets can still be broken up whe ...Show All
Windows Forms Windows Control Collection
Hi All, I am Quite new to VB.NET. I have used a following Code like this to access the Controls using Control Name but it seems that it is not possible to access the Controls using Control Name instead we have to access them only through Index private Function GetControlText(strControlName as string) as string GetControlText = me.Controls(strControlName).Text End Function In VB.NET seems that i have to access them through like this Private Function GetControlText(intControlId as integer) as string GetControlText = Me.Controls(intControlId).Text end function The Problem here is that, we are not storing the ...Show All
SQL Server Combine SUMs
How can I combine the 2 Sum amounts below. Basically teh 2 queries are exactly the same, just hitting 2 different tables (pdc and pdcdeleted) with the same structure: SELECT SUM(PQuery.Amount) as PDCs_IL FROM (SELECT c.name, c.customer, (SELECT Top 1 fd.Fee1 FROM FeeScheduleDetails fd where c.feeSchedule = fd.code) AS FeeSchedule, m.branch, pd.desk, ' ...Show All
Windows Forms Bug in BindingManagerBase - PositionChanging
The .NET 2.0 documentation defines event PositionChanging, however it is undefined and unavailable in Visual Studio 2005 Beta 2. This is a critical event which we need in order to validate the data record prior to navigating to a new record. Please advise! Thanks Chavdar Angelov To remove this Event is a crime and these excuses are ridiculous. By removing it you pack the complexity back onto the shoulders of thousands of developers instead of providing a bullet-proof solution in one defined place ... once and forever. I would prefer to wait some months longer for the final version ONLY to get this absolutely crucial feature !!!! Come o ...Show All
SQL Server SCD Insert and Identity Columns
It looks like you can't use an identity column to generate your surrogates. (Leave out the value during the insert operation) What gives So is the only alternative to do a lookup when I start my data flow to get the Max surrogate, then after my SCD and before the OLE insert destination , use a script task to increment Using identity columns should be a best practice for surrogate keys in SSIS - what problems you got made you think you couldn't use it If you are in an much earlier build where InsertDestination still use SqlCommand as its AccessMode, if that identity column&nb ...Show All
