Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

error 800A01AD

30 views
Skip to first unread message

PeCoNe

unread,
Jan 13, 2013, 2:09:44 PM1/13/13
to
Executing the next file gives error 800A01AD:
// Purpose: Retrieve LastDate of reference Symbol Database
DataDir = "D:\\MyPrograms\\Amibroker\\IntraDay";
OutDir = "D:\\MyDocuments\\Temp\\";

var RefSymbol = "AEX";
var oAB = new ActiveXObject( "Broker.Application" );
var oStocks = oAB.Stocks;
oAB.LoadDatabase(DataDir);

Ticker = oAB.ActiveDocument.Name;
Ticker = RefSymbol;

oStock = oStocks( Ticker );
var Qty = oStock.Quotations.Count;

OutFile = OutDir + "LastDate" + ".txt"
var fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.OpenTextFile( OutFile , 2, true );

oQuote = oStock.Quotations(Qty-1);
var oDate = new Date( oQuote.Date );

y=oDate.getFullYear();
m=oDate.getMonth()+1;
d=oDate.getDate();
outdate = y +( m<10 ? "0" : "") + m + (d<10 ? "0" : "") + d;
f.WriteLine(outdate);

f.Close();
oAB.Quit();

Under windows 7 32 bit it worked ok.
Now I am using windows 7 64 bit.

What is wrong?

Mayayana

unread,
Jan 13, 2013, 5:20:24 PM1/13/13
to
This is a VBS group. You want the javascript
group. I think it's microsoft.public.scripting.jscript

When you get there you should also provide more
information, like what line the error occurs on.

Given that the error starts with 800A I'm guessing
the problem is with Broker.Application, but I have
no idea what that is. If it's some sort of 3rd-party
library you can't expect people to know about it.

But it could just be a 32/64 issue. WScript can be
32 or 64 on Win64, but ActiveX DLLs are in-process
components. They can only run in similar. (32-bit
libraries cannot run in a 64-bit process.) If you
have a 32-bit component you need to use 32-bit
WScript. (You'd probably be well-advised to use
32-bit anyway. Win64 provides both but many
3rd-party components are not available in both.)

I repeatedly forget the wacky folder layout on
Win64. I know that WScript.exe 64 will be in System32,
which is, inexplicably, the 64-bit system folder, while
WScript.exe 32 will be in the 32-bit system folder,
named something like SysWow3264. (?)

--
--
"PeCoNe" <p.a.m...@gmail.com> wrote in message
news:50f30679$0$31896$c3e8da3$33a0...@news.astraweb.com...
0 new messages