Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 10 APR 2004 03:38:02PM Allen Coleman wrote:

To construct dbf imports programatically, I have a routine using OSOpen and OSBRead with field name and length data loaded from a static table. That's ok so long as the dbf field lengths aren't changed.

In Arev's dbf bond, header data would automatically query and correct for field length changes before the import. Is there a chance we could get this back in OI?

Alternatively, how can I programatically extract field length from the dbf header. In notepad it's not clear how that information's embedded.

Thanks,

Allen


At 10 APR 2004 06:35PM Steve Smith wrote:

I'd use a hex editor to inspect the files. Notepad is not the right tool.

Perhaps review the dbf specification online, eg.

http://www.e-bachmann.dk/docs/xbase.htm

http://www.geocities.com/geoff_wass/dBASE/GaryWhite/dBASE/FAQ/qformt.htm

To convert 32 bit integers, seq(buffern,1) is your friend :-)

Steve

steve@state-of-the-art.com.au


At 10 APR 2004 09:53PM Donald Bakke wrote:

Allen,

There is probably no one better than Steve to answer your questions as written. However, have you considered using OI's ODBC connectivity to import your DBF files?

dbakke@srpcs.com

SRP Computer Solutions, Inc.


At 11 APR 2004 12:37AM Allen Coleman wrote:

Don, I've used ODBC in other apps (not OI) but don't prefer since it requires workstation specific Windows configuring (simple but nonetheless an added step at deployment). Doing it programatically's not foolproof however if dbf header details aren't automatically queried in advance of import requests (Arev's dbf bond did this). Fortunately our dbf specs rarely change so we've not broken anything yet.

Mike's banner at the top of this page "Get connected with ODBC and save…." leaves me less certain I'm thinking this through ok. Is ODBC the better way to do these imports?

Steve - thanks for your advice and leads. I was at an impasse.

Regards,

Allen


At 11 APR 2004 03:45PM Steve Smith wrote:

Allen -

For a one-time conversion, another way is to use MS Access to import the dbf files, then use an Access macro to load OI and use XREV.DLL to convert the data into OI.

Steve

steve@state-of-the-art.com.au


At 12 APR 2004 02:22AM Donald Bakke wrote:

Allen,

The "better" way is the way that works best for you. Since I don't have any dbf format specs on hand then I would resort to ODBC myself. But you have both options available so it is kind of a push.

FWIW, the ODBC that you see advertised in the banner is for a driver that allows external applications (VB, Crystal Reports, etc.) to read LH data. You would be using the ODBC connectivity features that are built into the C/S Workspace tool of OI. Hence, it comes free with OI and I'm pretty sure you won't have to do any workstation configuration since the dBASE ODBC driver comes standard on most Windows workstations.

dbakke@srpcs.com

SRP Computer Solutions, Inc.


At 12 APR 2004 05:32PM Allen Coleman wrote:

Ironically, we had to add ODBC drivers to all our newer xp (Dell) workstations - not a big deal. Except for query to update field lengths, doing the import programatically works ok.

Nonetheless, I'll go with ODBC on this.

Thanks again, Don

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/91a9bff90a32666485256e72006bda88.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1