Last post Oct 04, 2010 09:38 PM by vgoshika
Oct 04, 2010 02:54 PM|vgoshika|LINK
I am working on a scenario where I need to get some data from a remote database and display on UI but along with that I need to show if there are any Win32-Unmanaged errors(System.Runtime.Interopservies.Marshal.GetLastWin32Error()).
My connection is right and every thing is working fine (I am able to get data from DB-SQL server 2005) but I am seeing win32 Error 'Overlapped I/O operation is in progress' (error code: 997) after SQLConnection is open or after filling dataset using dataadapter.
Marshal.GetLastWin32Error(); - to get the win32 error code
new Win32Exception().Message; - to get win32 error message
Any ideas on this?
My C# code is:
public static DataTable retrieveDBVersion(string connString)
SqlConnection connDB = new SqlConnection(connString);
DataTable dtVersion = new DataTable();
string queryString = "SELECT * FROM Version";
SqlDataAdapter daVersion = new SqlDataAdapter(queryString, connDB);
catch (SqlException ex)
throw new Exception(ex.ToString());
catch (Exception ex)
ConnectionString is "<add name="VersionConnectionString" connectionString="Initial Catalog=DBVersion;Data Source=*****;User;Password=Password1;" providerName="System.Data.SqlClient"/>"
I am getting connString value from a custom config value using ConfigurationManager.OpenMappedExeConfiguration()
connecting to datasource
Oct 04, 2010 04:25 PM|Jorus|LINK
The issue is part of the operating system. Which server is reporting the error? Is it your server or the SQL server?
Start by checking the system which is reporting the error, look for a stressed system. Check the normal counters for cpu, memory and disk.
This error can happen if the action was not completed in time. I have seen it on a cluster where the disk sub system did not complete the IO requests before the next batch was submitted.
Oct 04, 2010 09:38 PM|vgoshika|LINK
I think the error is coming from my server and my system is running normal. I tried to find out whether any I/O process is not closed properly in my code but didn't find any thing. Still debugging.
Will try to find if I/O request is not getting completed in time or some other issues.
Thanks for your response.