Answer Questions
Jon Schwartz Getting IP address from tcpclient
Hi, I'm using tcplistner and tcpclient to do network communications between my client and server applications. I accept the client as: TcpClient client = listener.AcceptTcpClient(); I want to get the ip address from where the client is comming. What class/methods would I use to do that. I could not see any method that would return ip address of the client that I just accepted. Regards, -Abubakar. Hel ...Show All
ianhannaford Optimize string allocation
I'm testing with the performance tool using the instrumental setting. The report showed the System.Version and System.String are the types with most instances. Is there any best practice to optimize it Actually, the current performance of my application is good enough but I just want to improve it further. I found that a single function has already made up 1/3 of the total string instance. The code is a simple structure. It open up a database co ...Show All
Dodo Roa Closing connections
I'm trying to understand if how the following will work: SqlConnection conn = new SqlConnection( connectionstring ); SqlConnection conn2 = conn; SqlConnection conn3 = conn; conn.Close(); By closing the conn connection does conn2 and conn3 connection close also (are they referenced ) or are they separate (by value ) and stay open until I close them explicitly I think all 3 connections will close because (I think) they are referenced but someo ...Show All
d2005d2005 access data from a Deleted DataRow
Hi! I have a DataRow marked as deleted. How can I get the data behind the row I tried to use Table.Select with several parameters but didn't succeed. I always get a System.Data.DeletedRowInaccessibleException when I try to do something like: pkID=myRow["pkID"] or in VB syntax... pkID=myRow("pkID") If DT is your table of changes use the following code to access the original row data: DataView originals = new DataView ...Show All
Parripati COM vs Component
Hi, I am looking at developing a component within .Net which can be distributed to non-Microsoft (Java, C, Delphi) design environments. Traditionally, this would be performed through distributing the code as a COM. According to Microsoft's website, it is suggested support for COM is being phased out, and all future development work should be done as a component. Since components appear to be incompatible with non-Microsoft design environme ...Show All
CleverCoder Grabbing a user name off a DOMAIN\username account name string
One easy way to do this with a regular expression is: \w+\\(\w+)$ An example of using the code below called from a command prompt: called with- c:\>myexe "\w+\\(\w+)$" DAGHETTO\daHNIC produces output- Groups.Count=2 for string1=DAGHETTO\daHNIC, Success=True group=daHNIC where group is an element of the Regex.Match.Groups collection (not the windows group or domain). To pull the domain instead use the regular expression "(\w+) ...Show All
jp singh Affected records
Can anyone tell me how to count the affected records in a datagrid view, BUT BEFORE THE UPDATE process I mean - i want to know how many changes i've been made befor update them in the table. Thanks! one way would be to loop over all the DataRow objects and examine the RowState property for each DataRow. If the RowState is either "Added", "Deleted" or "Modified", then that Row has been cha ...Show All
user11 Run one instance of a window
How do I run only one instance of a window if I do not know the window name (Just suppose the title had the time in it). This means I cannot use FindWindow. Perfect answer. Pity the question wasn't as perfect. I meant application. I had got as far as Mutex, but had spent three hours chasing down CreateObjRef, marshalling, real proxies etc. I decided there had to be an easier way. ...Show All
Steve Penfold VB6 and CCW's
Hi, I need to start writing a set of classes that will be used by our VB6 application. Because I have'nt done much in the past with COM interop, I was getting a bit confused as to what attributes I need to use on my managed classes. for example, do I need GuidAttribute and ClassInterface and ProgId, or just a few of these Remebering that these .NET classes will only be used by our VB6 code, nothing else. Thanks for your help Graham ...Show All
Xllerator ASP.NET process identity does not have read permissions to the global assembly cache.
VS2005 RC1 - XP PRO Sp2 + - App is a webservice and default.aspx. I'm seeing errors in the error log after a browser tries open the site. The browser sees an http 500. The server log shows the following: 03:04:48 127.0.0.1 GET /default.aspx 500 03:05:33 192.168.0.100 GET /test.htm 304 03:05:51 192.168.0.100 GET /default.aspx 500 03:06:39 127.0.0.1 GET /default.aspx 500 03:06:41 127.0.0.1 GET /default.aspx 500 I have opened up all the permis ...Show All
Daniel15 Discard changes made to datatable columns of a Dataset?
Hello, I have a windows form with several text boxes. OnLoad, I use a DataAdapter which calls a SQL sproc to retrieve it's info. The sproc returns has 3 select statements so when all is said and done, the dataset ends up with 3 tables. (table, table1 and table2) Next I use databindings.add for each of the textboxes and bind them to the appropriate column in the appropriate tables. The textboxes are readonly by default and I have an Edit ...Show All
Luigi Leo MSXML 6 Merge Module
Does any one know if microsoft are going to release a merge module version of msxml 6 I ask as i need it for an installation Thanks Yeah I think we all want MSMs to make our life easier, but it appears that it doesn't make everyones life easier: http://forums.microsoft.com/TechNet/ShowPost.aspx PostID=274967&SiteID=17 So I don't think we're going to see any more! James http:/ ...Show All
sarrafi VSA obsolete in FW2.0?
The namespaces Microsoft.VSA, Microsoft.JScript.VSA etc. are marked as obsolete in the documentation of the Framework 2.0 beta-2. I used classes in these namespaces for customizing applications by using JScript's at runtime. Are there any substitutions of the VSA stuff in the new framework or does Microsoft just stop developing this Thanks karlo VSA was one of my favorite features in .Net! I have several app ...Show All
urbansound VS2005 RC1 Dataset merge bad performance
Hi, We've just migrated from Beta2 to RC1, and we get very bad performance with the (Typed) Dataset's merge function. After analyzing with a profiling tool, we've discovered that the merge function calls the GetRowType many many times more that in the previous (2.0 beta2) version. for example - for a dataset with about 10 tables, one of them with 6000 rows: in Beta2 - GetRowType called 18 times. in Rc1 - almost 20,000 times. in Beta2 - 1-2 secon ...Show All
forummember Can't call dataadaper.Update method after the dataset.AcceptChanges has been called!!!
I've employeeDataAdapter and nwindDataSet. Bind the grid to nwindDataSet.Employee table. And I add one new row and call nwindDataSet.Employee.AcceptChanges() method. After that I called employeeDataAdapter.Update(nwindDataSet); then I close the application. But the data are not saved in the database although I called Update() method. If I only called Update() method, then the changes are saved in the database. Am I missing some ...Show All
