Community
Showing results for 
Search instead for 
Do you mean 
Reply

Visual FoxPro 9 with Act SDK 8

New Member
Posts: 4
Country: USA

Visual FoxPro 9 with Act SDK 8

I'm working a project to interface FoxPro 9 programs to an Act 2006 database. Does anyone know how to go about this?

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Visual FoxPro 9 with Act SDK 8

Wow  VFP - A blast from the past. I think I started life as an xbase sub.

Really, I worked on FoxPro from 2.0 in Ohio thru to 6.0 with MS.

 

What do ya need to know?  To read the data use the ACT! OLE/DB Reporting Provider .

 

-- jim durkin

 

 

New Member
Posts: 4
Country: USA

Re: Visual FoxPro 9 with Act SDK 8

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

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Visual FoxPro 9 with Act SDK 8

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
New Member
Posts: 4
Country: USA

Re: Visual FoxPro 9 with Act SDK 8

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

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Visual FoxPro 9 with Act SDK 8

 

Type this into the comand line

objDatabase = CreateObject("Act.Framework.Interop.ActFramework")

Then when your type the next line "objDatabase."  VFP intellisense should kick in.

 

-- jim durkin

New Member
Posts: 4
Country: USA

Re: Visual FoxPro 9 with Act SDK 8

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

Avid Listener
Posts: 83
Country: Malaysia

Re: Visual FoxPro 9 with Act SDK 8

hi , i developing foxpro connect to ACT too. may i know how to display data into foxpro grdibox or insert into foxpro dbf ?

 

thanks.