Are you using an autonumber as the primary key? If so the adapter.update will not return the number to the data table. to correct for this add a rowchanged event to the adapter and use the code shown below to retrieve the IDENTITY value. This may fix your problem.
// To the DataAdapter Add
adapter.RowUpdated += new OleDbRowUpdatedEventHandler(OnRowUpdateed);
// The event handler assuming "Id" is the name of the Identity column
private void OnRowUpdated(object sender, OleDbRowUpdatedEventArgs e)
if (e.StatementType == StatementType.Insert)
using (OleDbCommand cmd = new OleDbCommand("SELECT @@IDENTITY", e.Command.Connection))
e.Row["Id"] = cmd.ExecuteScalar();
I have an application which i want to integrate with other applications. My application will be running all the time (running on the tray icon) . I have implemented the keyboard hooking to catch a hot key F1 for exmple and call my application. What i need is to read a field value from the external applicaion and call my application passing that value as a parameter (Command()...)
The error just means that the web service for some reason didn't like the request. Specifically, it may mean that the web service:
a) can't understand your request (bad headers/bad encoding/bad data).
b) has failed when processing your data (due to a bug or bad data).
c) doesn't accept your request (invalid data, too much data or whatever other rule it may enforce).
So as you see, the reasons can be infinitely many, and there is no simple answer. You may be doing something wrong, the web service may be doing something wrong or there may be a problem on the way (corrupting the request).
It's almost impossible to debug without carefully analyzing the entire raw request (including HTTP headers) and/or debugging the web service itself. If you didn't create the web service you could try sending the request to a fake web service you create and capture it there - then you have to analyze it for correctness somehow (proof-reading it or building a program that analyzes it) and finally, if you're certain it's correct, contact the ones responsible for the web service.
I think I remember seeing it intermittently in .NET 1.1 due to some bug or quirk (the request headers sometimes were incorrectly generated by the framework). Both the web service and consumer were built in .NET, and the error occured before my (web service) code even saw the request. Spent hours of fruitless debugging before I found the bug on Google... Haven't heard about that in a long time though - I think it got fixed in an early service pack.
Thank you very much for your reply. I used to run windows update and i found that my computer require to update vs 2005 sp1. Then I download from an internet (431 Mb). I installed it but during the time that it is nearly finish (remain around 1mn) the eletricity was disconnect and i try to use the command
shutdown -s -f -t: 5
to force shutdown my machine before the electricity cut off. So I'm not sure whether i could install vs 2005 sp1 successfully or not. But when i try to run windows update again i fould that my computer still require vs 2005 sp1. So I doubt that it might not install properly. Thank in advance.
decimal for group totals in an application that exports financial data. The only calculation done on the total is accumulation; no multiplication, division, tax etc. In my output, I get a decimal total value of '13135984.162500000001985789145', where if I load the export file in Ecel and sum the values, none of which have beyond four decimal points with no explicit rounding, I get the same total as the control file I am comparing my export file to: '13135984.1625'.<br />
<div style="display:none;" class="CPhogPost"></div> <br />
<div class="ForumSig">Semicolons: The number one seller of ostomy bags world wide. - dan neely</div>