dsProductTableAdapters.productTableAdapter pa = new EBMS.dsProductTableAdapters.productTableAdapter();
int result = pa.InsertQuery(tbxProductName.Text,tbxDesc.Text,Convert.ToInt32(tbxModelNumber.Text),Convert.ToDecimal(tbxMSRP.Text),Convert.ToDecimal(tbxRetailPrice.Text),1,0,1);
the int results return 1. which shows its successfully insert. but inside my access database file does not show the new row..
my application runs some code in each interval.
There the first line looks like int sec = Settings.Default.Intervall;
in my case, the interval setting doesn't change and holds a value of 20, so every 20 seconds Settings.Default.Intervall; is accessed.
the problem is, that sometimes an exception occurs. this happens once a week or so. any idea what the point could be?
FATAL 02.08.08 06:07:52 [ thrCounter]: Ein unbehandelter Fehler ist aufgetreten (sender: Name:Umm.exe
There are no context policies.
, exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at System.Configuration.SettingsPropertyValueCollection.get_Item(String name)
at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
at Umm.Properties.Settings.get_Intervall() in D:\VSSTools\Umm\Entwicklung\Properties\Settings.Designer.cs:line 31
at Umm.App.Controler.runIntervallWaiting() in D:\VSSTools\Umm\Entwicklung\App\Controler.cs:line 213
It looks like your SettingsPropertyValueCollection is getting corrupted, so that the values in the _Indices HashTable doesn't correspond to the size of the _Values ArrayList.
The class itself should be pretty well tested, so there might be something in your code that is accessing some memory that it shouldn't. Typically that's only possible when using reflection, unsafe code blocks or calls to unmanaged code.
Despite everything, the person most likely to be fooling you next is yourself.
I am trying to write a program that will communicate with another application using xml messages over tcp/ip.
The host machine has a public IP address and i will send the xml messages to a particular port number.
The documentation of the host application makes numerous references to socket programming so i'm guessing that is a hint to any potential users.
So I was wondering how i can use dot net (C#) to the following:
firstly, create the xml documents(xml messages)
secondly, send these xml documents over the network over tcp/ip sockets
thirdly, view the response from the host machine
Changing only the registry values will not change the background color.
Have a look at the API: SetSysColors.
It is present in user32.dll
If you want to change the wallpaper and get related information, have a look at SystemParametersInfo which is also present in user32.dll
Last Visit: 24-Nov-20 11:26 Last Update: 24-Nov-20 11:26