06-16-2008 08:04 AM
I'm working a project to interface FoxPro 9 programs to an Act 2006 database. Does anyone know how to go about this?
06-17-2008 10:47 AM
06-17-2008 11:13 AM
Yep, its a blast from the past, but I'm a "diehard" FoxPro fan. Anyway I want to write a program that will link with an Act db and retrieve all contact info and probably display that on a list box (on a FoxPro form). So far I have managed to create the Framework object but the program errors when trying to logon with username and password. Error returned is "OLE error code 0X8002000e: Invalid number of parameters". It only works if I use the Act.Framework.Interop.ActFramework which is located in folder program files\act. But when I try to use the Act.Framework.ActFramework from the GAC it returns the error. I need to use the GAC files (which is recommended) plus it has more functionality.
Any ideas
This is sample code in VFP
objDatabase = CreateObject("Act.Framework.ActFramework")
objDatabase.Logon("padname",ALLTRIM(thisform.txtUsername.value),ALLTRIM(thisform.txtpassword.value))
KitMat
06-17-2008 11:52 AM
Kitmat,
I just tried this code with no errors. I was using VFP 7.0 and ACT 11 beta.
-- jim durkin
* Get the ACT Framework object objDatabase = CreateObject("Act.Framework.Interop.ActFramework") * What Pas File to open Padfilename = "C:\Documents and Settings\Jim Durkin\My Documents\ACT\ACT for Windows 11\Databases\ACT11Demo.PAD" * Open said Pad File objDatabase.Logon(Padfilename ,"Chris huffman","") * Are we loggeg in? IF objDatabase.IsLoggedOn = .f. MESSAGEBOX("Could not log on at this time.",16) ENDIF
06-17-2008 01:43 PM
Jim
Thanks, I managed to logon, next question is how do I get all contact records and save them to an array? I wish there was some doc to explain how the methods in the SDK work.
Kitmat
06-17-2008 07:16 PM
06-23-2008 03:28 AM
Jim
Using the Act.Framework.Interop.ActFramework library is surely a challenge. I resulted to writing/compiling a DLL with COM visibility in VB using the assemblies in the GAC. I then reference the DLL in FoxPro...works perfectly not to forget that it has more functionality compared with the Interop version.
Kitmat
03-18-2009 06:07 PM
hi , i developing foxpro connect to ACT too. may i know how to display data into foxpro grdibox or insert into foxpro dbf ?
thanks.