'OleDb - not getting up to date data from SharePoint

I am having the following problem: 1.I connect to the OleDb data source (SharePoint list) 2. I select the data using the following code:

success = true;
message = "";
readData = new DataTable();
if(oledbConnection == null)
{
    success = false;
    message = "First establish connection with the oledb source.";
}
if(success == true)
{
    try
    {

            OleDbCommand command = new OleDbCommand(queryString, oledbConnection);
            command.CommandTimeout = (int)Convert.ToDecimal(timeout);
            OleDbDataReader reader = command.ExecuteReader();
            readData.Load(reader);
            command.Dispose();
            reader.Close();

    }
    catch (Exception ex)
    {
        success=false;
        message=ex.Message;
    }
}
  1. I update the data on sharepoint using the same oledbConnection (still open).
  2. I get back to point 2 - to read the updated data from SharePoint list still using the same oledbConnection (still open). But when the data is downloaded I cannot see the changes I've made.

The question is: How can I get the up to date data from sharepoint using the same conneciont (without closing it and reopening).



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source