Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling MS Access functions via ADO
Message
 
To
06/06/2002 17:33:57
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00665704
Message ID:
00665828
Views:
16
I think that you cannot call Access's functions directly via ADO. Use OLE Automation instead. It should be something like:
oAcc = CreateObject("Access.Application")
oAcc.Eval("MakeNewHeader()")
* or
oAcc.Run("MakeNewHeader")
>I am using VFP 6 to call an Access function and can't get it to work. The command object and the connection object get created okay, and I set the commandtype to 4 (also tried to 1 and 8). ActiveConnection is the connection object and CommandText is the function name (tried it with and without trailing parans). After executing the command I get an error message that says it can't find the table or query "MakeNewHeader", which is the function name. In the case of CommandTypes 1&8, the error says it is an invalid SQL statement.
Previous
Reply
Map
View

Click here to load this message in the networking platform