Page 1 of 1 1
Topic Options
#47954 - 1999-07-13 08:25 AM ole automation
Anonymous
Unregistered


I would like to open an Access 97 datababase, but the method that opens the database need a string, and there is not a character definition for string in the typelist argument for the OleCallProc()
I'm using this code:
$h= OleCreateObject("Access.application.8")
$res= OleCallProc($h,"OpenCurrenteDatabase","?","c:\bd.mdb")

Any idea?
Thanks.

------------------
Luis Hevia

Top
#47955 - 1999-07-16 05:40 AM Re: ole automation
Anonymous
Unregistered


The character for the string type is 's'. It's undocumented. Also I was mispelling the method OpenCurrentDatabase()
The following code does it works:

$h= OleCreateObject("Access.application.8")
OlePutProperty($h, "Visible", 'b', "true")
OleCallProc($h, "OpenCurrentDatabase", "s", "c:\bd.mdb")
OleCallProc($h, "Run", "s", "MyProc")
OleCallProc($h, "CloseCurrentDatabase")
OleCallProc($h, "Quit")
OleReleaseObject($h)

------------------
Luis Hevia

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2312 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.083 seconds in which 0.06 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org