Accessing quotation database via OLE, previously was: How to find the size of an array

Moderator comment: @Zargo hijacked old thread (How to find the size of an array) for the whole different subject. It took time for original poster to clarify what he really wants. So you can scroll down to post 3 as earlier posts are "lost in the dark"

And what about the case where my Array is a foreign symbol?

BarcountLocal = BarCount;
_TRACE("BarcountLocal = " + BarcountLocal );
NewContract = ParamStr("New Ticker Symbol","TICKER");
BarcountForeign = BarCount;
_TRACE("BarcountForeign = " + BarcountForeign );

That is precisely my point. I have a use case where I need to know the #bars (Array length) in a foreign symbol. This cannot be done with Barcount as SetForeign simply replaces current array values.

My use case attempts to create a continuous futures instrument from a set of futures symbols.

Generally, Data Vendors provide continuous Future contracts if you subscribe to live data-feed. Otherwise, you could manually merge CSVs of different Future Expiries as received from your data-source into one CSV, then import that to form a Continuous Futures symbol instead of trying to achieve it programmatically.

That is a whole different story.

What you are asking for is not AFL array access. It is direct DATABASE access.

You can access database (including ALL quotes regardless of what symbol it is) using OLE interface
OLE interface allows to add/remove/modify quotation data directly in the database.

This old newsletter article: shows precisely how to manipulate quotations directly in the database using OLE.