-
FoxPro ActiveX DLL's
Is it possible to create an ActiveX DLL in Visual FoxPro (or any other language
besides C++) that can retrieve information into a collection from a DBF file
using commands such as USE, DISPLAY ALL, LOCATE FOR, etc. ? The Microsoft
Visual FoxPro Driver for ODBC really sucks. Is there an OLEDB driver for
VFP yet?
-
Re: FoxPro ActiveX DLL's
> Is it possible to create an ActiveX DLL in Visual FoxPro (or any other
language besides C++) that can retrieve information into a collection from a
DBF file using commands such as USE, DISPLAY ALL, LOCATE FOR, etc. ?
Sure, use COM. Simply add a class to your project with teh OLEPUBLIC clause
and compile as a COM DLL in the project wizard.
As an example, check out how I use a VFP DLL inside a VBScript to return
data from a DBF into a web page: www.mikehelland.com and go to "Site"
> Visual FoxPro Driver for ODBC really sucks. Is there an OLEDB driver for
VFP yet?
VFP7 I think.
-
Re: FoxPro ActiveX DLL's
In article <39d0faed$1@news.devx.com>, rlinhart@qqonline.com (Richard)
quoth...
> Is it possible to create an ActiveX DLL in Visual FoxPro (or any other language
> besides C++) that can retrieve information into a collection from a DBF file
> using commands such as USE, DISPLAY ALL, LOCATE FOR, etc. ? The Microsoft
> Visual FoxPro Driver for ODBC really sucks. Is there an OLEDB driver for
> VFP yet?
You're mixing terms a bit here -- understandable, since we do too. :-)
You cannot create an ActiveX control in VFP: however, you can create a
COM DLL, which I think is what you're describing above. Just create
classes with the OLEPUBLIC attribute checked, and then instead of
building an APP or EXE, build a single- or multi-threaded DLL.
If you want to display information with DISPLAY ALL, though, you need
to build an out-of-process EXE file -- you can't have user interface
commands in a DLL. Also, if you can appropriately index your files,
SEEK is faster than LOCATE FOR.
How, specifically, does the ODBC provider suck?
There isn't an OLEDB provider for VFP yet, but one has been announced
(and demonstrated?) for the next version, probably due out next year.
--
Garrett Fitzgerald
#INCLUDE "\Program Files\Microsoft Visual Studio\VFP98\stddsclm.h"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks