General information
Category:
COM/DCOM and OLE Automation
Laurisa
>This may have more general VFP OLE to VBA symptom that I don't understand, but here's the specifics.
>
>Has anyone ever tried the following?:
>Controlling Project 98 from VFP to hit an Oracle database containing the Project file?
>I can get VFP to open Project using:
> xmsp=createobject("msproject.application.8")
>
>I then make it visible:
> xmsp.visible=.t.
>
>I can even do this:
> xmsp.FileOpen("\Project Name","False")
>which makes me then enter the pasword to open the oracle database
>
>but I can't do this:
> xmsp.FileOpen(Name:="\Project Name",Readonly:=FALSE,
> UserID:="username", DatabasePassWord:="paswd",
> FormatID:="MSProject.ODBC.8")
VFP doesn't support 'Named' arguements... (unless I've missed something - entirely possible)
>or this:
> xmsp.FileOpen("\Project Name","FALSE",,,,,,
> "username", "paswd", "MSProject.ODBC.8")
Not exactly sure why, but I suspect that the 'empty' parameters are being interpreted as NULL values rather than DEFAULT values. A pain, but try modifying the xmsp.FileOpen command and provide all of the arguements, even if they represent the default values.
>
>When I try putting the whole thing in quotes to pass it as a single string or try using a variable to pass it the string, it tries to open a file with the entire string as the name.
Putting the entire list of arguements into quotes means that you are really only passing 1 arguement.
>
>How do I pass the parameters the values it wants?
>
>Many thanks in advance!
>
>Laurisa Watkins
>Seattle City Light
>laurisa.watkins@ci.seattle.wa.us
Mark
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only