I've updated a connectionString manually on IIS and restarted Web site,
but previously working INSERT is not working to the new data source.
New connectionString is okay (see details below).
I know I can have multiple connectionStrings, but don't know
how to select one of them on the fly.
I don't know how to handle this situation.
Any help will be very appreciated.
Thanks in advance!
I'm running an ASP.NET Web Service (IIS 5.1).
Web service INSERTs a couple of records successfully into a DataSet
created using DataSet Wizard on VS2005 to a SQLEXPRESS on local machine.
I've the same database on a remote SQLSERVER (that I can access thru
MS SQLServer Mgmt Studio Express), and wanna INSERT data to it.
So I manually changed Web.config to the new connectionString on IIS and
restarted the Web site that I'm using. Data obviously did not go to the
old database, but it did not go to the new too! (although my code haven't
thrown any exception). Data has been lost.
Second turn, I configured the code to use an ODBC System DSN to the
old and okay database. Worked fine. Changed the DSN settings to the
remote database (connectionString remained the same) as restarted
Web site on ISS. The same behaviour got before: data was lost!
Here's two ideas:
- add a keydown event to the text boxes and detect CTRL+C or CTRL+Insert (I'm a little foggy on it, but doesn't specifying it as "handled" prevent the control from processing the key? Something about that in MSDN library...)
- add an enter-event to the text boxes that clears out the clipboard
The operators enter a new serial number every two to three minutes all day long. Normally this is done with a barcode scanner but if the label is damaged they need to enter it with the keyboard. This serial number is written to EEPROM on the PCB under test. If they get it wrong, the board will have to go back through the programing cycle. The extra time, to enter it twice every so often, is worth avoiding the programing cycle. Additionally, the mistake might not be discovered until the board is installed in the final product. (Lots of wasted time...)
But, I stuck in MSHTML interfaces.
Could somebody help me with that?
Does anybody know a good hashcode algorithm to generate unique codes?
What if you have two objects and their properties are equal? How would a hashcode be unique then?
Here, I am making an assumption that the hashcode is created using the properties of the control.
So I guess the real question is: Is there a way to generate a unique hashcode that doesn't rely on the properties of the object?
Does the hashcode need to be unique/same across sessions? What're you using it for: uniqueness testing or sorting? If you don't need cross session consistancy or can save the code somehow, and are only using it for uniqueness testing: just give each object a guid.
I'm trying to compile a little C# program with the commandline csc compiler. I'm using the [DLLImport()] attribute, so I need the System.Runtime.InteropServices namespace, right? Problem is, csc wants to know what assembly it's from (there's no DLL named System.Runtime.InteropServices.dll). I need it for the /r: switch for csc.exe. Anyone?
I'm working on a control contains two listviews which are arranged vertically.
I would like to synchronise them to make them appear like just one listview.
(they "view" are set to detail, columnStyle is set to "none" for one and to "Clickable" for the other one.)
I had allready synchronized the width changing of columns but I can find a way of managing the scrollbar.
I would like scrollbar doesn't appear in one listview and would be manage with the other one.
I'm using class Net.Socket to establish internet connection. Everything is OK, but I can't close the connection.
Methods .ShutDown(...) and .Close() do not help me - the connection is still alive, after calling these methods.
_sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IPAddress address = hosts.AddressList;
IPEndPoint ipep = new IPEndPoint(address, port);