?
Solved

Connect FoxPro - TDatabase

Posted on 2004-09-07
4
Medium Priority
?
1,118 Views
Last Modified: 2008-01-09
Connect FoxPro - TDatabase

How to connect ODBC - FoxPro database driver with TDatabase component which reads and writes index (*.idx) files ?

Thanks.
0
Comment
Question by:vbmn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 2000 total points
ID: 11994985
usual you could use the dbase-bde driver for foxpro
(its just a level (property) adjustment in the bde-admin tool to do),
but i don't know, if an idx will be touched

meikl ;-)
0
 
LVL 2

Author Comment

by:vbmn
ID: 11995121
Well, I read on site :

http://community.borland.com/article/print/0%2C1772%2C19657%2C00.html

//Question:
//
//Does the BDE support FoxPro IDX files?
//
//Answer:
//
//The BDE supports FoxPro tables via its native driver up to version 2.6. IDX files
//were added in a FoxPro version after 2.6. Because of this the native driver
//does not support IDX files. If you have ODBC driver which can be configured
//to open IDX files whenever a table is opened then this would be a viable alternative.

Where to find "ODBC driver which can be configured to open IDX files" ?

And How to configure TDATABASE PARAMS to connect TDATABASE for it ?

Thanks.
0
 
LVL 2

Author Comment

by:vbmn
ID: 11995501
And I found :

http://msdn.microsoft.com/vfoxpro/downloads/updates/odbc/default.aspx

Visual FoxPro ODBC Driver
After install I tried to set it with TDatabase PARAMS :

/////////////

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, DB, DBTables;

type
  TForm1 = class(TForm)
    Database1: TDatabase;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
Database1.Connected:=False;
Database1.DatabaseName:='VisualFoxPro';
Database1.Params.Clear;
Database1.Params.Add('DATABASE NAME=C:\');
Database1.Params.Add('USER NAME=');
Database1.Params.Add('ODBC DSN=Visual FoxPro Database');
Database1.Params.Add('OPEN MODE=READ/WRITE');
Database1.Params.Add('SCHEMA CACHE SIZE=8');
Database1.Params.Add('SQLQRYMODE=');
Database1.Params.Add('LANGDRIVER=');
Database1.Params.Add('SQLPASSTHRU MODE=SHARED AUTOCOMMIT');
Database1.Params.Add('SCHEMA CACHE TIME=-1');
Database1.Params.Add('MAX ROWS=-1');
Database1.Params.Add('BATCH COUNT=200');
Database1.Params.Add('ENABLE SCHEMA CACHE=FALSE');
Database1.Params.Add('SCHEMA CACHE DIR=');
Database1.Params.Add('ENABLE BCD=FALSE');
Database1.Params.Add('ROWSET SIZE=20');
Database1.Params.Add('BLOBS TO CACHE=64');
Database1.Params.Add('PASSWORD=');
Database1.DriverName:='Microsoft Visual FoxPro Driver';
Database1.Connected:=True;
end;

end.

/////////////

There was an error :
EDBEngineError :
'General SQL Error,
[Microsoft][ODBC Visual FoxPro Driver]DATABASE
[Microsoft][ODBC Visual FoxPro Driver]SourceDB
Alias: VisualFoxPro'
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 12003551
hmm,
i have no foxpro nor this odbc-driver,
so i run out of tips. maybe this odbc-driver must be configured frist
with the odbc-admin and then bind this configuration into the bde

just a guess, sorry

meikl ;-)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question