Возможно вы искали: 'Marcus Trescothick's C...'

June 25 2025 00:20:07
  • Как сделать 8Gamers.Ru домашней страницей?
  • Игры
    • База данных по играх
    • Игровые новости
    • Игровая индустрия
    • Обзоры на игры
    • Прохождения игр
    • Гайды к играм
    • Превью о играх
    • Игровые тизеры
    • Игровые арты
    • Игровые обои
    • Игровые скриншоты
    • Игровые обложки
    • Игровые трейлеры
    • Игровое видео
    • Вышедшие игры
    • Ближайшие релизы игр
  • Кино и ТВ
    • База данных по кино
    • Статьи о кино
    • Постеры
    • Кадры из кино
    • Кино трейлеры
    • Сегодня в кино
    • Скоро в кино
  • Комиксы и манга
    • Манга по алфавиту
    • База данных по комиксах
    • Читать онлайн комиксы
    • Читать онлайн манга
    • База персонажей
  • Читы и коды
    • Чит-коды для PC игр
    • Чит-коды для консольных игр
    • Трейнеры
    • Коды Game Genie
  • Моддинг
    • Модификации
    • Карты к играм
    • Программы для моддинга
    • Статьи о моддинге
  • Геймдев
    • Всё о создании игр
    • Список движков
    • Утилиты в помощь игроделу
    • Конструкторы игр
    • Игровые движки
    • Библиотеки разработки
    • 3D-модели
    • Спрайты и тайлы
    • Музыка и звуки
    • Текстуры и фоны
  • Рецензии
    • Игры
    • Кино
    • Аниме
    • Комиксы
    • Мангу
    • Саундтреки
  • Саундтреки
    • Лирика
  • Файлы
    • Патчи к играм
    • Русификаторы к играм
    • Сохранения к играм
    • Субтитры к кино
  • Медиа
    • Видео
    • Фото
    • Аудио
    • Фан-арты
    • Косплей
    • Фото с виставок
    • Девушки из игр
    • Рисунки
    • Рисуем онлайн
    • Фотохостинг
  • Юмор
    • Анекдоты
    • Афоризмы
    • Истории
    • Стишки и эпиграммы
    • Тосты
    • Цитаты
  • Флеш
    • Азартные
    • Аркады
    • Бродилки
    • Гонки
    • Для девочек
    • Для мальчиков
    • Драки
    • Квесты
    • Леталки
    • Логические
    • Мультфильмы
    • Открытки
    • Приколы
    • Разное
    • Спорт
    • Стратегии
    • Стрелялки
Статистика

Статей: 87772
Просмотров: 97119554
Игры
Injustice:  Gods Among Us
Injustice: Gods Among Us
...
Dark Souls 2
Dark Souls 2
Dark Souls II - вторая часть самой хардкорной ролевой игры 2011-2012 года, с новым героем, сюжето...
Battlefield 4
Battlefield 4
Battlefield 4 - продолжение венценосного мультиплеер-ориентированного шутера от первого ли...
Кино
Steins;Gate
Steins;Gate
Любители японской анимации уже давно поняли ,что аниме сериалы могут дать порой гораздо больше пи...
Ку! Кин-дза-дза
Ку! Кин-дза-дза
Начинающий диджей Толик и всемирно известный виолончелист Владимир Чижов встречают на шумной моск...
Обзоры на игры
• Обзор Ibara [PCB/PS2] 18477
• Обзор The Walking ... 18927
• Обзор DMC: Devil M... 20001
• Обзор на игру Valk... 15994
• Обзор на игру Stars! 17886
• Обзор на Far Cry 3 18079
• Обзор на Resident ... 16137
• Обзор на Chivalry:... 17638
• Обзор на игру Kerb... 18092
• Обзор игры 007: Fr... 16732
Превью о играх
• Превью к игре Comp... 18073
• Превью о игре Mage... 14578
• Превью Incredible ... 14822
• Превью Firefall 13593
• Превью Dead Space 3 16447
• Превью о игре SimC... 14848
• Превью к игре Fuse 15541
• Превью Red Orche... 15653
• Превью Gothic 3 16461
• Превью Black & W... 17477
Главная » Статьи » Разное » Using the Xbase DBMS in a Linux Environment (linux xbase database)

Using the Xbase DBMS in a Linux Environment (linux xbase database)

Ключевые слова: linux, xbase, database, (найти похожие документы)

_ RU.LINUX (2:5077/15.22) ___________________________________________ RU.LINUX _
From : Boris Tobotras 2:5020/510 04 Oct 98 17:53:52
Subj : Using the Xbase DBMS in a Linux Environment
________________________________________________________________________________
"Linux Gazette...making Linux just a little more fun!"

------------------------------------------------------------------------

Using the Xbase DBMS in a Linux Environment

By Gary Kunkel

------------------------------------------------------------------------

Introduction

The Xbase file structure has been around quite a while and was one of the
first widely available DBMS tools for micro computers. It has become a
de-facto industry standard for text based databases and is supported by many
vendors to include the Borland Database Engine, Microsoft's FoxPro, Clipper,
Sequitor's Codebase and others. Xbase type datafiles will be with us for a
while.

The Startech Web Server at http://www.startech.keller.tx.us/xbase/xbase.html
maintains a public domain, open source C++ library for accessing Xbase type
datafiles in a multi-user environment. The library supports automatic record
locking, memo fields (both dBase III and IV versions), and .NDX style
indices. There is also an API for interfacing the library to an Apache Web
Server and providing database access to web pages. Several example programs
provide a framework for creating, browsing and updating databases. There are
examples which demonstrate how to use the library with an Apache Web Server
and using the library in conjunction with the wxWindows library. Some
readers of this article will recognize the wxWindows library as a cross
platform GUI C++ library.

------------------------------------------------------------------------

System Requirements

In order to use the Xbase DBMS library, you'll need to have a C/C++
compiler. The original library was built on a Slackware distribution with
the GNU public domain compiler, but there are examples on the site for using
the library on other platforms including Windows, SUN, and VMS.

------------------------------------------------------------------------

Getting Sources

To downloading the library sources, point your web browser to
http://www.startech.keller.tx.us/xbase/xbase.html and select the latest
version, which at the time of this writing is version 1.7.4 dated 6/18/98.
There are a couple of flavors available, but for the purpose of this
article, download the UNIX tar version. Also, you may want to grab the HTML
documentation for using the library at the same time. Alternatively, you can
get the software via ftp ftp.startech.keller.tx.us and retrieve the software
from the pub/xbase directory.

------------------------------------------------------------------------

Installing Sources

To install the Xbase library under the /usr/local directory, execute the
following commands: cd /usr/local and mkdir xbase. The next step is to set
up access rights to the Xbase directory tree. Your site may have specific
protocols on directory access rights which you may need to address at this
point. If not, then the commands "chown YOURUSERID.users xbase", then "chmod
775 xbase" will get you going.

Now create a source directory and copy the source code into it: "cd xbase",
"mkdir src", "cp /home/of/xbase.tar.gz /usr/local/xbase/src", "cd
/usr/local/xbase/src", "gunzip xbase.tar.gz" and lastly "tar -xvf
xbase.tar". At this point the Xbase source code should be in the
/usr/local/xbase/src directory and be ready to build the library.

------------------------------------------------------------------------

Building the Library

Before building the library, review the options.h file. This file contains
any of the Xbase configuration switches you may want or need to change
depending on what you are trying to do. To build a DLL library, type "make
dll". To build a static library, type "make all".

It should compile cleanly. Errors at this point can often be traced to the
.h header files currently in use at your site. If you run into errors at
this point, notify xbase@startech.keller.tx.us for help building the
library.

------------------------------------------------------------------------

Building a Sample Program

This sample program demonstrates a simple program which creates a sample
database and index.


/* sample1.cpp */
#include "xbase.h"
main()
{
Schema MyRecord[] =
{
{ "FIRSTNAME", CHAR_FLD, 15, 0 },
{ "LASTNAME", CHAR_FLD, 20, 0 },
{ "BIRTHDATE", DATE_FLD, 8, 0 },
{ "AMOUNT", NUMERIC_FLD, 9, 2 },
{ "SWITCH", LOGICAL_FLD, 1, 0 },
{ "FLOAT1", FLOAT_FLD, 9, 2 },
{ 0,0,0,0 }
};

/* define the classes */
XBASE x; /* initialize xbase */
DBF MyFile( &x ); /* class for table */
NDX MyIndex( &MyFile ); /* class for index 1 */

SHORT rc; /* return code */

if(( rc = MyFile.CreateDatabase( "MYFILE.DBF", MyRecord, OVERLAY )) !=
NO_ERROR )
cout << "nError creating database = " << rc << "n";
else
{
/* define a simple index */
if(( rc = MyIndex1.CreateIndex(
"MYINDEX.NDX", "LASTNAME", 0, 1 )) != NO_ERROR )
cout << "nError creating index 1 = " << rc << "n";
}
MyFile.CloseDatabase(); /* Close database and associated indexes */
return 0;
}

Assuming you keyed the program source into directory
/usr/local/xbase/myproj, type "g++ -c -I/usr/include
-I/usr/src/linux/include/asm-i386 -I../src sample1.cpp" to compile the
program and type "g++ -o sample1 sample1.o ../src/xbase.a" to link edit the
program. The asm-i386 directory in the above include line is for Linux
running on the Intel platform. Other platforsm require the correct include
directory.

------------------------------------------------------------------------

Conclusion

In conclusion, I'd like to say that although the Xbase library is not a 100%
complete Xbase solution, it is a stable and reliable library capable of
handling various database requirements. If you are looking for database
libraries in general, or need access to Xbase files in particular, give
Xbase DBMS a try. If you are a C programmer and new to C++ object oriented
programming, the Xbase DBMS is easy to learn and will help transition you to
the world of object oriented programming. If you have never programmed in C
or C++ before, this library should provide complete enough examples to get
you started programming in C/C++ with confidence.

------------------------------------------------------------------------

Copyright (C) 1998, Gary Kunkel
Published in Issue 33 of Linux Gazette, October 1998

------------------------------------------------------------------------

[ TABLE OF CONTENTS ] [ FRONT PAGE ] [ Back ] [ Next ]

------------------------------------------------------------------------

--
Best regards, -- Boris.

Never make anything simple and efficient when a way can be found to
make it complex and wonderful.
--- Gnus v5.5/XEmacs 20.3 - "London"
* Origin: Linux inside (2:5020/510@fidonet)

977 Прочтений •  [Using the Xbase DBMS in a Linux Environment (linux xbase database)] [08.05.2012] [Комментариев: 0]
Добавил: Ukraine Vova
Ссылки
HTML: 
[BB Url]: 
Похожие статьи
Название Добавил Добавлено
• Using the Xbase DBMS in a Linux Env... Ukraine Vova 08.05.2012
Ни одного комментария? Будешь первым :).
Пожалуйста, авторизуйтесь для добавления комментария.

Проект входит в сеть сайтов «8Gamers Network»

Все права сохранены. 8Gamers.NET © 2011 - 2025

Статьи
Рецензия на Pressure
Рецензия на Pressure
Чтобы обратить на себя внимание, начинающие маленькие разработчики, как правило, уходят в жанры, ...
Рецензия на Lost Chronicles of Zerzura
Рецензия на Lost Chron...
Игры, сделанные без любви и старания, похожи на воздушный шар – оболочка есть, а внутри пусто. Lo...
Рецензия на The Bridge
Рецензия на The Bridge
«Верх» и «низ» в The Bridge — понятия относительные. Прогуливаясь под аркой, можно запросто перей...
Рецензия на SimCity
Рецензия на SimCity
Когда месяц назад состоялся релиз SimCity, по Сети прокатилось цунами народного гнева – глупые ош...
Рецензия на Strategy & Tactics: World War 2
Рецензия на Strategy &...
Название Strategy & Tactics: World War II вряд ли кому-то знакомо. Зато одного взгляда на ее скри...
Рецензия на игру Scribblenauts Unlimited
Рецензия на игру Scrib...
По сложившейся традиции в информационной карточке игры мы приводим в пример несколько похожих игр...
Рецензия на игру Walking Dead: Survival Instinct, The
Рецензия на игру Walki...
Зомби и продукция-по-лицензии — которые и сами по себе не лучшие представители игровой биосферы —...
Обратная связь | RSS | Донейт | Статистика | Команда | Техническая поддержка