[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Any Examples of COM (and perhaps ADO)?



> Running this once works.  The second time you press Execute in
> DrScheme it
> fails, with the "com-invoke (method "Open"): expects type <com-0x0> as
> 3rd
> argument" message.  Something that happens during the first execution
> screws
> up subsequent executions.  These problems on the second execution vary
> depending on what happened in the first; the "expected 44 to 94
> arguments"
> error (with the actual numbers varying) is more common if no parameter
> is
> passed to Open above.

Yes, something is getting clobbered.  Have you tried the same
experiement in plain MzScheme?

> BTW, I tried using "(exit)" to restart the session without having to
> quit
> and restart the whole DrScheme environment after each execution.  This
> failed, because subsequent executions complain that CoInitialize has
> not
> been called.

Right.  You might instead try putting the program in the definitions
window, and hitting the Execute button.

> I don't know about Alex, but I tried with both MS SQL Server 6.5, and
> MS
> Access, with identical results.  I assume the problem relates to ADO
> itself,
> not the database.  Re the version of ADO, I'm using MS Data Access
> Components (MDAC) version 2.5 (specifically 2.50.4403.12), which is
> not the
> latest version.  However, the ADO objects in MDAC 2.5 have been very
> stable
> for me in production environments, from various client languages.  If
> I get
> a chance, I might try it with the latest MDAC (from
> http://www.microsoft.com/data/download.htm).

OK, I have Access on my laptop.  I'll see if I can do a diagnosis from
there.

> Having minimal experience with MysterX, out of curiosity I tried using
> a
> non-ADO COM object.  I didn't experience the problem with the
> following
> code:
> 
> 	(require-library "mysterx.ss" "mysterx")
> 	(define xml (cci/progid "Msxml2.DOMDocument"))
> 	(define el (com-invoke xml "createElement" "P"))
> 
> This ran repeatedly without problems.  I was also able to add some
> code to
> exercise the object and make sure it was operating correctly.

That's a relief :-)

I've used MysterX mostly with Excel, and haven't experienced the kinds
of problems you and Alex have found.

-- Paul