mardi 31 mars 2015

createRefreshTableRequest(O2GTableType.Orders) returns null

Hi,



I am using the following code to programatically update tables.

When I call the function for "O2GTableType.Order" the request always returns 'null'



All the other table types produce the desired result (i.e. accounts, trades etc) and only the request for "O2GTableType.Order" fails every time. I created an actual order in TS and the request for order table still fails with 'null'...



What am I doing something wrong?

How can I track down the issue?



function below;

----------------------------------------------------------------



public bool RefreshTable(O2GTableType type)

{

if (mSession != null)

{

O2GRequestFactory factory = mSession.getRequestFactory();

mSyncResponseEvent.WaitOne(1000);

if (factory != null)

{

// create the response object and wait for the response

O2GRequest request = factory.createRefreshTableRequest(type);

if (request != null) // O2GTableType.Order always returns 'null'

{

mSession.sendRequest(request);

if (!mSyncResponseEvent.WaitOne(5000)) return false;

}

else

{

this.Debug("Table " + type.ToString() + " is null!!!");

return (false);

}

}

}

return (true);

}




Aucun commentaire:

Enregistrer un commentaire