[ic] .dbf dbi:xbase

Scott Andreas interchange-users@interchange.redhat.com
Wed Mar 27 12:26:01 2002


Hello list,

This is a shot in the dark but some listee may have an anwser to my problem

On our Netware file system is our Accounting software based on M$ Foxpro

We are running a RedHat 7.0 server with IC 4.8.1

I mounted a netware file server file system to a sub directory of the
products directory

We installed the DBD::XBase perl modules under IC.

Using a standard query tag I am ABLE to query the dbf.

My problem is that a query takes appox. 110 secs to process (ugh)

Upon further investigation into the DBD::XBase module it says to do fast
searches I should search the .cdx (compound index) file which will point to
the record in the dbf ( This is why I love *SQL Servers instead of FoxPro
crap). So my question is if anyone has actually done a search of the .cdx
file or other .*dx file within IC.

A synopsis of the DBI::Xbase is
<SNIP>
use DBI;
    my $dbh = DBI->connect("DBI:XBase:/directory/subdir")
    				or die $DBI::errstr;
    my $sth = $dbh->prepare("select MSG from test where ID != 1")
    				or die $dbh->errstr();
    $sth->execute() or die $sth->errstr();


    my @data;
    while (@data = $sth->fetchrow_array())
		{ ## further processing }


    $dbh->do('update table set name = ? where id = 45', {}, 'krtek');
</SNIP>

Which is what the query tag equates out to...

A synopis of the XBase::Index is
<SNIP>
use XBase;
	my $table = new XBase "data.dbf";
	my $cur = $table->prepare_select_with_index(['rooms.cdx', 'ROOMNAME'])
	$cur->find_eq(1097);


	while (my @data = $cur->fetch()) {
		last if $data[0] != 1097;
		print "@data\n";
	}
</SNIP>

my thoughts are maybe I should create a usertag or embed XBase::Index inside
of [perl] tags.

Any information or help would be greatly appreciated.

If this works out I would be happy to create a HOW_TO LINUX + IC + NETWARE +
FOXPRO DBF + .*DX

More info on XBase can be found at
http://search.cpan.org/search?mode=module&query=xbase

If this works like I think it will this should be a great IC add-in


J. Scott Andreas :)
IS/Programmer/WebDevelopement
Learning Services, Inc.
e-mail: sandreas@learningservicesinc.com
phone: 1-800-877-9378 ext. 146
fax: (541) 744-2056

       ---    __o
     ---   _-\<,_
      --- (_)/ (_)